CS 140 - Homework 3 Due Monday September 12
Write a Python program that draws the figure below.
-
Your program should implement a function drawCircles that
takes four parameters; a pygame surface, an x,y, coordinate for the circles, and a
radius for the largest circle and then draw 50 concentric circles starting
from the outside circle animated so each circle is drawn every tenth of a second.
For example, to draw the concentric circles above I used
drawCircles(win,300,300,300).
-
Your function should also erase the circles starting from the
innermost circle at the same rate.
- The function must use a while loop to accomplish its task.
-
Extra Credit (2 points). In addition to the function above
write a function fadedCircles
to draw concentric circles like we did initially but
draw filled circles and animate them starting with the outer circle.
Start the outer
circle white and make each circle progressively darker until the center black.. The final result
should look like below.
- Name your program hw3.py and put it in your CS140 folder
on csfile2. Turn in a printout at the sdtart of class on Monday.