Matthieu LABAN
.NET, My Life, Flight Simulation and Real Flight...

 
About Me :
25 Years old developer and aviation
enthusiast living in Santa Clara, California.
View Matthieu Laban's profile on LinkedIn 
Contact me at :
mlaban at gmail dot com


Photo & Video Galleries:
- Gallery List
- Flight Videos
Resume :
e-mail me to get my latest résumé
3D Graphics With Silverlight 

I've been playing with Silverlight lately, and there was one thing I wanted to try for a long time... Displaying my flight tracks in real time 3D with Silverlight.

There is a pretty advanced 3D engine on Codeplex called Kit3D that does 3D graphics with Silverlight the same way WPF 3D works.
I used this library to display the GPX tracks. I had to add lighting as the current version on codeplex doesn't support it.
The code is pretty clean and easy to understand, so it was quick to add reasonably fast lighting calculation (for one directional light only)

To make this thing a bit more useful, I added the possibility to load 3D terrain underneath the GPX track!
Bear in mind, the resolution of the terrain is pretty limited. Right now, it's hard coded to a 20x20 grid for whatever the gpx area covers. I tried increasing it to 50x50 but it starts to get a bit slow, and retrieving the elevation data for that much points (2600+) takes quite some time...

For those who want to know how I got the elevation data, I did this using Geonames.org which has nice web services for all kinds of world positioning related things.

There is a link to a live demo below.
For those of you without GPX files handy, I added a link to a sample GPX file that came from a flight I did with Joost, the founder of Everytrail.com quite some time ago. It was a flight from Palo Alto to San Carlos, Hollister and back to Palo Alto.
Everytrail.com has tons of other GPX files available for download. If you want more test data, do not hesitate to visit the website!

Live demo!

Comments List :
nice, how about zooming support?

>> unruledboy

Have you tried mousewheel? It should work. What browser were you using?



IE and Firefox - Cant run it... Just me?

 
Post a comment :
Name
Email
URL
What's 2x3?
Comment