## Learning objectives

After doing this homework you will be able to:

• Write, format, and debug commands to control shapes.
• Create a variety of shapes in an image
• Use the x-y coordinate system to specify the attributes of shapes
• Use variables to store and manipulate attributes of shapes as part of a process of sketching

## 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:

• use at least 4 different geometric primitives (e.g. point, line, quad, ellipse)
• use 'stroke' or 'fill' to change the grey tone from the default at least twice in the program
• use at least 2 variables
• include at least 4 interesting settings for these variables in the comments in the code (e.g. "/* x: 20, y: 80; x: 10, y: 15; x: 10, y: 100; x: 50, y: 70 */")
• be properly formatted and readable, using comments where necessary to explain the code

## 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.