Created
September 27, 2016 21:08
-
-
Save slambert/4cd240a9b46bade48127446e526b9993 to your computer and use it in GitHub Desktop.
Talking about how *where* you place random() changes the result
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
| void setup(){ | |
| size(300,300); | |
| smooth(); | |
| } | |
| void draw(){ | |
| background(255); | |
| stroke(0); | |
| for (int i = 0; i < height; ++i) { | |
| float randomwidth = random(0,width); | |
| line(0,i,randomwidth, i); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment