Archive for the 'Experiments' Category

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.

Dynamic Mask // ver A

Wednesday, May 21st, 2008

_20080521_dynamicMask_a
run the sketch—view the code

How do you use it?
If it worked, you would just move the mouse around.

What is it?
The intent is to make an interactive, dynamic image mask (like a “spotlight” effect). The mask method requires either an grayscale image file or an integer array containing the pixel gray values to be used for the mask. My idea is to update the pixels[] array of the mask image each time draw() loops.

Binary Decoder Ring

Tuesday, May 13th, 2008

Binary Decoder Ring
run the sketch—view the code

How do you use it?
Type in 8 binary bits (that means some 8 digit combination of ones and zeros) and hit the Return key. It will then display the ASCII equivalent.

What is it?
My first (albeit very quick) experiment with GUI elements from the Interfascia library.

Why is it cool?
This was actualy written a few days back, after someone at work gave me “secret message” written in binary. I don’t know who’s geekier, the person who wrote the message, or me for writing a program to decode it.

More fun with the Video Library

Sunday, May 4th, 2008

cameraFun_b
watch the video—view the code

How do you use it?
Move in front of the camera. Anything that is cut off by the right edge of the camera frame will leave a trail.
What is it?
A stripped-down version of yesterday’s sketch. The mouse interactivity was just getting in the way. This is where all the fun happens.

Why is it cool?
It takes me back to the days (nights really) when I would pump all of my spare change into the copy machine to make abstract images by moving stuff around on the glass while it was scanning.

Fun with the Video Library

Saturday, May 3rd, 2008

_20080503_cameraFun_a
view the code

How do you use it?
Dance in front of your web cam and move the mouse around.

What is it?
Playing with the video capture library. You need a web cam to use this one. It also can’t be run in the browser. There is code built in to use the MovieMaker class too, but it is commented-out. To record a Quicktime movie you will need to uncomment the //mm.addFrame(); line.