Gretchen Kupferschmid-Project 06-Abstract Clock

sketch

//Gretchen Kupferschmid

function setup() {
    createCanvas(480,480);
    
}
 function draw (){
    
    //gradient picking color
    var gradient1 = color(223, 202, 252); 
    var gradient2 = color(202, 252, 238); 
    createGradient(gradient1, gradient2); 

    //creating time veriaples 
    var h = hour();
    var m = minute();
    var s = second();
    
    //mapping time variables
    var dripsS = map(s, 0, 59, 200, height);
    var colorLemon = map(m, 0, 59, 0, 30);
    var highLight = map(h, 0, 23, 110, 240);
    
     
    //lemon shadow
    noStroke();
    fill(211,180,117);
    ellipse(235,274,124,33);
     
    //changing color of lemon with minutes
    var Yellow= color(244-colorLemon,216-colorLemon, 100-colorLemon);
    fill(Yellow);
    noStroke();
    ellipse(211,181,161,208);
    ellipse(289,182,28,19);
     

    //drawing lemon interior
    noStroke();
    fill(247,234,181);
    ellipse(182,185,107,208);
    strokeWeight(2);
    stroke(196,141,32);
    fill(244,226,149);
    ellipse(182,185,73,178);
    strokeWeight(1);
    line(181,95,181,274);
    line(209,126,153,240);
    line(145.5,185,218,173);
    line(153.3,130,213.3,229.3);
    
    //lemon highlight every hour
    noStroke();
    fill(255);
    ellipse(193,highLight,8,18);
     
    //drip goes down every second
    fill(247,223,119);
    ellipse(170, dripsS, 10.5, 31);
    
    //text of time
    fill(255);
    text(h+":"+m+":"+s,350,50);
 
    
 }

 //background 
function createGradient(top, bottom) {
    for(var i = 0; i <= height; i++) {
      var mapColor = map(i, 0, height, 0, 1);
      var interA = lerpColor(top, bottom, mapColor);
      stroke(interA);
      line(0, i, width, i);
    }
}

As I tried to decide what form to make my clock, I based it heavily on my love for simple graphic elements such as lemons and the simplicity that comes from them. I wanted to also try various techniques for showing the time in the illustration itself from the drip of the lemon, to the hue of the actual lemon itself. It was important to me to show time in subtle ways that didn’t take away from the illustration but added to it in a form of animation.

Leave a Reply