POV-Ray : Newsgroups : povray.beta-test : arealight and light_fading bug : Re: arealight and light_fading bug Server Time
30 Jul 2024 08:16:59 EDT (-0400)
  Re: arealight and light_fading bug  
From:
Date: 17 Dec 2001 03:28:07
Message: <5nar1ugmselcureds1p38rb1ik0ppnv7nf@4ax.com>
On 15 Dec 2001 18:30:49 -0500, Warp <war### [at] tagpovrayorg> wrote:
> I wonder how difficult it would be for it to be taken into account in
> other things as well (lighting, highlights, fading...).

I know you can write your own macro but I wondered the same.
Below macro works fine but makes me wonder another thing: is it really necessary
in any routines  to make bounding box of light infinite? With Bounding limited
to location min_extent(Light) could be useful.

#include "math.inc"
#macro Area_Light(Location,Color,Axis1,Axis2,Size1,Size2)
  #local C1=0;
  #while (C1<Size1)
    #local C2=0;
    #while (C2<Size2)
      light_source{
        Location
          +Interpolate(C1,0,Size1-1,-Axis1/2,Axis1/2,1)
          +Interpolate(C2,0,Size2-1,-Axis2/2,Axis2/2,1)
        Color/(Size1*Size2)
      }
      #local C2=C2+1;
    #end
    #local C1=C1+1;
  #end
#end

ABX


Post a reply to this message

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