Code
size(300,300); background(250); float V; V = 100; smooth(); noStroke(); fill(170,17,17); ellipse(V,V, 50,50); fill(101,169,201); ellipse(2*V,V, 50,50); fill(68,144,48); ellipse(V+50,V, 50,50); fill(224,216,57); ellipse(300-V,240, 180,180); fill(36,122,155,127.5); //opacity added to light blue ellipse((V/300),(158 - V),(V*.733),(V+278)); //circle drawn mostly outside frame on left side fill(222,219,199,100); //opacity added to beige ellipse((V*.267),(300/V),(22200/V),(1800-V)); // draws circle outside of frame with large radius
0101 - Arithmetic and Position: Shifting and Scaling
Statement:
Request a canvas of size 300x300 pixels. Declare a float variable V. Assign this variable to have some value, say, 100.
Use V to govern the horizontal location (not the size) of a small circle (perhaps 50x50 pixels) on the canvas. In other words, incorporate V into the syntactic slot for the x-coordinate of the ellipse function. Draw a circle there which is filled with a red color.
Now draw a similar circle, filled with a blue color, located at V times 2.
Now draw a similar circle, filled with a green color, located at V plus 50.
Now draw another circle, filled with a yellow color, located at width minus V.
Experiment with different multiplicative factors, and different additive factors. In comments in your code, describe the visual effect of multiplication and addition on a variable used to govern position. What happens when the variable V is subtracted from another number?