Code
void setup(){
size(400,400);
}
void loop(){
background(241, 224, 187);
int l = millis() % 50;
fill(203, 165, 205, 100);
rect(0,l,400,200);
fill(203, 165, 205, 100);
rect(0,mouseY,400,100);
fill(203, 165, 205, 100);
rect(0,mouseX,400,100);
}
013 -- Simple Animation II: Governing Animation by Absolute Time
Statement:Use the millis(), with appropriate scaling factors etc., to govern the UNDULATION of a solitary graphic form created using either a TRIANGLE_STRIP, QUAD_STRIP or POLYGON primitive.
Requirements: Your composition should be 400x400 pixels.
Permissible: Color, 3D vertices, cursor-based interactions.
Suggestions: Consider animating color properties, and explore the use of HSB versus RGB color specification modes.
Forbidden: Matrix transformations [translate(), scale(), rotate()].