POV-Ray : Newsgroups : povray.general : spherical light math help ... : Re: spherical light math help ... Server Time
10 Aug 2024 11:25:31 EDT (-0400)
  Re: spherical light math help ...  
From: Chris Huff
Date: 7 Jan 2000 12:45:49
Message: <chrishuff_99-2957B8.12455907012000@news.povray.org>
In article <38761c1c@news.povray.org>, "Paul Vanukoff" 
<van### [at] primenetcom> wrote:

> 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
> 
> Only problem is, I don't know what to set DIVISOR to, in order for the
> overall brightness to equal that of a single light_source.  I know it has
> something to do with the volume of a sphere, and the value of STEP. Does
> anyone know what formula to use?

Hmm, is this a spherical area light? I had planned on making a macro for 
this someday, I never got around to it. I would use a slightly different 
way of doing it, though.
There is a patch in MegaPOV that does something similar(circular area 
lights and reorienting area lights), and you might want to ask in 
povray.advanced-users for more help, since this seems to be a math 
question. I will look at this code later and see what I can do.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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