Wiirtual.Earth – A WPF Virtual Earth 3D Experiment … featuring the Nintendo WII Mote

Disclaimer: this is a hack, an experiment, not a finished application – no guarantees are given and the code is probably pretty horrible. It might max out your computer or break something, so use this at your own risk. Also, be sure to check out the great work of the poeple whose projects/source code I have used and studied to build this. Also, make sure to read the setup instructions before you start.

I have been digging deep into Virtual Earth recently – and the more I play with it, the more excited I get. I am especially intrigued with Virtual Earth 3D and have built a little project that pulls Virtual Earth into a WPF desktop application just to see what can be done with it. Well, I am proud to post this very first version of my little application up here. I have also demo’ed this application at Microsoft events in several countries and it seems that people like it …

In a nutshell, here is what it does:

  • Pretty WPF UI.
  • Virtual Earth 3D in a WPF application – using this code.
  • Control Virtual Earth properties from WPF via WPF data binding and UI.
  • Get VE info and bind it to WPF UI elements.
  • Pull in data into VE (GeoRSS, KML, Live collections, plain XML, Wikipedia, Flickr).
  • Control VE with a WIIMote (WIIMote acceleration sensors) – using Brian Peeks WIIMoteLib.
  • Control VE with the WII Balance Board – using Brian Peeks WIIMoteLib.
  • Win32 > WPF interop for mouse and keyboard.

All in all it is a pretty cool project but since I am not a developer undoubtedly there is a lot of crappy spaghetti code in there. I wrote it for a demo as an experiment. Anyways, if somebody has some comments, hints or can use this code, any feedback would be greatly appreciated! I am planning to turn this app into a series of WPF tutorials soon. In the meantime, here are the setup instructions (very important to follow those, otherwise it won’t work correctly or even start!), here is the executable (for Windows) and here is the source code. If you want to know what you can do with this app, read this quick intro document first.



A trip down memory lane …

Back in the late 80s/early 90s I was heavily into bulletin board systems – I fondly remember sitting in front of my green screen monitor, waiting for the 1200 baud modem to connect to the local bbs to read the latest gossip. Ah, those were the days I tell you. Anyway, there is a great site out there where a large number of the text files that were residing on these bbs’s have been preserved and moved into the internet age … so if you fancy a quick stroll down memory lane, head over to http://www.textfiles.com and browse away! There is everything, from message bases to jokes and also free text ebooks which are quite enjoyable. Here are some of my favorites:


Movies I like: Pirates of Silicon Valley


I collect old computers. I have a fairly large collection of 80s machines and I like to tinker with them now and then. Mostly, this is because I grew up with these things and I still enjoy playing one of these 80s games on the real machine as opposed to an emulator. Dead knowledge for sure, but fun it is …

Apart from fiddling with the machines, I also like to read books and watch movies about the rise of the personal computer. Boring, you think? Not quite – there is a lot of drama in these stories. I will post a reading list some time in the future, but for now let me tell you about a movie called Pirates of Silicon Valley. From Wikipedia:

Pirates of Silicon Valley (1999) is an unauthorized made-for-television docudrama written and directed by Martyn Burke. Based on the book Fire in the Valley: The Making of The Personal Computer by Paul Freiberger and Michael Swaine, this film documents the rise of the home computer (personal computer) through the rivalry between Apple Computer (Apple II and the Apple Macintosh) and Microsoft (MITS Altair, MS-DOS, IBM PC, and Windows).

The central story of the film begins in the early 1970s and ends with a birthday toast in 1985 to Steve Jobs shortly before he was fired by CEO John Sculley from Apple Computer.

This is a truly entertaining flick that at the same time gives a pretty good overview of the rise of both Apple and Microsoft. As movies go, the main personalities (Bill Gates and Steve Jobs) are pretty cliche, but it is very entertaining nevertheless. Sadly it is only available on DVD in the US but you can order it through Amazon. Also, the book this is based on is a great read as well – I might post a review later …


Geeky: the BusBike

Something completely different for today: apparently, there is a bus line in Rio de Janeiro that is equipped with exercise bikes – so you can take the bus to work and exercise at the same time … the site is in Spanish, but take a look at the pictures & video: http://www.busbike.com.br/fotos_curso.htm.

And in case you are wondering: the bus itself is powered by a gasoline engine …


Books I read: Douglas Coupland, jPod

jPod - Book Cover

Some time ago I read Douglas Coupland’s novel Microserfs. It did not quite resonate with me – most likely, I guess, because I could not really connect with the guys portrayed in that book. Last week, I was browsing the airport bookstore at Heathrow and I came across his newest book – jPod. I bought it, and I have to say it is quite hard to put down – very funny stuff. Mostly because if you live in this age and time and are at least a bit a geek and aware of what is happening right now in the technological space then you will recognize quite a lot of the references in the book as being present in your own life as well …

Here is an excerpt from the Amazon.com page:

Young Ethan Jarlewski works long hours as a video-game developer in Vancouver, surfing the Internet for gore sites and having random conversations with co-workers on JPod, the cubicle hive where he works, where everyone’s last name begins with J. Before Ethan can please the bosses and the marketing department (they want a turtle, based on a reality TV host, inserted into the game Ethan’s been working on for months) or win the heart of co-worker Kaitlin, Ethan must help his mom bury a biker she’s electrocuted in the family basement which houses her marijuana farm; give his dad, an actor desperately longing for a speaking part, yet another pep talk; feed the 20 illegal Chinese immigrants his brother has temporarily stored in Ethan’s apartment; and pass downtime by trying to find a wrong digit in the first 100,000 places (printed on pages 383–406) of pi. Coupland’s cultural name-dropping is predictable (Ikea, the Drudge Report, etc.), as is the device of bringing in a fictional Douglas Coupland to save Ethan’s day more than once. But like an ace computer coder loaded up on junk food at 4 a.m., Coupland derives his satirical, spirited humor’s energy from the silly, strung-together plot and thin characters.

Definitively a thumbs-up … take a look!
Here is the link to the Amazon page …