xxxxxxxxxx
function setup() {
createCanvas(720, 720);
background(255);
stroke(0, 100);
strokeWeight(0.5);
const loop_num = 1000;
const point_num = 300;
const size_x = 5;
const size_y = 5;
const scale_x = width/size_x*1.5;
const scale_y = height/size_y*1.5;
translate(width*0.5, height*0.5);
for(let i=0;i<loop_num;i++){
let x = random(-1,1) * size_x;
let y = random(-1,1) * size_y;
for(let j=0;j<point_num;j++){
x = size_x * (noise(x*1.5, y*2) - 0.5);
y = size_y * (noise(x*2, y*1.5) - 0.5);
point(scale_x*x, scale_y*y);
}
}
}