POV-Ray : Newsgroups : povray.beta-test : Radiosity Status: Giving Up... : Re: Radiosity Status: Giving Up... Server Time
28 Jul 2024 20:27:18 EDT (-0400)
  Re: Radiosity Status: Giving Up...  
From: clipka
Date: 29 Dec 2008 17:05:00
Message: <web.4959496bcd9d1e75ab169ede0@news.povray.org>
andrel <a_l### [at] hotmailcom> wrote:
> Ok, I'll try to read it. If only I could find the link.
> Could you post that again, I clicked through most of your posts here and
> I cannot find it. :(

No surprise - I never posted a link to it ;)

I don't remember where I got my copy from. I just googled it up ("A Ray Tracing
Solution for Diffuse Interreflection" and "Gregory J. Ward" should do fine); I
found a few pages that looked like they would have charged for access to the
document, but there's also a PDF out there with the text (alas not the
diagrams), and a series of TIFFs from a scanned-in copy (including the
diagrams).

> I'd be surprised if there is not already an efficient random generator
> that does that all in one go, bypassing the need for trigonometry. Maybe
> we only need the help of a resident google expert.

I don't think so.

Generating good pseudo-random number sequences is an art by itself, even without
specific target distributions, so at the core will most always be an algorithm
generating uniformly distributed scalar (i.e. 1-D) numbers.

The desired distribution is usually achieved through some smart (non-linear)
transformation of the generated numbers (which in our case would involve
trigonometrics I guess, or at least squares and roots). See POV-ray's random
numbers include file (don't recall the exact name right now) for examples.

Alternatively, it can be done through Monte-Carlo integration, i.e. pulling some
random number from a uniform-distribution RNG, computing the desired probability
for that particular value, and according to this probability randomly discard
the pulled number (by comparing the probability against another
uniformly-distributed random number), doing the whole process over and over
again if necessary. However, you'll usually try to avoid this, as it may become
quite slow depending on your desired distribution, and you'll inevitably end up
with unpredictable execution times. (The POV random numbers include file
implements this for example to generate a random number inside an object.)

So even though there are RNG's out there that do produce particular
distributions, I reckon they'll typically be just wrappers around a
uniform-distribution RNG for your convenience, so that you don't have to come
up with all the math yourselves (which may be a hassle because it involves
integrals), so in the end your CPU will still need to do trigonometrics.


Post a reply to this message

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