POV-Ray : Newsgroups : povray.newusers : Another newbie question : Re: Another newbie question Server Time
29 Jul 2024 08:23:37 EDT (-0400)
  Re: Another newbie question  
From: Chris B
Date: 26 Mar 2006 15:03:55
Message: <4426f3ab$1@news.povray.org>
"A_C_C" <nomail@nomail> wrote in message 
news:web.4426e919e46c0111ee4c493c0@news.povray.org...
> Hello, it's me again.
>
> Is there any way to place objects in a circle so they are not evenly 
> placed?
>

> and

>
> Antonio
>
>

Hi Antonio,

You can specify any rotation angles you like. The easiest is to rotate 
around the origin, so in the example I've defined 4 spheres 1 unit away from 
the origin in the +z direction. Then rotating around the +y axis gives what 
you've asked for.
You could also do a #while loop and if you want random rotations you can use 
the seed() and rand() functions.

camera {location <0,2,0.1> look_at <0,0,0>}
sphere {<0,0,1>, 0.01 rotate 267*y pigment{rgb <1,0,0>} finish {ambient 1}}
sphere {<0,0,1>, 0.01 rotate 270*y pigment{rgb <1,0,1>} finish {ambient 1}}
sphere {<0,0,1>, 0.01 rotate 271*y pigment{rgb <1,1,0>} finish {ambient 1}}
sphere {<0,0,1>, 0.01 rotate 320*y pigment{rgb <0,0,1>} finish {ambient 1}}

Regards,
Chris B.


Post a reply to this message

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