Use the three basic 3D shapes (sphere, cylinder, and cube) and some transformations to design a chess pawn. From the top down begin to dissect the model into its individual shapes. At the very top is a sphere. The collar underneath looks like a piece from a cone. The main shaft is also a cone with a milder slope. The ring and the base at the bottom of the pawn are actually spheres. Using a new type of transformation called scale we can take a sphere and stretch or shrink it in any direction like silly putty. Let us start with a sphere of radius, 5. The scale function can be used in its simplest form to change the size of an object. If we do scale([2,2,2]) , for example, it will scale the object by a factor of 2 in each x, y, and z direction. This simply doubles the size and gives us the same object as a sphere with radius 10. by varying the values for [x,y,z] we can create various ovals and ellipsoid shapes. scale([1,2,3]) would take an object and scale it by a factor of 1 in the xdirection (essentially leaving it the same), a factor of 2 in the ydirection (doubling it), and a factor of 3 in the zdirection (tripling it). Here are some examples: sphere(r=5); scale([2,2,1]) sphere(r=5); scale([5,2,1]) sphere(r=5); To create the thin ring on the bottom of the pawn piece we take a small sphere (in this case a sphere of radius 1) and stretch it by a factor of 5 in the x and y directions and leave the zdimension untouched by using a factor of 1. The ring is then translated vertically to the desired position. translate([0,0,5]) scale([5,5,1]) sphere(r=1); The fatter sphere that makes up the base was done in a similar fashion. starting with a sphere of radius, 2, stretching it by the factors [5,5,2] in the [x,y,z] directions and then translating it to the desired position. translate([0,0,1]) scale([5,5,2]) sphere(r=2); At this point you may wonder why your spheres and cylinders do not seem as round as they should. They are “pixelated” in a way. By default, OpenSCAD, renders a circle with around 30 facets. Raising the value of this default variable will make things look more realistic but comes with a price. Rendering with many facets can increase the rendering time dramatically even for simple models. It is the best practice to leave this special variable as the default value until you are completely done with your model and raise up the value for the final rendering (if you were planning to print the object or export it to some other program). The variable is $fn. The following are some examples of different values and the output of the same sphere of radius 10. The use of variables and parameters in OpenSCAD will be discussed further in the next section. sphere(r=10); $fn=50; sphere(r=10); $fn=100; sphere(r=10); $fn=200; sphere(r=10);
© Copyright 2026 Paperzz