//Aisha Dev
//15-104 SECTION E
//Project 6
var rectPitY = 80;
function setup() {
createCanvas (400,400);
}
function draw(){
background(0);
// Pittsburgh time (EST)
var Hpit = hour();
var Mpit = minute();
// Time in New Delhi
var Hdel = Hpit + 9;
var Mdel = Mdel + 30;
for (var i = 0; i <= second(); i ++){
strokeWeight(0.3);
fill (55,55,55,50);
line (400, height/2, width/i, i*20);
strokeWeight(0.5);
stroke(255);
line (i, 0, i*20, i+width);
}
//Hours in Pittsburgh
fill(255);
stroke(40);
rect (width/2, 80+Hpit, 150, 20);
//Hours in Delhi
noFill();
stroke(255);
strokeWeight (3);
rect(width/4 + Hdel, 300, 20+(4*Hdel), 150);
//Minutes in Pittsburgh
for (var i = 0; i <= Mpit; i ++){
stroke(10);
strokeWeight(2);
fill (255);
ellipse(i*2.2, 50+(i*1.3), 70, 70);
}
//Minutes in Delhi
for (var i = 0; i <= Mpit; i ++){
stroke(255);
strokeWeight(1);
noFill ();
ellipse(200+(i*1.5), 320, 20, 20);
}
}
I wanted to include multiple time zones because I feel like that is how I experience time. I wanted to include what Indian Standard Time means to me when I’m on Eastern standard time.