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.
Wednesday, August 9, 2017
0 - 1 Remapping Functions: Arc1
/* remapping functions */
for(i=[-0:1/160:1])translate([i,0])square([1/160, (arc1( (i)))]);
function arc1 (x,n=0) = let(a= n>0? arc1(x,(n-1)):x) clamp(sqrt(1-(1-a)*(1-a)));
function clamp(a, b = 0, c = 1) = min(max(a, b), c);
No comments:
Post a Comment