POV-Ray : Newsgroups : povray.advanced-users : sunpos.inc Server Time: 27 Sep 2020 20:32:59 GMT
 sunpos.inc (Message 1 to 6 of 6)
 From: Mike Horvath Subject: sunpos.inc Date: 6 Mar 2018 14: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
```
 From: jr Subject: Re: sunpos.inc Date: 6 Mar 2018 16: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.
```
 From: Bald Eagle Subject: Re: sunpos.inc Date: 6 Mar 2018 18:00:01 Message:
```Here's what I used for my watch/compass scene

#declare Feet = 12;
#declare Miles = 5280*Feet;
#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>'
```
 From: Mike Horvath Subject: Re: sunpos.inc Date: 6 Mar 2018 22: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;
> #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
```
 From: Mike Horvath Subject: Re: sunpos.inc Date: 6 Mar 2018 22: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
```
 From: Alain Subject: Re: sunpos.inc Date: 7 Mar 2018 02: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}
```