|
|
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
|
|