void drawMinuteHand(float halfway, int time) { pushMatrix(); translate(halfway,halfway); // converts the time left onto a 360 circle (the clock) // first range (zero to total number of seconds) second range (minutes to zero) float r = radians(map(time,0,timeLimitSec,6 * timeLimitMin,0)); rotate(r); strokeWeight(5); strokeCap(ROUND); stroke(0); line(0,0,0,minuteHandLength); //noStroke(); //fill(200, 150); //ellipse(0,0,80,80); popMatrix(); } void drawSecondHand(float halfway,int seconds) { pushMatrix(); translate(halfway,halfway); // converts the timeleft per second rotate(radians(map(seconds,0,59,0,354))); strokeWeight(3); strokeCap(ROUND); stroke(0); line(0,0,0,secondHandLength); popMatrix(); } void drawTickMarks(float halfway, color c) { pushMatrix(); strokeWeight(1); stroke(c); line(halfway,20,halfway,30); line(halfway,stage - 20,halfway,stage - 30); line(20,halfway,30,halfway); line(stage - 20,halfway,stage - 30,halfway); translate(halfway,halfway); rotate(radians(30)); translate(-halfway,-halfway); line(halfway,20,halfway,25); line(halfway,stage - 20,halfway,stage - 25); line(20,halfway,25,halfway); line(stage - 20,halfway,stage - 25,halfway); translate(halfway,halfway); rotate(radians(30)); translate(-halfway,-halfway); line(halfway,20,halfway,25); line(halfway,stage - 20,halfway,stage - 25); line(20,halfway,25,halfway); line(stage - 20,halfway,stage - 25,halfway); translate(halfway,halfway); rotate(radians(-60)); popMatrix(); }