Archive for January, 2008

Theoretical Laser Tracking…

I’m currently developing a laser-pointer and webcam pointing device for a 3D game. One of the issues one runs into with this situation arises when you’re setting up the webcam. What happens if the webcam does not have a direct angle on the surface it’s looking at? What you get is this weird quadrilateral that can’t be used to directly map the laser to the mouse.

I’ve written a test program in Processing to address this problem. The white squares define the edges of the usable area. The little red square controlled by the mouse represents the laser pointer, and the larger red circle represents the cursor as the final program would interpret it. The goal is to pretend the area in the box and the area of the program are two perspectives of the same element. Every frame, the program tries to track down the x and y position of the laser dot. It follows a guess and check algorithm, and each guess is shown as a line within the box.

Note that you may click and drag the white boxes to change the shape of the usable area. Check it out!

Comments (3)

Circle Solver…

In preparation for a logo animation involving circles, I did some fun math for solving the intersection of two circles. Here’s a rough guess at what the logo will look like:

ArtificeRough

And here’s a link to my math work in proce55ing / processing – however you want to spell it.

Comments (3)

Three Pi Squared

PiSquaredBanner

I took the first one million digits of Pi, and pulled ten random colors from a photograph to show numbers zero through nine.

Every square was assigned a different number from the first one million digits of Pi, and colored with the color assigned to that number.

Each square then progresses to the next color at its own rate, making a twinkling animation. Click the image above to go see the animation!

Comments (1)