project06-3.js
var diameter;var placeX = [300,305,310,320,325,330,340,345,350,360,365,370,380,385,390,400,405,410,420,425,430,440,445,450,460,465,470,480,485,490,500,505,510,520,525,530,540,545,550,560,565,570,580,585,590,600,605,610,620,625,630,640,645,650,660,665,670,680,690,700]var placeY = [300,305,310,320,325,330,340,345,350,360,365,370,380,385,390,400,405,410,420,425,430,440,445,450,460,465,470,480,485,490,500,505,510,520,525,530,540,545,550,560,565,570,580,585,590,600,605,610,620,625,630,640,645,650,660,665,670,680,690,700]var placeXMin = [50,60,75,85,100,110,125,135,150,160,175,185,200,210,225,235,250,260,275,285,300,310,325,335,350,360,375,385,400,410,425,435,450,460,475,485,500,510,525,550,575,600,625,650,675,700,725,750,775,800,825,850,875,900,925,950]var placeYHr = [50,75,121,150,176,200,253,300,350,375,450,473,500,550,600,675,699,737,775,803,825,869,900,925]
function setup(){
createCanvas(500,500);
}
function draw(){
background(0);
var hr = hour(); var mn = minute(); var sc = second()
push();
for (var i = 0; i<sc; i++){ var diameter = random(20,180);
frameRate(1);
fill(random(214,254), random(92,132), random(131,171), random(0,70)); stroke(random(214,254), random(92,132), random(131,171), random(120,225));
strokeWeight(random(0.5, 2.3));
ellipseX = random(placeX); ellipseY = random(placeY); ellipse(ellipseX/2, ellipseY/2, diameter/2, diameter/2); }
pop();
push();
for (var j = 0; j<mn; j++){ stroke(random(215,255), random(174,214), random(5,45), random(70,100)) fill(255, 194, 25, 70);
strokeWeight(random(0.1, 1.2));
drawMin(placeXMin[j]/2); }
pop();
push();
for (var k = 0; k<hr; k++){ stroke(random(0,40), random(137,177), random(155,195));
fill(20, 157, 175, 10);
strokeWeight(random(5, 10)) drawHr(placeYHr[k]/2) }
pop();
}
function drawMin(x){
var diameter = random(10,50);
ellipse(x, width/2, diameter/2, diameter/2)}
function drawHr(y){
var diameter = random(30,70);
line(height/2, y, height/2, y+5);}
For this project I was inspired by the gear system that watches have. The way the ellipses interact represent the complexity of a traditional gear system.
Everything is relative to the second values which is why everything moves as the second changes but the objects are only added as the individual variable changes. This is similar to the idea that in a gear system, if even one part if off by the slightest bit, everything is affected.
The pink ellipses depict the seconds – the number of these ellipses show the number of seconds that have passed, and every second that goes by the placement of these ellipses randomises while adding another ellipse i.e.: a second.
The yellow ellipses represent the minutes with the number of minutes increasing from left to right as the number of minutes increase.
The central blobs represent the hours in a 24 hours clock with the number increasing from top to bottom as the number of hours increase.
