#!/bin/perl 
# compute parametric surface 'Steinbach screw" . See C.A. Pickover, Mazes For The Mind.
# "undersampled with spheres", POV output
# (c) 1995, T.Bischoff

$radius = "Radius"; $pi2 = 2 * 3.141 ;
for ($u = -4 ; $u < 4 ; $u += 0.15 ) { 
	for ($v = 0 ; $v < ($pi2) ; $v += 0.1)  {
		@c = ( $u * cos($v) , $v * cos($u), $u * sin($v));
		printf("sphere { <%f,%f,%f>, $radius}\n",@c,$v/$pi2);
		$sp++;
 	}
}
print STDERR "$sp spheres generated\n";