POV-Ray : Newsgroups : povray.binaries.images : Planetary atmosphere using media : Re: Planetary atmosphere using media Server Time
31 Jul 2024 10:19:10 EDT (-0400)
  Re: Planetary atmosphere using media  
From: clipka
Date: 24 Apr 2010 18:39:42
Message: <4bd3732e$1@news.povray.org>
Am 24.04.2010 21:51, schrieb Le_Forgeron:

>> Then again, it may be that the XYZ model just happens to be more
>> forgiving when it comes to such things as multiplying two colors - which
>> in theory will /never/ work out in /any/ color model that uses the
>> standard three-component color vector approach.
>
> If you wanted to have actual spectrum (discret) interaction by
> multiplication, you would need to distinguish between ray colour (as a
> vector) and interacting colour (as a square matrix, of same dimension)
>
> Most of the time, the matrix would be a simple diagonal one, which might
> collapse to a vector, but that's a bad approach for some material (laser
> pumping ruby for instance would propably have a positive column for
> 694.3 nm; frequency doubling material might also be interesting and
> reluctant to the pure diagonal matrix).

I didn't even think that far; and no, even that would not be enough.

The classic color models essentially approximate a color by integrating 
over functions of the wavelength; and they approximate filtering effects 
of pigments by multiplying these integrals.

However, note that this only works out properly if the functions of the 
wavelength (whatever they may exactly represent) happen to be 
"rectangular", i.e. f'(x)=0 for any wavelength where that function is 
differentiable - or at least approximately so. Otherwise, the product of 
the integrals of two functions is typically /not/ equal to the integral 
of the two functions' product (which would be the proper way to do it).

For instance, f(x)=x and g(x)=1-x integrated over [0..1] gives 0.5 in 
both cases; multiplying these integrals gives 0.25; however, multiplying 
the functions gives f(x)*g(x)=x-x^2, the integral of which is about 0.167.


Post a reply to this message

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