next up previous
Next: Draw a radial Moiré Up: Assignment 5: Moiré patterns Previous: Draw a very fine

Draw two overlapping targets

1.
Probably the coolest Moiré pattern comes from two overlapping targets, with one shifted down and to the right one pixel. Within the same loop you used in the previous part, add a couple of lines that change the color and draw a second circle, with x and y coordinates that differ by one from the first circle's. HINT: inside the loop you will invoke setColor twice and drawOval twice.



Allen B. Downey
3/3/1998