Homework 3: Groundhog Day

Due date

This homework is due on February 10, 2011. and must be submitted as a pde file to the UNCA moodle activity HW 3.

The Task


In this assignment, you're invided to create your own tribute to Groundhog Day, which occured on Feb 2nd this year. By the way, on Feb 2 at 7:25 AM, Punxsutawney Phil did NOT see his shadow thereby predicting an early spring!

Read pages 127 to 143 of the textbook and then write a program that fills your canvas with groundhogs. Use a canvas size of 400×400. You must use translate(), scale(), rotate(), and a loop control structure to receive full credit for this assignment---see the grading rubric below.

Remember to comment your code and to submit only your source code.



Here's a fairly simple groundhog display that I generated called "woodchuck clock." I also describe the steps that I used in developing the program.

woodchuck clock
  1. Create one groundhog using the geometry below.
  2. body face
  3. Use rotate(), scale(), and translate() to alter the size and position of the groundhog on your canvas. Continue to play with these commands until you understand how each command affects the position and size of your groundhog.
  4. Use looping structures (for-loops and/or while-loops) to distribute multiple groundhogs on your canvas.


Grades will be based on the following criteria.

10% image size
20% use of one or more loops
60% use of rotate(), scale(), & translate()
10% documentation of code