Homework #2 due 4/19

Create a 2D or 3D Processing “sketch” with the following requirements:

Object Oriented

  • Create at least one custom object (class) to be used in your sketch.  The parameters your object contains are up to you.  For instance, maybe your objects have a position, color, size, shape, and velocity.  Your object should have at least one custom function for drawing itself (i.e. draw() but it can be called anything you wish).  More complex objects might also have an update function or a function for changing the parameters of an object according to set of rules.
  • Use at least one primitive or curve in Processing that we did not cover in class, or you may draw a custom shape using any of the Vertex functions (beginShape(), vertex(), endShape(), etc.).
  • Create and display many of these objects (exactly how many is up to you).  This can be accomplished with an array or an ArrayList and a for loop.


  • Your sketch should autonomously change over time or incorporate a form of motion according to a set of rules.  Dynamic elements could be color, position, size, shape, etcetera.  A simple set of rules could be boundary conditions.  For example, an object could change color or size when it hits a boundary.  More complicated rules could involve changed based on the number of objects present or how fast they are moving.


  • Your sketch should involve at least two forms of interactivity via the mouse or keyboard.  If your sketch is 3D, interactivity could be in the form of navigation via a camera controlled by the mouse or keyboard.  If your sketch is 2D then you could use the mouse and/or keyboard to control any parameters of your objects.

Title and Description

  • Your work must have a title and a short description (150-300 words).
  • The description should have two paragraphs.  The first should describe your aesthetic intentions and/or future goals regarding the work.  The second should describe the implementation- did you build off any example code from class or online? What was the most challenging thing you had to create, add, or modify to achieve your results?  How could you add to more dynamism or interactivity to this work in the future?


  •  Send an email to ryan@mat.ucsb.edu with the subject Art122 Homework #2.  In the body of the email include the title and description of your sketch and attach a zip file containing the code.

Due Friday April 19th by 11:59pm.

Useful resources:

Homework #1 due 4/3

  1. Complete the readings and send me an email with the subject Art 122 Homework #1.  In your email include: comments on anything from the readings that was unclear, your experience with programming and electronics (zero is fine), and your goals for this class (i.e. do you already have a project in mind?  are there specific aspects of multimedia programming or microcontroller development that you would like to explore?).
  2. Download and install Processing.
  3. Fill out the Doodle poll with your preferences for office hours times.