Exposition on MAS964 PS6

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

Squares this time. Both applets give you two squares that you can move around, scale, rotate. One applet emphasizes the intersection of the two squares; the other, the union. The aesthetic this time seems to be big blocky lines. I'm not quite sure why, but there's something large and monumental about squares.

I'm happier with the intersection graphic. The vertical bar density works well with the square frame size, I think. Also, the coarseness of the bars means that you can't quite make out the intersection shape, blurs out that hard polygon a bit. When I first worked on this problem I wanted to solve for the polygon of intersection explicitly and manipulate that. Because everything is convex it shouldn't be too hard, and we even came up with an algorithm to do it, but it would be a lot of work to implement. So instead I just test a lot of points to see if they're inside both polygons. Ick!

The union applet doesn't feel quite finished. When both squares are lined up right the resulting picture is quite beautiful. But there are a lot of ugly pictures there, too, especially when the negative space inside is concave. The line between the two dots is only drawn when the shapes are "close enough", where close enough roughly means that the interior space is small enough to feel like its own object.

The keyboard interface to both applets is pretty awful. It'd be much better to be able to grab a corner of the square and drag it around, but that wasa too much to implement just now.

Sources

DoubleBufferApplet.java
DoubleBufferApplet to the rescue! Still the same code from (same as in ps2.
SquaresApplet.java
Implements the applet behavior - the existence of two squares, the mouse and keyboard interface.
TransformableSquare.java
Class for a square with rotation, scaling, etc. Stores everything sparsely and only converts to screen coordinates when necessary - this is a nice trick.
SquaresUnion.java
Drawing unions of squares. There's a bit of code in here that draws thick lines.
SquaresIntersect.java
Drawing intersections of squares. Ugly code in there checking points as to whether they're inside.

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