|
|
Warp <war### [at] tagpovrayorg> wrote in message news:39d35005@news.povray.org...
> Secondly, rotating an evenly random angle around the y-axis and then
> an evenly random angle around the z-axis has an undesired effect: You
> will have more stars near the y-axis (ie. around <0,1000,0>) than near
> the x-z plane.
> That is, the stars are not evenly scattered around the sky but there are
> more stars directly "up" than near the "horizon".
I noticed that but thought it was just a coincidence
> If you want an even distribution of stars you have to use a bit more
> complicated algorithm. For example:
> 1) Calculate a random point inside a sphere (eg. a unit sphere). The
> random distribution must be even.
> 2) Translate this point in the direction origin-point (ie. multiply it
by
> a value) so that its distance from the origin will be the desired (eg.
1000).
>
> For example something like this:
<snip code>
Thanks, I'll take a look at that
Gail
--
********************************************************************
* gsh### [at] monotixcoza * System.dat not found. *
* http://www.rucus.ru.ac.za/~gail/ * Reformat hard drive Y)es O)k *
********************************************************************
* If at first you don't succeed, call it version 1.0 *
********************************************************************
Post a reply to this message
|
|