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).
Your composition must:
You may proceed in any way that you wish to accomplish the requirements of this assignment. This suggested procedure may be helpful:
A+ - All required elements included, plus an exciting visual composition that changes in interesting and creative ways.
A - All required elements included and functioning correctly. Parameter changes result in interesting alterations to the image. Code is easy to read.
B - Competent response to the assignment, with some small errors that do not greatly affect the quality of the assignment (for example, forgetting one of the visual elements, or the parameter does not work in a single special case).
C - Some bigger errors, but with potential to develop into a competent response. For example, the code may not run, but with a few small syntactical fixes would properly fulfill the assignment; the code may work but not be comprehensibly written; or the code completely misses on one or two of the requirements, but still shows some understanding of the unit's material.
D - Serious errors show clear effort, but serious gaps in understanding, such as code that does not run and is not close to being correct.
F - Little demonstrated effort, or clear effort with no understanding, such as code fragments submitted which are only the start of a response to the assignment.