Created
September 30, 2019 04:12
-
-
Save animanoir/97d7ca5175060f5dd0016a25ae776b19 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
int w = 500; | |
int h = 500; | |
int r, g; | |
void setup() { | |
size(500, 555); | |
noStroke(); | |
background(255); | |
} | |
void draw() { | |
r = (int)map(mouseX, 0, width, 0, 255); | |
g = (int)map(mouseY, 0, width, 0, 255); | |
println("Valor de mouseX = "+mouseX); | |
println("Valor de r = "+r); | |
fill(r, g, 128, 128); | |
ellipse(mouseX, mouseY, g, g); | |
} | |
void mouseReleased(){ | |
saveFrame("JPG.jpg"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment