Archive for May, 2008

Mars Altimetery Graph // ver A

Friday, May 30th, 2008

Code of Mars Altimetery Graph
download the sketch—view the code

What is it?
I thought it might help me figure out the MEGDR Viewer if I looked at the same data in a different way. This sketch is meant to render an area graph of Mars altimetry data. It is written to run in basic mode since it is meant to render one image and there is no interactivity. But… it doesn’t work. I either get a file not accessible error on the loadBytes line, or the drawing window simply never pops up. Maybe I’m being too impatient and I should let it run overnight. But even if that is the case, something must still be wrong with my code because this shouldn’t be that hard for the computer.

Mars Global Surveyor: MEGDR Viewer // ver D

Thursday, May 29th, 2008

Mars Global Surveyor: MEGDR Viewer// ver D
run the sketch—view the code—download

How do you use it?
Press any key to switch between the color and grayscale rendering of the data file.

What is it?
The continuation of version C. Because these were the first images I saw, I was mistakenly assuming there was color information in the data file. So all of my attempts to extract RGB values from the data were pointless.

Mars Global Surveyor: MEGDR Viewer // ver C

Wednesday, May 28th, 2008

Mars Global Surveyor: MEGDR Viewer// ver C
run the sketch—view the code

How do you use it?
Move the mouse up and down to adjust the color offset.

What is it?
This is an interactive version of Monday’s sketch. It’s another attempt at rendering an image from a Mars Orbiter Laser Altimetry data file. It’s also confounding, infuriating, and not working. I can’t quite get my head wrapped around the bitwise operations and the bitmasking. It’s getting a wider range of colors, and it’s revealing more detail in the image, but I don’t understand why the colors aren’t smooth.

Line Graph Prototype // ver A

Tuesday, May 27th, 2008

Line Graph Prototype // ver A
run the sketch—view the code

How do you use it?
Move the mouse around and dissect the code.
What is it?
A tool for creating point or line graphs.

Mars Global Surveyor: MEGDR Viewer // ver B

Monday, May 26th, 2008

My Mars topography mine Their Mars topography theirs
download the sketch folder—view the code

How do you use it?
You have to tinker directly with the code to make this do anything.
This one doesn’t run in continuous mode and it isn’t interactive so there is no link to run it in the browser. Also, it processes a 2MB data file so it would be ridiculously slow to download an run it as an applet.

What is it?
As I mentioned yesterday, I’m geeking-out about Mars right now. I was surfing around some NASA and JPL web sites looking for more digital elevation maps and found a lot of data from the Mars Orbiter Laser Altimeter. This is an instrument on the Mars Global Surveyor craft that mapped the Red Planet from 1999 to 2006. Unlike the false-color topographic map I used in yesterday’s sketch, these new files I found are NOT images. They are data files that need to be rendered into images with special visualization software. Unfortunately—or perhaps, fortunately—I couldn’t find an OS X version of any of these software packages. So I thought (encouraged by Ben Fry’s Visualizing Data book), “I bet I can write something in Processing that could view these files.” Well, it’s been a long night, I’m not sure exactly how it works, and it sure ain’t perfect, but I’ve got something. The sketch reads the altitude data from the .img files, parses that into the pixel array and displays the resulting image.

If you run this yourself, be prepared, the image size is 1440 x 720 pixels.

Why is it cool?
There are so many reasons… but one thing that really shocked me is that it’s only 9 lines of code.

Martian Terrain

Sunday, May 25th, 2008

_20080525_MOLA_a1
run the sketch—view the code

How do you use it?
Move the mouse up and down or hit the UP and DOWN arrows to zoom in and out.
What is it?
NASA’s Phoenix probe is landing on Mars tonight! Using some laser altimetry data I created this 3-D model of the Martian terrain.

Our new Indy Car team

Saturday, May 24th, 2008

Green Zebra Racing
run the sketch—view the code

How do you use it?
Move the mouse up and down to hit the gas!

What is it?
Just a fun little diversion because, hey, Indy is tomorrow!!! It’s for() loop generating some random colors underneath a PNG-24 with transparency. The car design was done for the imaginary world where my alter ego (as humble letterpress printer for Armato Design & Press) owns an Indy Car team, Green Zebra Racing.

Why is it Cool?
It turns out that A) I’m a geek, B) I’m a big racing fan, and C) you can download EPS templates of Indy Cars.