Skip to content

Instantly share code, notes, and snippets.

@nick3499
Created April 19, 2016 14:59
Show Gist options
  • Select an option

  • Save nick3499/3586ce7a39c907a81d1e8d2ca0181869 to your computer and use it in GitHub Desktop.

Select an option

Save nick3499/3586ce7a39c907a81d1e8d2ca0181869 to your computer and use it in GitHub Desktop.
Arc Chord. Using p5.js library.
function setup () {
createCanvas(896, 504);
}
function draw () {
background('#ed225d');
noStroke();
for (i = 0; i < 6000; i++) {
fill(random(255), random(0, 170), random(255), 150);
// negative x-axis values help arc chords fill entire canvas
arc(random(-250, 896), random(-150, 504), 400, 400, random(QUARTER_PI), QUARTER_PI, CHORD);
}
frameRate(10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment