xxxxxxxxxx
23
let i, x, y, DIST;
let xy = new Array(x,y,DIST);
function setup() {
createCanvas(400, 400);
frameRate (20);
}
function draw() {
background(255);
for (i=0;i<200;i++) {
for (j=0; j<200; j++) {
DIST = dist(i,j,mouseX/2,mouseY/2);
stroke (DIST);
strokeWeight(2);
point(i*2,j*2);
}
}
// DIST = dist(0,0,mouseX,mouseY);
// text(DIST,10,10) ;
// background(220);
}