POV-Ray : Newsgroups : povray.general : spherical light math help ... : Re: spherical light math help ... Server Time
10 Aug 2024 11:27:07 EDT (-0400)
  Re: spherical light math help ...  
From: Robert Dawson
Date: 10 Jan 2000 08:55:42
Message: <3879e4de@news.povray.org>
Paul Vanukoff <van### [at] primenetcom> wrote in message
news:38761c1c@news.povray.org...
>
> I am working on a spherical light, so far it looks something like this:
>
> #declare STEP=0.2;
>
> #declare M=-1;
> #while (M<=1)
>     #declare N=-1;
>     #while (N<=1)
>         #declare O=-1;
>         #while (O<=1)
>
>             #if ( (M*M+N*N+O*O) <= 1 )
>                 light_source
>                 {
>                     < M, N, O> color White/DIVISOR
>                 }
>             #end
>         #declare O=O+STEP;
>         #end
>     #declare N=N+STEP;
>     #end
> #declare M=M+STEP;
> #end


    Might I suggest something? Firstly, the existing adaptive area-light
saves greatly on number of sources for a given quality; I believe the
circular area light implements this
too.  Secondly, the eye does not infer details of light shape well from
illumination except in unusual cases such as a pinhole camera (that's why
you cannot look *away* from a partial eclipse of the sun & see what's
happening.) And, thirdly, with this scheme the number of point lights grows
with the cube of the linear density.  Sloooooooow.   Could you use two or
three area lights,one in the xy plane, one in the yz plane, and one in the
xz plane - or a circular light "trained" via a macro to follow the camera -
to get the same effect?

    -Robert Dawson


Post a reply to this message

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