Created
August 31, 2017 07:05
-
-
Save anonymous/ed6ff218e105effd9109bec6819df033 to your computer and use it in GitHub Desktop.
susieFunction
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
//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