POV-Ray : Newsgroups : povray.newusers : sunpos.inc : Re: sunpos.inc Server Time
2 Nov 2024 15:25:26 EDT (-0400)
  Re: sunpos.inc  
From: Hughes, B 
Date: 17 Jan 2004 09:12:12
Message: <400942bc$1@news.povray.org>
"Stephen" <pen### [at] shawca> wrote in message
news:40093609$1@news.povray.org...
> I'm wondering if someone has become an expert on the SUNPOS.inc and could
> shed a bit of clarification on its use as I'm a bit confused.
> I have read the reference material which is quite comprehensive, and now
I'm
> looking for the "Dummies Guide".
>
> I rendered an "earth" with equator and latitudes and longtitudes and
placed
> a bump on it for my city (Calgary, Canada) which is roughly the same
> latitude as Greenwich, except -7 time zones (longtitudes).  I can never
get
> the sun to be positioned where I would expect it, specifically
> 1) over the  Equator on March and Sept 21
> 2) over the Tropic of Cancer June 21
> 3) over the Tropic of Capricorn Dec 21
>
> If I rotate the earth by  rotate x*23.5 which is the declination of this
> rock, the apparent position of the sun changes accordingly, but again
> nothing lines up.
> I'll happily share the source but I'll have to clean it up a bit first.
>
> I'm wondering if someone has already explored this field recently.

I had some trouble getting it right too, as recently as September when I
used it in the model of my homeplace here to check out solar-lighting, and a
planned new roof and vinyl siding.

Looking at that file, it includes sunpos.inc for the macro SunPos(). The
Lstm parameter is what you probably need adjusted, and that was what I had
trouble with. Here, my longitude is set to -86.75. The Lstm is -93, or -6.25
degrees from this longitude. That's because I'm near the time zone line and
the middle of my time zone is farther west. I ended up guessing this amount
of shift needed, based on what I knew of real sunrise and what the rendering
showed, simply because I'm on a NE facing hill too and wanted the sunrise to
look right.

Since each hour is supposed to be 15 degrees you can see how it turns out
for mine. 7.5 degrees from center leads to each TZ boundary (loosely
speaking), so I'm just 1.25 degrees from the ET and CT zone borderline here.
 A quick check of the map, and yes, I'm about 1.25 degrees from there
actually. So that's probably what I had done at the time, checked my maps to
see how many degrees I am away from the central "local" meridian.

So, hopefully that's all you're needing to do too, getting the local
meridian adjusted for correctly. But be careful about elevations not being
considered since, esp. for sunrise and sunset, terrain won't be considered.

As to rotating the sphere... I don't think you should be needing to make
changes to it other than allowing the SunPos() macro to do its job. Please
reply back with any success story, in case I am right (or wrong).

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

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