This is an individual project. Sharing code is OK, if you significantly modify it from the original. Submit a PowerPoint or Word document.
- Plan your project. Create three annotated sketches of your pumpkin. Digital ink is OK.
- Select one design.
- Obtain two and provide one Peer Review.
- Build your OpenSCAD design. Use inline comments to annotate your code.
- Code should include the following:
- Two boolean operations (and, or, not), including a hollow pumpkin
- For loop
- Three different types of 3D objects (sphere, cube, cylinder, polyhedron, linear extrude, rotate extrude)
- Minimum of two colors
- Make sure your pumpkin sits on the z=0 plane.
- Submission:
- Three sketches.
- Large screenshot with x-y-x axis turned off. Crop as art only.
- Code in text format (no screenshots) or OpenSCAD document.
- Peer review.
OpenSCAD
OpenSCAD Example Code:
difference() {
//pumpkin part
createPumpkin();
//cut out parts
union(){
translate([6,-15,5])rotate([90,60,0])rotate([0,0,22])sphere(7, $fn=3);
translate([-6,-15,5])rotate([90,60,0]) rotate([0,0,38])sphere(6, $fn=3);
color("white")sphere(15,$fn=100);
difference() {
translate([0,-15,2])rotate([90,60,0])rotate([0,0,38])cylinder( 20, 10, 10,true);
translate([0,-15,12])rotate([90,60,0])rotate([0,0,38])cylinder( 25, 15, 15,true);
}
}
}
module createPumpkin() {
union(){
//pumpkin
for(i=[1:30:180]){
color("orange")rotate([0,0,i])scale([1,2,2])sphere(10,$fn=50);
}
//stem
rotate([2,2,0])translate([0,0,18])for(i=[1:60:180]){
color("green")rotate([8,0,i])scale([.5,1,1])cylinder(7, 2, 2,$fn=10);
}
}
}
Resources