|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello, it's me again.
Is there any way to place objects in a circle so they are not evenly placed?
Antonio
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris B <c_b### [at] btconnectcomnospam> wrote:
> You can specify any rotation angles you like.
Note that if you rotate the object with the 'rotate' keyword, it will
not only translate the object to that place but also rotate it.
In some cases you just want to place the object on the circumference
but you don't want to rotate the object. In that case you just need to
calculate the location of the object and 'translate' it there from the
origin (instead of putting it at a certain distance from the origin and
then using 'rotate').
This can be achieved for example like this:
object
{ YourObject // assuming your object is centered at <0,0,0>
translate vrotate(<1, 0, 0>, y*267)
}
This will translate 'YourObject' to that location without rotating it.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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.
Thanks, Chris. I am modelling a Trek ship in POV-Ray, and I didn't know how
to do the windows right.
Antonio
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|