Ivo wrote:

> Thanks Jeremy, these techniques certainly come into play, but I think at the

> moment these are details compared to the bit in your comment block. What is

> the arithmetic? The sinus moves horizontally around the map every 24 hours,

> but it moves vertically every 365 days, changing shape all the time. Do we

> need that many images? I hadn't really thought about the transparancy

> problem, a plain dark area would be good enough for me, as long as every two

> or three pixels (hunderds of miles on the map) is accounted for. You can

> fake transparancy and oval shapes by plotting pixels, but there must a

> formula.

> Regards,

> Ivo

>

>
It changes shape? It moves vertically?

I was looking at this site

http://www.time.gov/timezone.cgi?Pacific/d/-8/java - which seems to do

what you're trying to do, only in the form of a Java applet. The image

they use seems pretty static to me, but maybe I'm wrong. Or, maybe you

need a more precise graph.

In any case, if it's just the math you're after, you might want to

additionally ask in a math or physics group.

The math you need actually depends on what method was used to project

your world map. You'll need to come up with a function that maps the

time of day to a three dimensional unit vector that points from the

center of the earth to the sun. Then you'll need to use the same

projection function as your world map (it's probably either a

cylindrical projection or a spherical projection) to project the

intersection of the plane defined by that vector with the orb of the

earth into a curve. That is, if you want to be really precise about it.

See, if you're not taking seasons into account, you can come up with a

good approximation using a static projection that moves horizontally.

Just use a world map that's projected onto the sun's viewing plane,

rather than a polar axis-aligned viewing plane. I think this is what

time.gov does, only they chop off equal amounts from the bottom and top

so that you don't notice that the north pole is larger than the south

pole in their projection (because you can see neither of them). Your

map may look a little "askew", but will not be any less of an accurate

representation.

Jeremy