POV-Ray : Newsgroups : povray.general : Finding exact position after translating and rotating... : Re: Finding exact position after translating and rotating... Server Time
12 Aug 2024 23:15:38 EDT (-0400)
  Re: Finding exact position after translating and rotating...  
From: Jerry Anning
Date: 18 Dec 1998 22:53:52
Message: <367B235D.3A7E8FA3@dhol.com>

> 
> I use sunpos.inc for lighting. The position of the sun is calculated in one
> direction and then translated and rotated by an equation. How can I find the
> exact position of the sun for effect_location variable, which is used by the
> popular lnsefcts.inc?
> 
> Istvan

Add the following line to sunpos.inc immediately before the #end:

#declare Sunloc = vrotate(<0, 0, 1000000000>, <-Al, Az, 0>;

This will cause the macro to put the Sun's location into the global
variable Sunloc, enabling you to use it as you wish (e.g. #declare
effect_location = Sunloc;)  It will not change the function of
sunpos.inc in any other way.


Post a reply to this message

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