Loops for Transformation

Hi,

I have been away from blender for a while,doing some work in POVRAY. I wrote a small macro (see below) which takes an object (a sphere) and calculates the location them (x,z) based on a circle radius and number of steps. How would I do this easily in Blender? Any ideas?

Thanks,

Adrian

#macro XZonacircle (circle_radius, circle_angle)

#declare X = circle_radiuscos(radians(circle_angle));
#declare Z = circle_radius
sin(radians(circle_angle));

#end

#declare circle_radius=2.7;
#declare circle_steps=8;
#declare circle_angle=360/circle_steps;

#while ( circle_angle < 360+(360/circle_steps) )

XZonacircle (circle_radius, circle_angle)
object {Ball translate<X,0.5,Z> material {t_glass}
photons{target // spacing multiplier for photons hitting the object
refraction on
reflection on
//collect off // ignore photons
//pass_through // do not influence photons
}}

#declare circle_angle = circle_angle + (360/circle_steps);
#end

Hi,

I don’t understand your macro because I don’t use POVray. If you want to animate an object travelling in a circle, make your object follow a circular path. If you want to create an object that is made of an object duplicated into a circle, use the Array modifier or DupliVerts.