Exposition on MAS964 PS7

A few exercises in design, problem set 7 for Principles of Visual Design.

Sleight of hand. Having a set of objects on the screen that the user can manipulate, then adding or removing one from the set. Appear creates a sixth object, Disappear removes an object bringing the count to two. I didn't like this assignment so much - why, I'm not sure. So I interpreted it liberally, with mixed results.

For Appear I implemented a full lattice gas automata simulator. Kind of a fun thing to do, actually, reminds me of when I used to work on Swarm. The initial inspiration came from something Matt Grenby had us do in a class exercise.

Lattice gasses suggest particle physics - creation, annhilation, etc. So it should be a fertile testbed for adding objects to a set. But the 5->6 requirements seemed too specific for my purposes. The end result is a bit hokey - I just add in particles over time. Oh well. The graphics are kind of nice, I think, more thick black lines. And I like the dynamics, especially when the grid gets full.

I'm happier with how Disappear turned out. Here it's just three oscillating sine waves drawn as sparse dot patterns. The handy thing is that when the waves get big there's just a big scatter of dots and you can't really tell what's going on. That gives me a bit of cover to remove one of the wave objects.

Sources

DoubleBufferApplet.java
Once again, DoubleBufferApplet from ps2. Code reuse works!
HexCoord.java
Basics of hexagonal coordinates. Knows about neighbours and normalization.
HexGrid.java
Hexagonal grid class, really just a data structure.
Particle.java
The particles themselves - motion, bounce behaviour. The particular lattice gas rule here isn't physical, but easy to understand on screen.
Appear.java
Brings all the above components together into the simulation. All the graphics code is in here as well. I'm pretty happy with the code architecture of all this mess, if not the final graphic result.
SinBox.java
Neat name for a file, huh? A box that contains an oscillating sine wave inside.
Disappear.java
Glues three SinBoxes into an applet.

Nelson Minar <nelson@media.mit.edu>
Last modified: Fri Mar 21 04:41:29 EST 1997