Created
October 2, 2023 18:36
-
-
Save RobinMoretti/305f60a037595a7ad3dde15303007e0e to your computer and use it in GitHub Desktop.
Processing - circle with mouse position and fill color
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
int circleFillColor = 0; | |
void setup() { | |
// la taille du canvas (fenêtre) | |
size(500, 500); | |
} | |
void draw() { | |
// les couleurs varient entre 0 et 255 | |
circleFillColor = circleFillColor + 1; | |
fill(circleFillColor); | |
circle(mouseX, mouseY, 50); | |
if (circleFillColor > 255) { | |
save("generatedImage.jpg"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment