Created
February 25, 2013 05:28
-
-
Save p5info/5027951 to your computer and use it in GitHub Desktop.
Processing2.0b8 new function sample(lite)
Original version is https://gist.github.com/p5info/68f026142d8ada895280
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
final int RATIO = 10; | |
float x, y; | |
void setup() { | |
clear();//more than 2.0b8 (If less than 2.0b7 background(0, 0, 0, 0)) | |
size(200, 200); | |
stroke(255); | |
frameRate(1000); | |
} | |
void draw() { | |
//randomGaussian()version | |
x =width/2+ randomGaussian()*RATIO;//more than 2.0b8 | |
y =height/2+ randomGaussian()*RATIO;//more than 2.0b8 | |
////random() version | |
// x =width/2+ random(-1,1)*RATIO; | |
// y =height/2+ random(-1,1)*RATIO; | |
point(x, y); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment