xxxxxxxxxx
let f = 0;
setup = _ => {
createCanvas(W = 400, W);
}
draw = _ => {
background(0, 44);
stroke(W, 77);
let a = [];
for (let x = 0; x <= W; x += W) {
for (let y = -50; y < W + 50; y += 10) {
let X = noise(y + f) * 200 + x - 99;
let Y = tan(sin(y + f * 1.7)) * 99 + y - 50;
a.push([X, Y]);
for (let i = 0; i < a.length; i++) {
let A = a[i][0];
let B = a[i][1];
if (dist(X, Y, A, B) < 320) line(X, Y, A, B)
}
}
}
f += .01
}
// ----------------------------------------
// Minimized
// ----------------------------------------
// f=0,draw=n=>{for(f||createCanvas(W=400,W,N=noise),background(0,44),stroke(W,77),a=[],x=0;x<=W;x+=W)for(y=-50;y<W+50;y+=10)for(a.push([X=200*N(y+f)+x-99,Y=99*tan(sin(y+1.7*f))+y-50]),i=0;i<a.length;i++)dist(X,Y,A=a[i][0],B=a[i][1])<320&&line(X,Y,A,B);f+=.01};//#つぶやきProcessing
// ----------------------------------------
// Pre-minimized version
// ----------------------------------------
// f=0
// draw=_=> {
// f||createCanvas(W=400,W,N=noise)
// background(0,44)
// stroke(W,77)
// a=[]
// for(x=0;x<=W;x+=W){
// for(y=-50; y<W+50; y+=10){
// a.push([X=N(y+f)*200+x-99,Y=tan(sin(y+f*1.7))*99+y-50])
// for(i=0;i<a.length;i++){
// if(dist(X,Y,A=a[i][0],B=a[i][1])<320) line(X,Y,A,B)
// }
// }
// }
// f+=.01
// }