Programming for Interactive Digital Arts
CS 2, Fall 2023

HW 2, Due Mon, Oct 16

The goal of this homework is to synthesize the techniques you've learned so far, in order to do something fun of your own design. Your sketch shall have the following features.

  1. [30 pts] It defines at least two different functions to draw different things (e.g., a star and a paint splash), with parameters specifying where, how big, and at what angle. You can of course have additional parameters (e.g., color), if you like. Exactly how these functions are used (called) in the sketch is up to you (they must be used, though!) — interactively via keyboard or mouse, called randomly, etc.
  2. [30 pts] At least three aspects of the sketch change their state over time in a well-defined fashion (i.e. with an update method). This must include at least one form of motion (e.g., following a path, or moving toward the mouse) and one change of appearance (e.g., as in the pac-man mouth animation, or oscillating size or color).
  3. [20 pts] Two different loops generate different repetitive portions of the sketch (e.g., a star field).
  4. [20 pts] Good design and tidy, commented code
----------------------------------------------
CS2 HW2 Grading Scheme. Total: 100 points
----------------------------------------------

Extra credit is awarded for good design (visual, interaction, and coding).

1. At least 2 functions defined to draw different things [30]
  * Function1 definition [9]
  * Function2 definition [9]
   At least 3 parameters passed to *each* function, to control drawing:
   (2 points each if parameter passed to function and used correctly)
  * Function1 parameters, 2 points each [6]
  * Function2 parameters, 2 points each [6]

2. At least 3 aspects of sketch change state over time (well-defined, not randomly) [30]
  * One form motion [10]
  * One change of appearance [10]
  * Other [10]

3. Loops [20]
  * First Loop [10]
  * Second Loop [10]

4. Sophistication/coherency/coding [20]
  * Overall efficiency, clarity, good use of techniques learned in class [10]
  * Tidiness / correctness / commenting [10] 

The notes and text provide examples of these various techniques, but you shall develop a coherent sketch of your own design, and not just throw the examples together. That is, your sketch will be graded on how well you have demonstrated your understanding of the techniques.

Use comments and reasonable and consistent indentation and whitespace to make the source clear and comprehensible for another human reader (i.e., both you and your grader). Your sketch will be graded on its understandability, in addition to correctness.

Turn in a link to your sketch and a screenshot OR, to encourage working outside of the p5js editor, you may turn-in a zipfile (zipped directory) named HW2.zip that contains your sketch files.