Created
November 27, 2016 16:00
-
-
Save paulinalinaa/ef7702e476c50db39e1a99a1ebc8b236 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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