Created
August 31, 2017 00:18
-
-
Save anonymous/d6bcae7265d75aad476ed78f53b92f32 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
/** | |
* This function draws a little graphic that kinda | |
* looks like a Venn diagram, but really, its perhaps | |
* it is more like a colour wheel. | |
* | |
* This function takes 3 parameters | |
* x is cartesian coordinate across | |
* y is down | |
* rotationInDegrees is the amount of rotation in degrees | |
* | |
*/ | |
void venn(int x, int y, float rotationInDegrees) { | |
pushMatrix(); | |
translate(x, y); | |
rotate(radians(rotationInDegrees)); | |
stroke(255); | |
noStroke(); | |
fill(255, 0, 0, 120); | |
ellipse(0, 0, 50, 50); | |
fill(0, 255, 0, 120); | |
ellipse(50, 0, 50, 50); | |
fill(0, 0, 255, 120); | |
ellipse(25, 50, 50, 50); | |
popMatrix(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment