Created
April 19, 2016 14:57
-
-
Save nick3499/80a97f52354db116f738dc0f7c153b31 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
function setup() { | |
createCanvas(720, 400); | |
} | |
function draw() { | |
background(random(0, 255), random(0, 255), random(0, 255)); | |
noStroke(0); | |
for (var i = 0; i < 50; i++) { | |
var x1 = random(0, width); | |
var y1 = random(0, height); | |
var x2 = random(0, width); | |
var y2 = random(0, height); | |
var x3 = random(0, width); | |
var y3 = random(0, height); | |
var x4 = random(0, width); | |
var y4 = random(0, height); | |
fill(random(0, 255), random(0, 255), random(0, 255), random(20, 120)); | |
arc(x1, y1, x2, y2, PI / 2, PI); | |
arc(x3, y3, x4, y4, PI / 2, PI); | |
rect(x1, y1, 2, y2); | |
rect(x3, y3, x4, 2); | |
ellipse(x1, y1, 15, y2); | |
ellipse(x3, y3, x4, 15); | |
} | |
frameRate(5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment