Skip to content

Instantly share code, notes, and snippets.

@GilesBathgate
Last active February 12, 2016 18:11
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 GilesBathgate/f1b07caaa5814c6e209e to your computer and use it in GitHub Desktop.
Save GilesBathgate/f1b07caaa5814c6e209e to your computer and use it in GitHub Desktop.
//Set FPS=10 Steps=36
angle=$t*360;
module wheel(r,a){
rotate([0,0,angle+a])
translate([r,0,0])
rotate([0,90,0])
cylinder(r=10,h=1,$fn=20);
}
module bicycle() {
bicycle_length=100;
r_inner=50;
r_outer=sqrt((r_inner*r_inner)+bicycle_length*bicycle_length);
a=asin(bicycle_length/r_outer);
wheel(r_outer,a);
wheel(r_inner,0);
rotate([0,0,angle])
translate([r_inner,0,0])
rotate([0,0,90])
cube([bicycle_length,1,1]);
}
bicycle();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment