Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to show day & night in WPF on a sphere (Earth)?

$
0
0

Experts,

I'm starting WPF, and have this requirement for a software interface...

A sphere, with earth on it, but show day & night views. Night views like this: http://www.google.com/gadgets/directory?synd=earth&id=703857012153 are fine... The issue is, how can I use 2 images for this? (Assumes this is the solution)

As I read Pro WPF 4.5 in VB.NET, I see that I can use transparencies, or 'masks' to only show one portion of the image on the sphere. This makes me think that I could use (correct me if I'm wrong) 2 images (one on top of the other), and I would just have to adjust periodically (once an hour is fine) the portion of the 'top' image to make transparent. Right?

And then, make a transition to the transparent of what would be the equivalent of, say, an hour (15degrees). Am I on the right track? The bottom image is fine just sitting there.

Now the finished product will have me putting primitives, like cubes, on the surface in specific Lat & Lon points, like over Paris, France. The primitive would 'rotate' along with the sphere, so day or night, you'd see that cube on Paris.

Do I need to make 24 images in Photoshop to show each transition, and then just change the images when the (wall clock) time is right?

To tell the truth, that would kind of suck... I cold have a light positioned at the actual angle of the sun from the sphere, and I could make use of the date to adjust for the diurnal rotation of the earth, whereby the line between night & day is not on a single line of longitude all year.

Example:

You see how the transition isn't straight up & down? You see, I can't make PS images to compensate for this... If I did, that would be 365 images... But wait! There would be 24 hours/day... 8,760 images! Well, maybe not that many to make it 'realistic'...

If I could do it in software, the system would figure out where the lines should be for me, and the sun is simple by comparison...

Thoughts? :)

TIA!

pat :)


"I used to think you were a swell guy. Well, to be honest, I thought you were an imbecile. But then I figured out you WERE a swell guy... A little slow, maybe, but a swell guy. Well, maybe you're not so slow, But you're not so swell either. And it looks like you're an imbecile after all!" - Amy Archer (The Hudsucker Proxy)


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>