/********************************** * Author: Jonathan Seguin * Last Modified: February 9th 2010 * Problem Set: 1 * Question: 1 **********************************/ // Program draws 5 circles to invoke an emotion. // Conincidentally the olympics is taking place, // in our country, 2 days from the day this was // written. //---------------------------------------------- //Note: not flexible for modification / re-use. //---------------------------------------------- //**INPUT/SETUP** size (500,300); background (255); smooth(); //**DECLARATION & INITIALIZATION** color[] c = { // circle colours stored in an array for easy access color(0,0,255), color(255,225,0), color (0), color (0,255,0), color (255,0,0)}; int alt = 20; // position modifier //**OUTPUT** for (int a = 0; a < 5; a++) { //Appearance stroke(c[a]); strokeWeight(10); noFill(); //Draw Circles ellipse (width/3 + a*45 ,height/2 - alt , 80, 80); alt = -alt; // alternate position of circles up and down }