Posted :
9/25/2008 7:50:00 AM
by Matthieu Laban
Category :
.NET
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!
|
Posted :
8/25/2008 8:32:00 AM
by Matthieu Laban
Category :
.NET
I've had this idea in my mind for the past few months. Showing my most recent tweets on this website in a small silverlight widget. (More info about Twitter here)
This is now done :-) (check on the left column)
I ran into some issues coding this though... but nothing too painful. The whole design+dev took about 2 hours.
Biggest issue was dealing with the fact that I didn't want to expose my username/password to the silverlight widget. The Twitter api requires user authentication to retrieve one's tweets, even though they are public... Having the password stored somewhere in the .xap file was completely out of the question!
The second issue is that I figured I'd probably run into cross domain issues if I talked directly with the twitter api...
To bypass these restrictions, I created a simple WebService that knows my credentials. This WebService returns an xml string containing my latest tweets. The Silverlight widget queries the WebService and then retreives the data by a few Linq queries.
I forgot to mention the part where I actually had to show the control on the page... Since I hate html+css this is always a painful part... but it works now, and I'm happy!
Silverlight Rocks!
|
Posted :
7/2/2008 7:28:00 AM
by Matthieu Laban
Category :
.NET
Tonight I played a but with an open source silverlight project called DeepEarth. It's basically a Silverlight implementation of Microsoft Virtual Earth. It has smooth scrolling and panning and blending between different layers.
They have a live demo up here.
Of course, having tons of flight tracks handy, I thought I would add the functionnality to show them. The project doesn't currently support dynamic objects besides simple pins. But the code is clear enough, adding new features was extremely easy...
I added a simple line drawer with an open dialog to import a track file coming from my GPS Tracker.
Here's the result for a touch a go practice at Oakland last year. :)

I have some ideas about what to do with this... we'll see how it goes ;-)
|
Posted :
3/7/2008 9:12:00 AM
by Matthieu Laban
Category :
.NET
Silverlight 2.0 Beta 1 was released on Wednesday and I've had some time to play with it. I coded two application, one that connects to my website and retreive all the comments posted by my fellow readers, and another more amusing one, a small minigame...

