|
|
In article <38b95804@news.povray.org>, "Paul" <ran### [at] freenetcouk>
wrote:
> How can I create a scene where an object (like a sphere) is repeated
> over 360 degrees in a circular pattern? I basically want to produce a
> scene with multiple reflective spheres and several colored light
> sources, so that when I produce an animation the camera rotates to
> reveal spheres that reflect differing colors as the camera rotates.
You need to use a #while() loop to do this efficiently, it is documented
in the manual which comes with POV-Ray. Try something like this:
#declare Cntr = 0;// the counter variable
#while(Cntr < 18)// Repeat everything between this and it's
// matching #end while the variable Cntr is
// less than 18.
sphere {< 5, 0, 0>, 1
texture {...}
rotate < 0, Cntr*360/18, 0>
//rotate by an amount depending on Cntr
}
#declare Cntr = Cntr + 1;// Add 1 to the value of Cntr.
// If this is not done, it will try to loop forever.
#end
--
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|