bgcanv xor toy applet
back
Adjust the two parameters to control the shape.
Click in the shape box and hold down a key to generate random shapes.
The part of the code that makes the shape is just this:
for (i=0; i<256; i++) {
g.drawLine(i^v1, i, i^v2, i);
}
neat, huh?