Click on the image to get to the game page! (Silverlight Beta1 can be installed from the game page, it's a really compact download and quick install)
I've included the source code. It might not be super optimized, super smart, super kewl... but somebody might find it useful...
Click here to download the source code
If you are a silverlight guru and know a better silverlighty way of doing things better that how I did, let me know! :)
|
Posted :
3/1/2008 5:53:00 PM
by Matthieu Laban
Category :
.NET
Silverlight 2 is coming... this is my dream come true... create desktop like experience in my favorite managed language, but on the web! (and cross platform!)
Beta 1 will be released next week during Mix08 in Las Vegas!
Scott Guthrie has a list of tutorials to demonstrate how to create a simple silverlight widget that connects to the Digg.com webservice.
I'm really impatient to try this new beta! I played with 1.0 and 1.1 but it was too javascipty for me and there was pretty much no support for built in controls. Silverlight 2 will come with a list of controls like buttons, lists, progress bars, images, video controls and even a datagrid (!), which is just what I need! (Hello Linq Queries!!)
This will be the opportunity to re-do the FSP's website draft which lead to the rant post about html last month... let's hope Silverlight helps me out with this!
|
Posted :
1/22/2008 9:48:00 AM
by Matthieu Laban
Category :
.NET
...because it requires a logic I don't have hard wired in my brain...
With all the rendering differences there are between IE and Firefox, I wonder how there are still webmasters that have not gone completely nuts... It must be taking some serious self control not to send hate mail to both the IE and Firefox developers...
Perhaps the web browsing world is so sketchy because the html and css specs were developed with absolute ignorance of their implementation... (kinda like Collada) and now web browser developers are having a really hard time to make one 100px wide table look the same everywhere...
I'm no longer partisan of one or the other... I don't care... :-)
And there are some concepts in css that even after a few attempts, I still don't get... thing that given their name, you would expect to do things that they don't actually do... or maybe they do... but only in IE, not Firefox, or vice versa...
What a nightmare...
This is why I'm impatient to start playing Silverlight 2.0... in the world where an element that is 100px wide WILL be 100px wide regardless of the freaking browser it's displayed in! And most importantly, where coding in C# in a browser will finally be real!
However, the downside of a full silverlight website will be that google won't probably index the content... and that some users using shady browsers/OS won't be able to see it...
</rant> :-)
|
Posted :
5/18/2007 4:33:00 PM
by Matthieu Laban
Category :
.NET
I just posted a set of pictures of two of our recent excursions. One of them took us to Petaluma Airport, in the Sonoma Valley.
The flight part was cool, flying over the maring layer during the Class B transition was pretty awesome... I think that's the first time I flew over San Francisco without even seeing the Golden Gate Bridge as it was completely covered in clouds :)
Second one was our day road trip to Santa Cruz and Half Moon Bay. We headed to Santa Cruz for lunch. We had already been there but only one the beach... this time we wanted to walk downtown. I gotta say, downtown Santa Cruz is way better than the beach. It has a lot of stores and Julie could find lots of stuff she couldn't find in Santa Clara. We'll definitely come back.
After lunch, we headed north on Highway 1 to Half Moon Bay. It was a nice ride, the marine layer had decided to stay off the coast this day so sky was perfectly blue! Although, the wind was coming from the ocean, and it was darn cold (14c on the shore, while it was 23c in Santa Clara on the other side of the mountain).
We stopped in Half Moon Bay and bought fresh fish at the fish market... We heard good things about this market, that's why we went... but we didn't find the fish that great... Defintely not a place we'll go back to for our fresh fish... We'll go back to our good old Menlo Park fish market !
Galleries:
|
Posted :
5/10/2007 5:05:00 PM
by Matthieu Laban
Category :
.NET
Last week end, I started implementing runway markings by spending an evening reading the specs for runway markings that are available on the FAA website. It's amazing how detailed these specs are. They specify all distances between everything and everything, the types of markings based on runway approach and such... Of course, I'm planning on sticking to these specs as much as possible, which is not going to be easy...
So far, I added the high end runway numbers... It works but I'm not entrely satisfied with the way it's coded... I made a big texture with the numbers and apply it automatically on quads placed just above the runway texture... The hard part was placing it according to what the FAA says... but I managed to make it work and here's the result.
Of course, these numbers use the same shader, so they are lit by the landing light, which is very kewl at night!
|
Posted :
1/27/2007 8:46:00 PM
by Matthieu Laban
Category :
.NET
After a long period of internet silence, my brother Jerome is blogging again.
Check out his website at www.jaylee.org
He'll be blogging about .NET, random stuff, and soon about Canada ;-)
|
Posted :
11/8/2005 7:09:00 PM
by Matthieu Laban
Category :
.NET
I wanted to add a program to the list of the little application I abandonned as soon as too many bug showed up...
This time it's a task manager for windows mobile 5.0. It lists processes and enables you to kill the selected process. The cool thing about it is that it can be hidden and showed via a tray icon in the lower part of the today screen.
I did this because of the stupid task managing system of Windows Mobile Operating systems ... (yeah yeah, I know, It's a clever OS, it kills the tasks whenever it sees I'm not using them anymore ... yeah ok ... when has that ever happened anyways !?)
I can't say really much more, Proppy is harrassing me to work on something else ...
Download
Shots :
![[TaskManager]](http://blogs.labtech.epitech.net/photos/matt/images/9148/236x375.aspx) Main Application Window ![[TaskManager]](http://blogs.labtech.epitech.net/photos/matt/images/9147/239x375.aspx) Close the app, and it minimizes to the Tray
Happy Landings !
|