Main

April 25, 2007

GLArt Final Project: Life Tower


Gosper Glider Gun. Click thumbnail for a larger screenshot (1024x1228)

The Life Tower is a 3D visualization of Conway's Game of Life. The current generation is drawn on top of the tower, and each successive generation is drawn underneath.

As the tower grows, it builds organic structures that are invisible in a conventional two-dimensional representation of Conway's Game of Life. This mapping of time to a spatial dimension mirrors the usual practice for representing one-dimensional cellular automata, in which successive generations are drawn in a two-dimensional field.

Download the source code (Requires LWJGL and Mark Napier's OpenGL demo code; standalone executables forthcoming). Once you have it running, press 'H' for usage instructions.

The Life Tower is a project for Mark Napier's GLArt class.

More screenshots after the jump.

Continue reading "GLArt Final Project: Life Tower" »

April 13, 2007

GLArt and Nature of Code: More Big Tower Screenshots

Here are some (more) screenshots from my Life Tower program. Click on any of the thumbnails below to see larger (up to 4096x3072) versions.


Pi pentomino after 127 generations


Gosper's Glider Gun


Random initial distribution

April 03, 2007

GLArt: Final Project Ideas

I'm going to work a bit more on my Life Tower project. Here are some things I'd like to improve, and features I'd like to implement:

  • Ability to edit the initial state of the simulation (i.e., the top layer); this would allow the user to input patterns that are known to be interesting and see the results in 3D.
  • More camera flexibility. Right now, you're only able to move the camera up and down along the length of the tower. It would be nice to be able to, say, view it from directly overhead or directly beneath.
  • A better sense of three dimensions: Right now, stills captured from the program (see here) look like a jumbled mess, owing to the fact that it's hard to distinguish cells in the foreground from cells in the background. This needs to be fixed (fog? lighting tricks? shadows? transparency?)
  • Bonus: An interface for changing the rules of the simulation, or just the ability to select among different rulesets (see list here)
  • I'd like to generate a few more of those big screenshots using non-random starting patterns.

GLArt: Big Screenshot

large tower thumbnail

This is a big ol' screenshot (2048x3072, ~1MB PNG) I took of my Life Tower program, using sample code from Mark Napier.

I need to get me one of those AMS tickets.

March 27, 2007

GLArt: Text Machine

screenshot thumbnail

This week's assignment is an exercise in spatial text and trying to wrap my head around timing. Click on the image above for a larger screenshot, or download the source code here. Use the up and down keys to get closer or further away from the text; clicking and holding down the mouse will rotate the text. The camera will follow a path from the top of the text to the bottom of the text, moving across every line. The idea was to mimick the path of the eye as it reads written text.

Some of the recent readings in Site-Specific (de Certeau, in particular) have interested me in making literal mappings between text and space. This is a first step in that direction. Another idea I'd like to try is a maze-like structure, navigated in from a first-person perspective, where the text is written on the floor (or walls, or something), and your "path" through the text leaves behind a trace.

Two more screenshots after the jump.

Continue reading "GLArt: Text Machine" »

March 20, 2007

GLArt and NOC: The Life Tower

screenshot 4 thumbnail
Tower from above. Click for larger screenshot.

EDIT: See new supersized screenshots here.

The Life Tower is a 3D visualization of Conway's Game of Life. The current generation is drawn on top of the tower, and each successive generation is drawn underneath.

Patterns in one-dimensional cellular automata are more evident when they're drawn with successive generations in a two-dimensional field. The Life Tower adds a third dimension to a 2D cellular automaton—the Game of Life—in order to see if similarly interesting patterns emerge.

Download the source code here (requires LWJGL and Mark Napier's GLMaterial library).

Click and hold the mouse to rotate the tower and move the camera up and down. Use the 'S' key to step through generations, or hit the space bar to toggle continuous calculation. The 'R' key resets. Press 'P' to use smaller flat squares instead of cubes to draw each cell (and 'C' to switch back to cubes).

Discussion and more screenshots after the jump.

Continue reading "GLArt and NOC: The Life Tower" »

March 06, 2007

GLArt Week 7: Self-Similar

screenshot thumbnail

Click the thumbnail above for a screenshot of my latest assignment for GLArt. This program loads in a 3D model and draws each vertex to the screen with a pixel. One vertex in the model, however, is drawn not with a pixel but with a smaller copy of the model. The smaller copy is drawn similarly, creaing a recursive, self-similar structure. The motion blur effect is created by copying the current screen to a texture, which is then drawn behind the points that make up the model.

Pressing up will zoom in toward the innermost iteration of the model; pressing down will zoom out. Left and right will rotate the model. Download the source code here (requires a bunch of Mark Napier's code and LWJGL).

I like the effect, though I realize now I could have achieved the same thing without using the recursive rendering algorithm. The original intention was to have every point in the model be drawn with a smaller version of the model, but that quickly became too computationally expensive.

You can also download a 640x480 QuickTime movie of the program's output here (~60MB). The camera heads straight on into the recursion, then rotates on the way out. I'm not sure why the model bumps around so much when you're zoomed in and rotating—I'm betting on floating point accuracy errors. (After five or six iterations, the values this program passes to OpenGL become very, very small.)

February 20, 2007

GLArt Week 5: Aldapalooza

screenshot 3
Many Aldas. Click on thumbnail for larger version.

For GLArt this week, I created a piece entitled Aldapalooza—a meditation on texture and celebrity. Source code and image here. (Requires LWJGL and Mark Napier's Vector3D, GLMaterial and GLImage libraries.) Press up and down to control the Y position of the camera.

Aldapalooza uses the Perlin noise mesh generating/normalizing code that was in my assignment from last week. Three grids are drawn, one atop another, textured with an image of early M*A*S*H era Alan Alda. The texture's size in relation to the grid is constantly oscillating, which, in combination with OpenGL's texture tiling, gives the impression of vertical movement (even when the camera is not moving at all).

screenshot 1
View from above. Click on thumbnail for larger version.

The three layers each have slightly different materials. The top layer has high shininess and ambient lighting; the bottom layer is more dull and has less ambient lighting. The middle layer is somewhere in between. I think this helps establish some depth cues which help distinguish the layers from all camera positions.

More screenshots after the jump.

Continue reading "GLArt Week 5: Aldapalooza" »

February 13, 2007

GLArt Week 4: Light and Material Study

GLArt Screenshot #1
Shiny, smooth, noisy grids. Click for full-size screenshot

This week's assignment for GLArt covers lighting and materials. The program draws a terrain-like triangle mesh using two different materials and either triangle normals or averaged normals. Java source code available here (requires LWJGL and Mark Napier's Vector3D and GLMaterial libraries). Use the arrow keys to move around the scene and press the space bar to re-generate the grid.

More screenshots after the jump.

Continue reading "GLArt Week 4: Light and Material Study" »