Created
February 27, 2018 19:05
-
-
Save manoloide/27547786f921f39c1c061334f8cf3906 to your computer and use it in GitHub Desktop.
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
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