All pastes #941935 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-14 02:06 UTC
rendered paste body
//Now:#declare BunchOfSpheres = union{	#declare I=0;	#while(I<10)		sphere {			<I, 0, 0>, 0.5		}		#declare I=I+1;	#end	pigment {		color Red	}}//Java(Script)-like syntax:bunchOfSpheres = new Union();for(i=0; i<10; i++) {	sphere = new Sphere();	sphere.setCenter(i, 0, 0); //OK, this is quite Java-ish	sphere.setRadius(0.5);	bunchOfSpheres.add(sphere);}tx = new Pigment();tx.setColor(Red);bunchOfSpheres.setTexture(tx);//Maybe using the constructor instead, and a native syntax for vectors like//POV-Ray currently has:	sphere = new Sphere(<i, 0, 0>, 0.5);//And how about some hybrid syntax, for initializing for example?bunchOfSpheres.setTexture(pigment {	color Red});