POV-Ray : Newsgroups : povray.newusers : sunpos.inc Server Time
2 Nov 2024 17:18:13 EDT (-0400)
  sunpos.inc (Message 1 to 6 of 6)  
From: Stephen
Subject: sunpos.inc
Date: 17 Jan 2004 08:18:01
Message: <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.
-- 

Stephen


Post a reply to this message

From: Hughes, B 
Subject: Re: sunpos.inc
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

From: John Oliver
Subject: Re: sunpos.inc
Date: 17 Jan 2004 10:15:30
Message: <40095192$1@news.povray.org>
Stephen wrote:
> 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.

Have you been careful about the input values?
Your inputs for the vernal equinox would be something like
SunPos(2004, 3, 21, 12, 0, -105, +51, -114)


Post a reply to this message

From: ingo
Subject: Re: sunpos.inc
Date: 17 Jan 2004 10:43:39
Message: <Xns9473AA297AA05seed7@netplex.aussie.org>
in news:40093609$1@news.povray.org Stephen wrote:

> I can never get
> the sun to be positioned where I would expect it, specifically
> 1) over the  Equator on March and Sept 21
> 
Try the following values in sundail.pov in the ..\scenes\incdemo\ 
directory of the standard distribution.

#declare Year= 2004;
#declare Month= 3;
#declare Day= 21;
#declare Hour= 12;
#declare Minute= 0;
#declare Lstm= -7*15;
#declare LONG= -114;
#declare LAT= 51;

The fact that the dial doesn't show exactly 12 is because of your 
distance from the meridian that is used for your clock time and by the 
fact that the earth 'wobbles' around the sun. So its highest point on a 
day is never on the same place in the sky. 
See http://www.uwm.edu/~kahl/Images/Weather/Other/analemma.html
Bob may have been overrcorrecting the Lstm for this fact.

Regarding aligning the earth. You should rotate and translate it in such 
a way that the Calgary bump is on the origin and in the x-z-plane.

Ingo


Post a reply to this message

From: Stephen
Subject: Re: sunpos.inc
Date: 19 Jan 2004 00:23:11
Message: <400b69bf$1@news.povray.org>
Thanks for the feedback and advice. It looks like I was confusicated as to
which way was up.
If you stand on the earth and build a house, then 'up' is, well, UP, in the
Y direction.  I built a planet and wasn't so sure where it's orientation
should be from there, i.e. 'up' could be straight up or North, or well...
that's when it all went south, so to speak.

Ingo clarified this with
 > Regarding aligning the earth. You should rotate and translate it in such
> a way that the Calgary bump (house or city) is on the origin and in the
x-z-plane.

and therefore UP or Y is into the atmosphere.

I'm working on an animation of the sunposition against our house for various
plans. At 51 degrees North Latitude, the shortest day of the year is sunny
from about 9AM to 4PM, or a bit later if you're outstanding in your field
without obstructions.

I think it's working now!

-- 

Stephen


"ingo" <ing### [at] tagpovrayorg> wrote in message
news:Xns### [at] netplexaussieorg...
> in news:40093609$1@news.povray.org Stephen wrote:
>
> > I can never get
> > the sun to be positioned where I would expect it, specifically
> > 1) over the  Equator on March and Sept 21
> >
> Try the following values in sundail.pov in the ..\scenes\incdemo\
> directory of the standard distribution.
>
> #declare Year= 2004;
> #declare Month= 3;
> #declare Day= 21;
> #declare Hour= 12;
> #declare Minute= 0;
> #declare Lstm= -7*15;
> #declare LONG= -114;
> #declare LAT= 51;
>
> The fact that the dial doesn't show exactly 12 is because of your
> distance from the meridian that is used for your clock time and by the
> fact that the earth 'wobbles' around the sun. So its highest point on a
> day is never on the same place in the sky.
> See http://www.uwm.edu/~kahl/Images/Weather/Other/analemma.html
> Bob may have been overrcorrecting the Lstm for this fact.
>
> Regarding aligning the earth. You should rotate and translate it in such
> a way that the Calgary bump is on the origin and in the x-z-plane.
>
> Ingo


Post a reply to this message

From: Dan P
Subject: Re: sunpos.inc
Date: 19 Jan 2004 19:30:15
Message: <400c7697@news.povray.org>
"Stephen" <pen### [at] shawca> wrote in message
news:400b69bf$1@news.povray.org...
<snip>
> I'm working on an animation of the sunposition against our house for
various
> plans. At 51 degrees North Latitude, the shortest day of the year is sunny
> from about 9AM to 4PM, or a bit later if you're outstanding in your field
> without obstructions.

Very cool idea!!!


Post a reply to this message

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