CS 100 Spring 2014
Lab 3 |
Variables
|
Due Monday March, 3rd
Using the Processing language/environment extend the provided program. Your code should use variables.
Run the provided program:
copy and paste in a processing sketch called flower
.
The program produces the following image.
1. [3 pts] After reading the provided code, modify the code to creates an output similar to this image. Among other things you have to update the variable declarations:
- change a variable initialization and
- add a new variable, initialize it and reference it.
(The image has transparency: an alpha is used for the yellow.)
2. [6 pts] Extend the program using additional variable to create the stem and leaves of the flower as shown below.
3. [1 pt] Change the initial value of imgWidth
and run your program.
How does the flower look?
Bonus Add the features of a face to your flower: eyes, mouth, eyebrows...