Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing i.1 A generative system in 24 lines #1

Open
Densou opened this issue Oct 13, 2016 · 0 comments
Open

Listing i.1 A generative system in 24 lines #1

Densou opened this issue Oct 13, 2016 · 0 comments

Comments

@Densou
Copy link
Owner

Densou commented Oct 13, 2016

void setup(){
size(2000,2000,P3D);
background(150);
stroke(0,50);
fill(200,200);
float xstart=random(10);
float ynoise=random(10);
translate(width/2,height/2,0);
for(float y=-(height/8);y<height/8;y+=3){
ynoise+=0.02;
float xnoise=xstart;
for(float x=-(width/8);x<width/8;x+=3){
xnoise+=0.02;
drawPoint(x,y,noise(xnoise,ynoise));
}
}

}

void drawPoint(float x,float y,float noiseFactor){
pushMatrix();
//translate(x_noiseFactor_4,y_noiseFactor_4,-y);
translate(x_4,y_4,-y);
float edgeSize=noiseFactor*26;
ellipse(0,0,edgeSize,edgeSize);
popMatrix();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant