//week1_ellipses by Zach Eveland for Intro to Computational Media //draws a number of ellipses, one inside the other, all butted up against the left side //not interactive, not animated, just draws the ellipses. void setup() { size(400, 200); } void draw() { int interval = 4; //amount to adjust coordinates by int x = 200; //starting ellipse x coordinate (y coordinate is fixed for all ellipses) int w = 380; //starting ellipse width int h = 180; //starting ellipse height int c = 255; //starting greyscale value to use for fill background(255); stroke(0); smooth(); for(int i = 0; i <= 20; i += 1 ) { fill(c); ellipse(x, 100, w, h); x = x - 2 * interval; //moves the next ellipse to the left w = w - 4 * interval; //makes the width of the next ellipse smaller h = h - 2 * interval; //makes the height of the next ellipse smaller c = c - 12; //decrements the greyscale for the next ellipse } }