CS21 HW3: Graphics

Due 11:59pm Tuesday, September 25, 2007

You should save your programs for this assignment in your cs21/homework/03 directory. A skeleton version of each program will appear in this directory when you run update21 in a terminal window. The program handin21 will only submit files in this directory.

Drawing a face

Open the file drawFace.py and create a program that draws a face using the graphics library. Here are some guidelines to follow:

Be creative! For inspiration, here are two example faces from previous cs21 students Madeleine Abromowitz and Jonathan Stafstrom.
Drawing a house with mouse clicks
Open the file drawHouse.py and create a program that draws a house with 5 (or more) mouse clicks as described in programming exercise 11 on pages 161-2 in the textbook. Be sure to include a Text box at the bottom of the graphics window where you can explain each step to the user of your program.

Below is an example of the output that might be produced by this program. Feel free to choose your own color scheme. Once you satisfy the requirements of problem, you may ask the user for additional mouse clicks to add other features such as a chimney, a tree in the front yard, a sun, or even more elaborate things like a fire spewing dragon.

Adding animation
Now go back to either of the previous programs and add some sort of animation. For example, you could make the entire face move around the window, you could have one feature of the face move (such as a blinking eye), or you could add animated aspects to your house scene.
Submit

Once you are satisfied with your programs, hand them in by typing handin21 in a terminal window.