0

How can I create a perfect cylinder with an outline like in the picture below using inkscape? The underside needs to be a slightly darker color than the top part so it looks like 3d.

enter image description here

Thanks in advance.

1
  • Hi. Welcome to GDSE. What are you having difficulty with? Outlines are called strokes in Inkscape. The inside colour is called the fill. You can add/remove/change these in the Fill and Stroke panel. Use the shortcut Shift+Ctrl+F if the panel isn't already open.
    – Billy Kerr
    Mar 29, 2022 at 20:51

1 Answer 1

2

Seemingly no flood of answers. I'm afraid the problem is not seen especially challenging. But Inkscape is a complex program for a beginner - difficult to see where to start from. Here's one way:

enter image description here

Turn all point snaps ON.

  1. Draw a rectangle. Then Draw an ellipse (the green one in my image). Move and stretch it to snap at the bottom corners of the rectangle. Duplicate the ellipse (=Ctrl+D). Move the duplicate to snap at to top corners of the rectangle. I have colored the duplicate to red only to make a difference in my screenshot. Copy the moved duplicate also to the clipboard.

  2. Combine the rectangle and the bottom ellipse to one by selecting them and applying Path > Union

  3. Bring the top ellipse to front. Select both items and apply Path > Subtract

  4. Paste from the clipboard a copy of the top ellipse back. Use Edit > Paste in Place.

  5. Adjust for both items the wanted

  • stroke width
  • stroke color
  • fill colors

The lower item has in my example got a linear horizontal gradient fill)

BTW. Steps 3 and 4 can well be omitted. The result would be as good for most practical purposes if you jumped directly from step 2 to step 5. It's fully acceptable to let the shapes overlap if the top shape has a non-transparent fill color. Technically the result with overlapping shapes can be even better than one with exactly fitting seams. Exactly fitting seams leak slightly the background color if there's no stroke causing overlap. It's a common rendering problem and it has been the main subject of numerous questions here in GSDE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.