/*************************************** 2008.3.29 Dongyoon Park cre8ive.park@gmail.com http://www.cre8ive.kr ****************************************/ void setup() { size(800,350); // set screen size. background(255); // set background color. fill(0); // I want to fill objects with black. smooth(); noStroke(); // objects with no outlines. frameRate(180); } // declare and initialize variables. int xspeed=10, yspeed=10; int x=0, y=0, sizeVar=10; int colorVar1=1,colorVar2=100,colorVar3=250; int strokeColor=0; int sizeMax = 100; PImage img1; void draw() { x = int(random(width)); y = int(random(height)); sizeVar = int(random(sizeMax)); colorVar1 = int(random(255)); colorVar2 = int(random(255)); colorVar3 = int(random(255)); fill(colorVar1,colorVar2, colorVar3, x%100); if (mousePressed == true) stroke(x,y,x+100,y+100); // rect(x,y,sizeVar,sizeVar); else ellipse(x,y,sizeVar,sizeVar); }