In this Inkscape tutorial, I will show you how to draw a 3d cylinder. This process is very simple once you understand snapping to nodes and how to position objects within Inkscape.
Step by Step Guide on How to Create a Cylinder in Inkscape
Step 1 – Draw the Top Oval
Using the Circles and Ellipses tool( E ) draw out the size and shape of the top part of the cylinder. The wider the oval the more overhead the viewer would be positioned. A perfect circle would represent the viewer looking directly over the cylinder. A rectangle would happen if the viewer was perfectly eye level with it looking head-on.
Making the oval about the size in the picture makes a good representation of an oval. It makes it 3d but doesn’t push the shape too much.
Select #6c9bbd for the fill color. We make the top of the cylinder a lighter color to help differentiate the top and side of the cylinder. It represents the light hitting it on the top.
Step 2 – Draw the Rectangle Body
First, make sure that Global snapping to paths is enabled along with Toggle snapping to cusp nodes, Toggle snapping to smooth nodes and Toggle snapping to path intersections. This will allow the rectangle and oval to snap into alignment.
Now using Squares and Rectangles tool( R ) draw a rectangle the height you need. Once you have the desired height select the rectangle and drag it over to the oval until the top left corner snaps to the left-center point of the oval.
Use the right arrow handle to drag and change the width of the rectangle until it snaps to the right side of the oval.
With the rectangle selected move it to the back by hitting the Lower Selection to Bottom button( End ). It’s located in the top bar below the main text navigation bar.
For this example use # as the fill color.
Step 3 – Duplicate the Top Oval
Select the top oval and hit ( Ctrl D ) on the keyboard to duplicate it. Now with the duplicate oval, hold down ( Ctrl ) to lock it in its vertical plane. Drag until it snaps into place at the bottom of the rectangle.
Hit ( D ) on the keyboard to switch to the Color Picker tool and hover over the rectangle to pick that color.
With the cylinder drawn select all three objects by clicking and dragging the cursor over all of them. Hit ( Ctrl G ) on the keyboard to group them all together. Now you will be able to move and scale everything as one object.
How to Create a 3D Shaded Cylinder
Step 1 – Combine Bottom Oval and Rectangle
Select both the rectangle and bottom oval by holding down ( Shift ) and clicking on them. Press ( Ctrl + ) on the keyboard to perform a Path Union function. They are now one shape.
Step 2 – Create a Gradient for the Rectangle
Have that shape selected and go to the Fill and Stroke tab and under Stroke paint select the linear gradient button. Switch to the Edit Paths by Nodes tool( N ) and drag the left node that is in the middle of the shape to about the middle. Hold down ( Ctrl ) to keep the gradient line straight.
Click on the node and make sure the fill color is #33658a. Click on the right node and make the fill color #96bcd8. This gradient represents the light hitting the front of the cylinder. The reason the gradient happens is that as the form of the cylinder slowly turns away from the light it receives less and less light until it perpendicular to the light source and becomes a shadow.
This explains this concept in much greater detail.
Step 3 – Add Bounce Light
This is often overlooked by beginners but adds the final touch to really showcasing realism. Bounce light happens because nothing lives in a vacuum and as light hits an object it bounces in a straight line to another and another and so forth. Each time losing brightness but still providing a bit of light and ambient color.
You can really see this effect when looking in a mirror with a bright color t-shirt. You will notice the color being reflected under your chin even though it’s technically in the shadow.
First, select the cylinder and hit ( Ctrl D ) to duplicate and then ( H ) to horizontally flip it. Lower the selection one level by clicking the Lower selection one step button( Page Down ).
While holding down ( Ctrl ) drag the center gradient node to match the picture. Set the opacity to zero for this node.
Select the node on the left and set the fill color to #5891bb.