ジェネラティブアート
float angle = 0; int nx,ny; float xnoise = random(1); float ynoise = random(1); void setup() { size(300,300); noFill(); stroke(0,10); } void draw() { translate(width/2,height/2); rotate(angle); nx = (int)(noise(xnoise) * 200); ny = (int)(noise(ynoise) * 200); line(0,0,nx,ny); xnoise += 0.01; ynoise += 0.01; angle += 0.005; } void keyPressed(){ if(keyCode==ENTER){ saveFrame("image-####.png"); } }
Copy