xxxxxxxxxx
22
let NUM_LINES = 80;
// at the center, want rotate to be zero
// this is dumb, actually need a vanishing point off screen.
// and to end off screen
let vanishingPointY;
let vanishingPointX;
function setup() {
createCanvas(400, 400);
vanishingPointX = width/2;
vanishingPointY = -20;
}
function draw() {
background(220);
let lineSpacing = width/NUM_LINES;
//rotate(-(NUM_LINES/2));
for (let i = 0; i <= NUM_LINES; i += 1) {
let posX = map(i, 0, NUM_LINES, -width*8, 9*width);
line(vanishingPointX, vanishingPointY, posX, height);
}
}