comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Overplot nice looking globe on 2d satellite images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Overplot nice looking globe on 2d satellite images [message #52294 is a reply to message #52293] Mon, 29 January 2007 09:02 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
David Fanning wrote:
> Brian Larsen writes:
>
>> I imagine this is not too hard but I haven't been able to figure it
>> out. What I want to do is in the center of a polar contour plot
>> overplot a nice looking globe that can be turned and tilted to the
>> correct perspective and shaded to show where the sun is.
>
> In my experience, any map projection that overlaps the pole
> and includes the sun is trouble:
>
> http://www.dfanning.com/map_tips/terminator.html
>
> But maybe this is because I don't understand spherical
> geometry worth a damn. :-)

I've just taken a quick look at that code. My initial impression is
that you shouldn't have a problem if you check whether a give point is
inside or outside the terminator polygon, by performing the check in
projection coordinates, rather than latitude/longitude. However, that
depends upon the details of the Inside() subroutine, about which I
know nothing that isn't implied by it's name.

Another, more direct approach is possible. Convert both the ground
location and the sub-solar location into unit vectors in earth-
centered rotating coordinates (if you want to take into consideration
the fact that the earth isn't perfectly spherical, the equations get
more complicated):

<cos(lat)*cos(lon), cos(lat)*sin(lon), sin(lat)>

There are many different definitions of the day/night distinction,
depending upon whether you want nightfall to occur when the center of
the sun is on the horizon, or when the entire sun is below the
horizon. It also depends upon whether you want to use the geometric
position of the sun, or the shifted position due to atmospheric
refraction. All of these issues can be covered by choosing a suitable
value for the terminator_angle, the angle between the sun's position
and the terminator; if you're using the center of the sun with no
correction for refraction, the terminator_angle should be pi/2
radians, or 90 degrees..

If the dot product of the ground position unit vector and the sub-
solar point's unit vector is greater than cos(terminator_angle), then
the ground position is on the day side of the terminator. If it's
less, then it's on the night side.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: plotting Ascii in bitmap
Next Topic: Annoying message about X11 Resources on Solaris.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 20:27:43 PDT 2025

Total time taken to generate the page: 0.23933 seconds