I think seashells are a great example of parametric objects in nature, so I was really interested in replicating similar structures in OpenScad.
This algorithm draws a a seashell as a series of cylinders rotating around a center. The algorithm takes as parameters a parameter proportional to the number of cylinders and a parameter for the width of each cylinder.
seashell(10,2); module seashell(turns, spine) { for ( i = [0 : 0.2 : turns] ) { rotate( i * 360/6, [100 * i, i, 0]) difference () { cylinder(h=i, r=i*spine/10, center = true); cylinder(h=i/2, r=i*2, center = true); } } }
Fine work, Maya. For more information on growing shells, see the classic “On Growth and Form” by D’Arcy Thompson.