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.
for(i=[-0:1/160:1])translate([i,0])square([1/160, (icosw( (i))) ]); function icosw(i)=-cos(i*360)/2+0.5+i;