One of my favorite illusion mechanics is figure-ground reversal. What was the foreground becomes the background, and what was the background becomes the foreground. I went for a subtle figure-ground reversal in this checkerboard animation.
It’s subtle because I don’t think checkerboards have an obvious figure and ground. We are trained to accept that both colors are equal. The initial movement makes the cornflower squares appear to be the figure, but then we see the white squares move.
When I watch this, I get some intriguing after-image effects. Diagonal lines appear on the axis-aligned checkerboard.
The original Twoville code for this animation was too long. I added a new construct to eliminate repetitive code. Using the
with block and an array, once can now set properties on multiple objects at once. For example, here we set the size of
b at the same time:
with [a, b] size = [10, 10]
The code still clocks in at 130 lines. What would it take in a language like Processing?