Skip to content

Instantly share code, notes, and snippets.

@paulinalinaa
Created November 27, 2016 16:00
Show Gist options
  • Save paulinalinaa/ef7702e476c50db39e1a99a1ebc8b236 to your computer and use it in GitHub Desktop.
Save paulinalinaa/ef7702e476c50db39e1a99a1ebc8b236 to your computer and use it in GitHub Desktop.
var distribution = new Array(500);
function setup() {
createCanvas(500, 500);
for (var i = 0; i < distribution.length; i++) {
distribution[i] = floor(randomGaussian(random(height/4),random(width*2)));
}
}
function draw() {
background(204);
translate(height/2, width/2);
for (var i = 0; i < distribution.length; i++) {
rotate(TWO_PI/distribution.length);
stroke(0);
var dist = abs(distribution[i]);
line(random(100), 0, dist, 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment