|
|
Paris wrote:
> I am currently writing a physically-based rendering engine. I need to
> deviate 3-Dimensional vectors in a random "cone" whose principle axis is
> equal to the vector itself. The size of the "cone" is pregiven in
> steradians.
>
> I understand that povray uses a lookup table to get directions for radiosity
> samples. I do not have this option.
The radiosity samples in POV-Ray are actually distributed on a hemisphere.
they were once generated with a good algorithm randomly, but there is
nothing inherently forcing you to have a fixed table other than speed.
My guess is that ideally you want to use a hemisphere, too, but determined a
cone is simpler? Or is that a cone as in cone-tracing? Either way, although
I am not sure I understand your problem correctly, the best advice would be
to check out: <http://www.boost.org/libs/random/index.html> if you need a
good set of random number generators. It also comes with a mapping for
spheres that is really useful.
Thorsten
Post a reply to this message
|
|