POV-Ray : Newsgroups : povray.advanced-users : Algorithm for Scattering Server Time
1 Nov 2024 23:16:43 EDT (-0400)
  Algorithm for Scattering (Message 1 to 4 of 4)  
From: Ammar Al-Allak
Subject: Algorithm for Scattering
Date: 24 Aug 2000 05:26:12
Message: <39a4ea34$1@news.povray.org>
Hi there

Can somebody give me the algorithm used for the Rayleigh Scattering in POV
Ray and how it could me modified so that it is wavedependent.

Cheers,

Ammar


Post a reply to this message

From: Christoph Hormann
Subject: Re: Algorithm for Scattering
Date: 24 Aug 2000 06:56:05
Message: <39A4FF6E.8A5C9F02@schunter.etc.tu-bs.de>
Ammar Al-Allak wrote:
> 
> Hi there
> 
> Can somebody give me the algorithm used for the Rayleigh Scattering in POV
> Ray and how it could me modified so that it is wavedependent.
> 
> Cheers,
> 
> Ammar

You should have a look at the povray sourcecode for that. (it's available at the
povray.org website).

searching for "rayleigh" among the source files gives media.c/media.h so have a
look at them.  

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Peter Popov
Subject: Re: Algorithm for Scattering
Date: 28 Aug 2000 03:54:49
Message: <0o1kqsg07p3n09jdoe7dtitddrti1denpu@4ax.com>
On Thu, 24 Aug 2000 10:29:42 +0100, "Ammar Al-Allak"
<a.a### [at] ueaacuk> wrote:

>Can somebody give me the algorithm used for the Rayleigh Scattering in POV
>Ray and how it could me modified so that it is wavedependent.

The ray marching algorithm is explained in the POV-Ray docs where you
can also find the type 4 (Rayleigh) scattering diagram.

Now, to make it wavelength-dependent, you'll need to know the spectrum
of every light ray. This means that colors should either be
represented by their spectra or should fake a solution by
RGB-to-spectrum-space conversion (like RGB->HSB). It may or may not
require subsequent sampling of light rays like in the light dispersion
patch. In any case this will require massive changes in the source
code.

The good news is that someone is (or was?) working on this and even
posted some results some time ago. The bad news is, I don't remember
who it was. Maybe Ken has a link.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Simon de Vet
Subject: Re: Algorithm for Scattering
Date: 29 Aug 2000 20:03:38
Message: <39AC4FB4.6AC6AB0B@istar.ca>
Ammar Al-Allak wrote:

> Hi there
>
> Can somebody give me the algorithm used for the Rayleigh Scattering in POV
> Ray and how it could me modified so that it is wavedependent.

I spent a good deal of the summer doing research involving Rayleigh
Scattering. While I don't understand all of it, I can at least point you in
the direction of some good resources...

I also have a bunch of equations I used to calculate the extinction values due
to Rayliegh scattering dependant on wavelength, atomospheric composition,
altitude, etc. They're in LaTeX, but I could probably convet them to something
a bit more convenient.


Simon


Post a reply to this message

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