POV-Ray : Newsgroups : povray.advanced-users : Random rotation don't work ? : Re: Random rotation don't work ? Server Time
29 Jul 2024 14:22:54 EDT (-0400)
  Re: Random rotation don't work ?  
From: Slime
Date: 7 Mar 2002 12:25:12
Message: <3c87a278$1@news.povray.org>
>   Note that this does not achieve *any* possible orientation the object
can
> have. For example, I think that it can never reach an orientation like
> caused by
>   rotate y*30 rotate x*30
>
>   In order to really achieve almost any possible orientation, that random
> rotation should be applied several times. Perhaps even a random number of
> times.


I believe all orientations are covered by just

rotate 360*<rand(R1),rand(R2),rand(R3)>

I'm pretty sure that takes care of all orientations. Whether or not they're
all equally likely is another question.

(Here's why I think that covers everything. Just the point <1,0,0> around
the y axis and then around the z axis randomly gives it the possibility of
pointing in any possible direction. If you're working with an object, and
you rotate it around the x axis, you sort of spin it in any possible
orientation. Then rotating it around the y and z axis like you did with the
point makes it point in a random direction.)

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

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