Skip to content

Instantly share code, notes, and snippets.

Created August 31, 2017 07:05
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/ed6ff218e105effd9109bec6819df033 to your computer and use it in GitHub Desktop.
Save anonymous/ed6ff218e105effd9109bec6819df033 to your computer and use it in GitHub Desktop.
susieFunction
//with this function you can draw a rectangle anywhere on the screen,
//there will also be a circle in the middle of the screen
//they with both be random in fill and stroke colour
//how exciting
//turn off noLoop for a cool effect
void susieFunction (int x1, int y1, int x2, int y2){
fill(random(255), random(255), random(255), 100); //this randomises the colour of the rectangle
stroke(random(255), random(255), random(255),100); //this randomises the colour of the outline
rect(x1, y1, x2, y2); //this means you can choose the size and location of the rectangle
ellipse(width/2,height/2,100,100); //this makes a circle in the centre of the screen
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment