Learning objectives

After doing this homework you will be able to:

Instructions

In this homework, you will create and experiment with a visual composition, using variables to alter their look.

For example, I could write a program like the following: int radius=80; size(300,300); ellipse(100,150,radius,radius); ellipse(200,150,radius,radius); This draws two circles of equal radius on the screen. Now I can vary what my composition simply by changing the value of the variable "radius" to make two smaller or two larger circles.

Your task in this assignment will be to create a composition which can vary by assigning different numbers to key variables in your program. Your composition must do the following:

Recommended procedure

You may find the following process useful in developing this assignment:

  1. Start by planning on paper. What kind of a composition might be interesting and fun for you to work on?
  2. Build up a simple composition without variables, using different shape, fill, and stroke commands. Add one command at a time and test your code each time to make sure that it works.
  3. Once you have a static image you like, substitute variables for some of the numbers. Each time you put a variable in, add its initialization at the top of the code and substitute the variable in for its number in a shape command. Again, work step by step and test after each change.
  4. Play with the variable assignments. Vary them and see what effect this has on your composition. When you find an assignment that you like, note it in a comment in your code.
  5. You might decide in the process to change your code around. If so, go step-by-step and test each time to make sure things still work.
  6. Before submitting, review the list of requirements to make sure you have fulfilled all of them.
  7. Go through your code and add comments anywhere where it might not be clear to anyone reading your code.
  8. Upload your code to CMS.

Grading rubric

You wil not be judged on your aesthetics, although this will probably be fun for you to play with, and playing with an eye to aesthetics is a great way to learn the technical material.

A - Excellent work. The submitted code fulfills all the assignment requirements and is clear and easy to read. The different suggested settings for the variables lead to substantially different compositions.

B - Solid work that demonstrates competence in the material. The submitted code fulfills all the requirements, with 1 or 2 small problems that do not hamper functionality, such as problems with formatting or inadequate (or highly excessive) comments. The different suggested settings for the variables have a noticeable impact on the composition.

C - The submitted code runs, but misses substantially on one or more of the requirements. Alternatively, the code does not run, but with minor bug fixes would fulfill all the project requirements.

D - The submitted code does not run, and/or the submitted code does not use variables to change functionality.