for(i=[-0:1/160:1])translate([i,0])square([1/160, (arcs2( (i),3)) ]);
function arc1 (x,n=0) = let(a= n>0? arc1(x,(n-1)):x) clamp(sqrt(1-(1-a)*(1-a)));
function arc2 (x,n=0) =let(a= n>0? arc2(x,(n-1)):x) clamp( 1-sqrt(1-(a)*(a)));
function arcs1(v,steps=3) = arc1(mods(v,steps),1)/steps+mstep(v,steps);
function arcs2(v,steps=3) = arc2(mods(v,steps),1)/steps+mstep(v,steps);
function clamp(a, b = 0, c = 1) = min(max(a, b), c);
function mstep(v,steps=3) = (floor(v*steps)/steps );
function mods(v,steps=3) = ( (v*steps)%1);
No comments:
Post a Comment