POV-Ray : Newsgroups : povray.advanced-users : sunpos.inc Server Time
28 Mar 2024 09:31:13 EDT (-0400)
  sunpos.inc (Message 1 to 6 of 6)  
From: Mike Horvath
Subject: sunpos.inc
Date: 6 Mar 2018 09:29:25
Message: <5a9ea5c5$1@news.povray.org>
How do I figure out the Lstm value for this macro?

// Lstm:  Meridian of your local timezone (+1 hour =  +15 deg)
//        in degrees (east = positive, west = negative)

I am in UTC−05:00.

Thanks!


Mike


Post a reply to this message

From: jr
Subject: Re: sunpos.inc
Date: 6 Mar 2018 11:06:42
Message: <5a9ebc92$1@news.povray.org>
hi,

On 06/03/2018 14:29, Mike Horvath wrote:
> How do I figure out the Lstm value for this macro?
> // Lstm:  Meridian of your local timezone (+1 hour =  +15 deg)
> //        in degrees (east = positive, west = negative)
> I am in UTC−05:00.> Thanks!
> Mike

being naive, I'd use 5 * 15, and subtract if in the US of A.

regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: sunpos.inc
Date: 6 Mar 2018 13:00:01
Message: <web.5a9ed70d9d3ded52c437ac910@news.povray.org>
Here's what I used for my watch/compass scene

#declare Feet = 12;
#declare Miles = 5280*Feet;
// radius of Earth
#declare EarthRad = 3959*Miles;
#declare SunRad = 432288*Miles;
#declare SunDist = 92960000*Miles;

#declare SunCorrection = SunDist/1000000000; // correct distance to sun defined
in sunpos.inc

//#####################################

// North +z
// South -z
// East +x
// West -x



#declare Year = 2016;
#declare Month = 7;
#declare Day = 11;
#declare Hour = int(clock);  // 24-hour clock
#declare Minute = (clock-int(clock))*60;
// (UTC-05:00) Eastern Time (US & Canada)
// (+1 hour =  +15 deg)
#declare Lstm = 15*(-5);
// Hopkinton / Contoocook, NH
#declare LAT = 43.2087409;
#declare LONG = -71.7123404;

light_source {SunPos(Year, Month, Day, Hour, Minute, Lstm, LAT,
LONG)*SunCorrection rgb <1, 1, 0> parallel point_at <0, 0, 0>} // added
'parallel' and 'point_at <0, 0, 0>'


Post a reply to this message

From: Mike Horvath
Subject: Re: sunpos.inc
Date: 6 Mar 2018 17:39:56
Message: <5a9f18bc$1@news.povray.org>
On 3/6/2018 12:59 PM, Bald Eagle wrote:
> Here's what I used for my watch/compass scene
> 
> #declare Feet = 12;
> #declare Miles = 5280*Feet;
> // radius of Earth
> #declare EarthRad = 3959*Miles;
> #declare SunRad = 432288*Miles;
> #declare SunDist = 92960000*Miles;
> 
> #declare SunCorrection = SunDist/1000000000; // correct distance to sun defined
> in sunpos.inc
> 
> //#####################################
> 
> // North +z
> // South -z
> // East +x
> // West -x
> 
> 
> 
> #declare Year = 2016;
> #declare Month = 7;
> #declare Day = 11;
> #declare Hour = int(clock);  // 24-hour clock
> #declare Minute = (clock-int(clock))*60;
> // (UTC-05:00) Eastern Time (US & Canada)
> // (+1 hour =  +15 deg)
> #declare Lstm = 15*(-5);
> // Hopkinton / Contoocook, NH
> #declare LAT = 43.2087409;
> #declare LONG = -71.7123404;
> 
> light_source {SunPos(Year, Month, Day, Hour, Minute, Lstm, LAT,
> LONG)*SunCorrection rgb <1, 1, 0> parallel point_at <0, 0, 0>} // added
> 'parallel' and 'point_at <0, 0, 0>'
> 
> 


Very good, thanks!

Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: sunpos.inc
Date: 6 Mar 2018 17:44:37
Message: <5a9f19d5$1@news.povray.org>
Have you calculated how big the sun should appear in the sky? I'm also 
hesitant to use an area light, because my scene is already slow.


Mike


Post a reply to this message

From: Alain
Subject: Re: sunpos.inc
Date: 6 Mar 2018 21:30:59
Message: <5a9f4ee3@news.povray.org>
Le 18-03-06 à 17:44, Mike Horvath a écrit :
> Have you calculated how big the sun should appear in the sky? I'm also 
> hesitant to use an area light, because my scene is already slow.
> 
> 
> Mike

Use about 1% of the distance that you use.
So, if the "Sun" is located 10000 units away, it should be 100 units in 
diameter.
As this is relatively small relative to the distance and general scale 
of the scene, start by using adaptive 0. This greatly improve the speed 
when using area_light.
ONLY increase that if you get artefacts that you can't hide.
In some cases, you can elliminate some artefacts just by rotating the 
light around the axis from <0,0,0> and the light's location.
Easy when the light is located on an axis and the array is set 
perpendicular to it : Rotate around that axis, then rotate to the 
desired location.

light_source{<0,0,-10000> rgb 1 area_light x,y 33 33 circular adaptive 0 
rotate 15*z}


Post a reply to this message

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