## Objectives

Upon completing this assignment, you will be able to:
• Work with both integer and floating-point variables in a meaningful way in a program.
• Execute basic mathematics on variables in Processing.
• Use mathematics to conceptualize how to control and vary the attributes of an image.
• Use (non-grayscale) colors in your composition.

## Description

In the prior homework, you created a composition which would vary by changing the settings of several variables. In this homework, you will again create a varying composition, but in this case, all the variations will be controlled through a single parameter.

In this assignment, you will create a visual composition of 8 squares. At the top of your file, you will define a floating-point variable called "parameter," whose value may be initially assigned by me to be anywhere between 0.0 and 1.0 and whose value does not change again anywhere in your program. In your visual composition, you will have at least 4 different effects which change proportionately when the value of the parameter is changed. These effects will be constructed using mathematical expressions that depend on the value of parameter.

For example, one such change could be the grayscale level of the fill of one of the squares, which might vary from black to white according to the level of the parameter:

```float grayFill = 255 * parameter; // grayFill varies from 0 to 255
fill(grayFill);
```
Or, you could get more fancy, and have the gray level vary between 100 and 200:
```float grayFill = 100 + (100 * parameter); // grayFill varies from 100 to 200
fill(grayFill);
```
What you choose to change and how is up to your imagination.

Special note: Since the value of parameter could be set to 0, you should never divide by parameter - like people, Processing gets confused when you divide by 0. But you can divide by, for example, (parameter + 0.0001).

## Requirements

• Consist of 8 squares arranged visibly on the screen.
• Execute properly for any value assigned to the parameter variable between and including 0.0 and 1.0
• Have at least 4 different, humanly-noticeable effects that occur when the parameter value is changed (e.g. the squares change color, or change size, or are spaced differently, etc.).
• Use ++ or -- in a meaningful way.
• Use +=, *=, or /= in a meaningful way.
• Incorporate at least 2 non-grayscale colors.
• As always, be properly formatted and documented.

## Instructions

You may proceed in any way that you wish to accomplish the requirements of this assignment. This suggested procedure may be helpful:

1. Make an initial composition of 8 squares that does not vary.
2. Add the declaration for the parameter at the top of your program. Give it an initial value between 0.0 and 1.0.
3. Consider one thing the parameter could be used to change; for example, you may want to let it control the width of one of your squares, or all of them, to be within a certain range.
4. Define a variable for the thing you want to be altered. Write a mathematical expression that uses 'parameter' and will result in the variable being set the way you want. Then, put the variable into the function call you want to adapt.
5. Test your code by altering the value assigned to the parameter. At the least, try parameter = 0.0, parameter = 0.5, and parameter = 1.0.
6. Repeat steps 3-5 until you have made 4 effects.