POV-Ray : Newsgroups : povray.newusers : Newbie - Want to create a square flood light : Re: Newbie - Want to create a square flood light Server Time
28 Jul 2024 22:26:08 EDT (-0400)
  Re: Newbie - Want to create a square flood light  
From: Trevor G Quayle
Date: 7 Jun 2007 13:10:02
Message: <web.46683aea9713ab9c150d4c10@news.povray.org>
"TheMightyZog" <Chr### [at] HotPOPcom> wrote:
> That is awesome Trevor, thank you very much.
>
> I have been playing with it and seeing how you put it all together for the
> last hour and have learnt a lot from following what you did.
>
> As a complete beginner, having examples to work through is a real help.
>
> It would have taken me years to define the RecAreaLight
>
> Once again thanks

No problem.  I enjoy coming up with stuff like this.
As an addendum, you could change the macro to:

#macro RecAreaLight(SIZ,GSIZ,RADIUS,FALLOFF)
  #local
ASIZ=SIZ*(tan(radians(FALLOFF))-tan(radians(RADIUS)))/(tan(radians(FALLOFF))+tan(radians(RADIUS)));
  #local DIST=(SIZ.x+ASIZ.x)/(2*tan(radians(FALLOFF)));
  area_light
  <ASIZ.x, 0, 0> <0, 0, ASIZ.y>
  GSIZ.x,GSIZ.y
  translate y*DIST
  projected_through{box{-<SIZ.x,0,SIZ.y>/2,<SIZ.x,0,SIZ.y>/2}}
#end


I.e. remove the jitter, adaptive, etc. from the macro itself.  That way you
can control it in the light_source instead.  Just add the jitter, adaptive
'n', orient and/or circular keywords as needed to each light_source after
invoking the macro.

-tgq


Post a reply to this message

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