Mini D
Warmup
Every square in this animation has a side length of 0.8.
The function ptinsquare :: Point -> Point -> Boolean
returns true
when the first point is inside a square of side length 0.8 centered at
the second point.
Animation
Outline squares are arranged in a rectangular pattern, like this:
XXXXXXXXXX
X X
X X
X X
XXXXXXXXXX
- Clicking on a square turns it blue.
- In “erase mode”, moving the mouse over a square makes it disappear.
- Hitting E enters and exits “erase mode”
- Randomly select one square on the bottom to be orange instead of blue.
- Hitting R re-randomizes that selection.