Skip to content

Instantly share code, notes, and snippets.

Created August 31, 2017 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d6bcae7265d75aad476ed78f53b92f32 to your computer and use it in GitHub Desktop.
Save anonymous/d6bcae7265d75aad476ed78f53b92f32 to your computer and use it in GitHub Desktop.
/**
* 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