CS 2, Winter 2008
Programming for Interactive Digital Arts

HW 2, due Fri, Jan 25

Use Processing to create a sketch or sketches that do the following.

  1. [40 pts] Create a cartoon animation. The cartoon object must move around the screen in response to user input, and it must have at least three different states with different visual representations. (The Pacman follower from class is an example.) The movement and representations should be "smooth" -- the object shouldn't jump wildly around the screen and the representations shouldn't be so different as to appear unconnected. (The hat shouldn't just jump over to the hand of the snowperson; rather, the snowperson's arm should reach up and get the hat, with an intermediate bent arm state (or two) along the way.) "Smooth" is relative here; you needn't do a Hollywood production, as the minimum number of three different representations indicates.
  2. [30 pts] Add a GUI element (slider, checkbox, etc.) to control the state of some aspect of the cartoon animation (speed, size, etc.) Constrain the cartoon object to stay away from the GUI element.
  3. [30 pts] Replicate the cartoon object. Each "clone" must have at least one distinguishing feature in addition to position on the screen. Use arrays to hold information about the replicates, and a variable to hold the number of replicates. The response to user input here need not be the same as that for the first problem.

Comment your code to describe where and how you addressed each requirement.

Use reasonable and consistent indentation and whitespace (along with comments) to make the source clear and comprehensible for another human reader (i.e., both you and your grader). Maximum credit is given for nicely readable code. Turn in your sketches in the usual way:

Electronic
Using Blackboard, turn in before the start of class a zip file for each sketch. To produce a zip file, use the menu "Tools" / "Archive Sketch". In Blackboard, go to Assignments tab, select HW 2, and then use the "complete assignment" option. Do not use the digital dropbox.
Hardcopy
Print out and turn in at the start of class a printout of each sketch. Processing has a print command in the "File" menu. Be sure your name is on the printouts.