Last active
February 25, 2020 00:59
-
-
Save MortytKane/888aea2b8f44e979fb67b9d16cdee26f to your computer and use it in GitHub Desktop.
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
//global variables | |
color blue = #1f5673; | |
color aqua = #90c3c8; | |
color skyblue = #903c8c; | |
color lavender = #FC0FD1; | |
PImage img; | |
void setup() { | |
size(700,700); | |
smooth(); | |
strokeWeight(5); | |
img = loadImage("unnamed.png"); | |
} //end setup | |
void draw() { | |
background (lavender); | |
stroke(blue); | |
image(img, 0, 0); | |
//this is a while loop | |
//start with i as 0 | |
int i = 0; | |
//while i is less than the width of the window | |
while(i < width){ | |
ellipse(i,20,random(width),200); | |
i = i + 20; | |
} //end of while loop | |
//this is a for loop | |
noStroke(); | |
for (int b = 0; b < 1000; b ++) { | |
float xloc = random(width); | |
if (xloc > width/2) { | |
fill(aqua); | |
} else { | |
fill(lavender); | |
} | |
square(xloc, random(height), 10); | |
} | |
} | |
//add variables |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment