Skip to content

Instantly share code, notes, and snippets.

Created August 30, 2017 01:39
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/994a38a5c726a92aa920c06c9bb673ca to your computer and use it in GitHub Desktop.
Save anonymous/994a38a5c726a92aa920c06c9bb673ca to your computer and use it in GitHub Desktop.
/**
* This function draws a weird ripple/vortex
* it won't really work in grid
* play around with colouring
**/
void drawRipple(color a, color b) { //changes the colour of function
noStroke();
for (int i = 0; i < 600; i = i + 5) {
if (i%2 == 0) { // this line says "if i is an even number then..."
fill(a); // fill in white
}
else { // otherwise
// fill(0); // fill in black
fill(b);
}
ellipse(300, 300, 600 - i, 300 - i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment