In this homework you will start with the code I gave you in Lab 7 change the program so that it generates the Moire pattern shown on the right.
What you are seeing in the screenshot are two sets of concentric circles. The centers of the circles are 100 pixels apart. The circles have a width of 5, and the diameter of a circle is 20 pixels larger than its next smallest one. Diameters range from 20 to 480 pixels.
Hint: You can change the width of the 'pen' used for drawing to 5 pixels with the line
g2.setStroke(new BasicStroke(5))
.Hint: A circle is just an oval whose width and height are the same.
This homework is due Monday, February 13 @noon in the dropbox.cse.sc.edu.
No comments:
Post a Comment