Skip to content

Instantly share code, notes, and snippets.

@piccaso
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piccaso/fe86f3aa46de79cf234d to your computer and use it in GitHub Desktop.
Save piccaso/fe86f3aa46de79cf234d to your computer and use it in GitHub Desktop.
Using sinus for animation in OpenSCAD
/* result: http://i.imgur.com/PfutWmN.gif */
t=sin($t*180); /* $t==0 && t==0, $t==0.5 && t==1, $t==1 && t==0 */
n=t*.5;
for(l = [0:3]){ /* = 4 layers */
translate([n*(1.1*l)+(.1*l),0,0]) cube([.1,1,1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment