Skip to content

Instantly share code, notes, and snippets.

Created August 31, 2017 00:59
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/7d41386ea62dba82bb1ea48117ff6df2 to your computer and use it in GitHub Desktop.
Save anonymous/7d41386ea62dba82bb1ea48117ff6df2 to your computer and use it in GitHub Desktop.
/*
* This function creates a lava texture to the parameters set
* x is area across
* y is area down
* WARNING! The larger you spread the texture the more subtle the animation will be
* WARNING! will not work in a grid, works better as a background pattern to
* the parameters set
*/
void lava(int x, int y) {
noStroke();
for (int i = 0; i < 2000; i = i + 40) {
ellipse( random(x), random(y), (50), (50));
fill((255), random(255), 0, 15);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment