dchikows-Section C-Project-06-Abstract-Clock

sketch

//David Chikowski
//Section C
//dchikows@andrew.cmu.edu
//Project - 06 

function setup() {
    createCanvas(480, 480); 
}

function draw() {
    background(210, 200, 230); // My favorite pink
    
    //calls the current hour, minute, and second
    var H = hour();
    var M = minute();
    var S = second();

    //left circle representing hours 
    fill(255);
    ellipse(85,height/2, (H*4)+50, (H*4)+50);
    
    //middle circle representing minutes 
    fill(3*M,5*M,6*M);
    ellipse(width/2,height/2, (M*4)+50, (M*4)+50);

    //far right circle representing seconds 
    fill(7*S,3*S,5*S);
    ellipse(380,height/2, (S*1)+50, (S*1)+50);

}




I started the project thinking I would utilize the use of lines to base my time off of. I then decided I would switch to circles because I could change the size and how they took up the screen. I really struggled with the create aspect of the project.

Leave a Reply