xxxxxxxxxx
42
let px;
let py;
let lines = [];
function setup() {
createCanvas(400, 400);
px = 200;
py = 200;
for(let i = 0; i < 10; i++) {
lines[i] = createVector(random(width), random(height));
}
}
function draw() {
background(220);
for(let i = 0; i < lines.length; i++) {
strokeWeight(10);
stroke(0);
point(lines[i].x, lines[i].y);
}
strokeWeight(15);
stroke(0, 0, 255);
point(px, py);
let xoff = 0;
let yoff = 0;
//let dpth;
for(let j = 0; j < lines.length; j++) {
//dpth = 50;
for(let k = 0; k < 50; k++) {
strokeWeight(15);
stroke(255, 0, 255);
point(lines[k].x + xoff, lines[k].y + yoff);
}
xoff++;
}
}