Created
September 25, 2014 03:05
-
-
Save bmoren/f08cb79c1991c16ea06f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
size(320,320); | |
frameRate(30); | |
} | |
void draw() { | |
// set background to black | |
background(0); | |
// get my current time values | |
int mySecond = second(); // Values from 0 - 59 | |
int myMinute = minute(); // Values from 0 - 59 | |
int myHour = hour(); // Values from 0 - 23 | |
// set drawing color to white | |
stroke(255); | |
// draw the seconds line | |
line(mySecond, 0, mySecond, 33); | |
// draw the minutes line | |
line(myMinute, 33, myMinute, 66); | |
// draw the hours line | |
line(myHour, 66, myHour, 100); | |
// useful functions | |
// lerp | |
// lerpColor | |
// map | |
int value = floor(random(0,100)); | |
println(value); | |
println(floor(map(value,0,100,1,10))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment