A parametric pawn by @EmilyDanchik using #OpenSCAD
For my object, I created a pawn with several parameters. In my first sketching class, we created our own chess pieces to practice drawing and rendering 3D shapes. OpenSCAD automates part of this process, so I recreated several of my old sketches here:
I’m not sure what the proper terminology is for the parts of chess pieces, so I made my own in my sketch:
Here is the code for my pawn:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | // Change any of these! headWidth = 50; collarHeight = 10; collar1Width = 80; collar2Width = 30; bodyHeight = 40; bodyWidth = 40; legHeight = 30; baseWidth = 70; baseHeight = 10; // The head sphere(headWidth/2); // The collar-looking thing translate([0, 0, -1*headWidth/2]) cylinder(h=collarHeight, r1 = collar1Width/2, r2 = 0); translate([0, 0, -1*headWidth/2-collarHeight]) cylinder(h=collarHeight, r1 = collar2Width/2, r2 = collar1Width/2); // The body-looking thing translate([0, 0, -1*headWidth/2-collarHeight-bodyHeight]) cylinder(h=bodyHeight, r1= bodyWidth/2, r2= collar2Width/2); // The leg translate([0, 0, -1*headWidth/2-collarHeight-bodyHeight-legHeight]) cylinder(h=legHeight, r1= baseWidth/2, r2= bodyWidth/2); // The base translate([0, 0, -1*headWidth/2-collarHeight-bodyHeight-legHeight-baseHeight]) cylinder(h=baseHeight, r1= baseWidth/2, r2= baseWidth/2); |
This code is available at Thingiverse and GitHub. I would consider the design to be useful and interesting, and perhaps beautiful in its simplicity.
In class, Andrew showed me a way to make the piece look more smooth. Thanks! Check out how good it looks now:
The updated code looks like this. I may update the GitHub & Thingiverse to reflect this, giving Andrew credit:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | // Change any of these! headWidth = 50; collarHeight = 10; collar1Width = 50; collar2Width = 30; bodyHeight = 30; bodyWidth = 40; legHeight = 30; baseWidth = 70; baseHeight = 10; smooth=100; // The head sphere(headWidth/2, $fn=smooth); // The collar-looking thing translate([0, 0, -1*headWidth/2]) cylinder(h=collarHeight, r1 = collar1Width/2, r2 = 0, $fn=smooth); translate([0, 0, -1*headWidth/2-collarHeight]) cylinder(h=collarHeight, r1 = collar2Width/2, r2 = collar1Width/2, $fn=smooth); // The body-looking thing translate([0, 0, -1*headWidth/2-collarHeight-bodyHeight]) cylinder(h=bodyHeight, r1= bodyWidth/2, r2= collar2Width/2, $fn=smooth); // The leg translate([0, 0, -1*headWidth/2-collarHeight-bodyHeight-legHeight]) cylinder(h=legHeight, r1= baseWidth/2, r2= bodyWidth/2, $fn=smooth); // The base translate([0, 0, -1*headWidth/2-collarHeight-bodyHeight-legHeight-baseHeight]) cylinder(h=baseHeight, r1= baseWidth/2, r2= baseWidth/2, $fn=smooth); |