Last active
February 1, 2018 15:33
-
-
Save slambert/dd9ab47d410d3a254154cf0ce5b36688 to your computer and use it in GitHub Desktop.
Demo of println and ellipse
This file contains hidden or 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
// Demo of println and ellipse v0.1 | |
// Steve Lambert January 31, 2018 | |
/* Todo: | |
*/ | |
void setup() { | |
size(200,200); | |
background(0,255,0); // green | |
println("hi, the program started"); | |
fill(255,0,0); // red | |
} // setup | |
void draw() { | |
background(mouseX,mouseY,mouseX-mouseY); // background color changes w/ mouse | |
fill(255, 0, 0); // red | |
// set of ellipse | |
ellipse(10,10,10,10); | |
ellipse(10,20,10,10); | |
fill(255); // white | |
ellipse(10,30,10,10); | |
fill(255, 0, 0); // red | |
ellipse(10,40,10,10); | |
//moving circle | |
fill(255); // white | |
ellipse(mouseX,mouseY,mouseX/5,mouseX/5); // ellipse follows mouse | |
println("speed of mouse = " + (pmouseX - mouseX)); | |
println("this is mouseX = " + mouseX); | |
println("this is mouseY = " + mouseY); | |
} // draw | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment