Skip to content

Instantly share code, notes, and snippets.

@kintel
Created November 22, 2013 03:26
Show Gist options
  • Save kintel/7594315 to your computer and use it in GitHub Desktop.
Save kintel/7594315 to your computer and use it in GitHub Desktop.
module cross() {
square([10,20], center=true);
square([20,10], center=true);
}
module cross2() {
minkowski() {
circle(r=3, $fn=16);
union() {
square([10,20], center=true);
square([20,10], center=true);
}
}
}
module slab(h, rot_from, rot_to, scale_from, scale_to) {
linear_extrude(height=h, twist=rot_to-rot_from, scale=scale_to/scale_from) {
rotate(-rot_from) scale(scale_from) child();
}
}
SLABS = 10;
HEIGHT =40;
TWIST = 45;
for (i = [0:SLABS-1]) {
translate([0,0,i*HEIGHT/SLABS]) slab(HEIGHT/SLABS, i*TWIST/SLABS, (i+1)*TWIST/SLABS, (sin(i*180/SLABS + 50)+2)/2, (sin((i+1)*180/SLABS + 50)+2)/2) cross2();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment