This is my notepad where i collect the useful snippets of OpenSCAD code that i use over and over. Some better curated than others, some formatted for clarity some for efficiency.
Thursday, August 24, 2017
Tennis ball curve function.
Tennis ball curve function. Returns a single point at (i) far along a curve in the shape of the seam on a tennis ball.
function Tennis_ball_Curve(i)=let(
b=360*i-sin(360*i*4)*25 ,
a=sin(360*i*2)*65)
[cos(a)*sin(b),cos(a)*cos(b),sin(a)] ;
for(i=[0:1/180:1]){
translate(Tennis_ball_Curve(i))sphere(0.02,$fn=30);
}
No comments:
Post a Comment