POV-Ray : Newsgroups : povray.newusers : repeating a smaller object around the circumference of a sphere : Re: repeating a smaller object around the circumference of a sphere Server Time
2 Nov 2024 15:24:39 EDT (-0400)
  Re: repeating a smaller object around the circumference of a sphere  
From: Tim Nikias v2 0
Date: 28 Nov 2003 05:44:10
Message: <3fc726fa$1@news.povray.org>
That is actually very simple, using while-loops:

#declare Sphere_Radius=3;
#declare Amount_Of_Objects=10;
#declare Counter=0;
#while (Counter<Amount_Of_Objects)
object{The_Object translate x*Sphere_Radius rotate
y*360/Amount_Of_Objects*Counter}
#declare Counter=Counter+1;
#end

This way, 10 objects (declared as The_Object) would be placed on the y-plane
around the sphere. Note that I haven't taken into consideration the size of
The_Object itself, you might want to increase Sphere_Radius then.

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.