Skip to content

Instantly share code, notes, and snippets.

@manoloide
Created February 27, 2018 19:05
Show Gist options
  • Save manoloide/27547786f921f39c1c061334f8cf3906 to your computer and use it in GitHub Desktop.
Save manoloide/27547786f921f39c1c061334f8cf3906 to your computer and use it in GitHub Desktop.
int seed = int(random(999999));
void setup() {
size(960, 960, P2D);
smooth(8);
pixelDensity(2);
generate();
}
void draw() {
}
void keyPressed() {
seed = int(random(999999));
generate();
}
void generate() {
background(240);
noiseDetail(1);
for (int i = 0; i < 10; i++) {
float x = width*random(0.2, 0.8);
float y = height*random(0.2, 0.8);
float des = random(10000);
float det = random(0.01, 0.02);//*random(0.1, 1);
noFill();
beginShape();
for (int j = 0; j < 10000; j++) {
float ang = noise(des+x*det, des+y*det)*TWO_PI*20;
vertex(x, y);
x += cos(ang);
y += sin(ang);
}
endShape();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment