xxxxxxxxxx
29
// Define architectural points as an array of objects with x and y coordinates
const points = [
{x: 50, y: 50},
{x: 150, y: 100},
{x: 250, y: 50},
{x: 300, y: 150},
{x: 200, y: 200},
{x: 100, y: 200},
{x: 50, y: 300},
];
function setup() {
createCanvas(400, 400);
strokeWeight(2);
stroke(0);
noLoop();
}
function draw() {
background(255);
// Iterate through the points and draw lines between them
for (let i = 0; i < points.length; i++) {
for (let j = i + 1; j < points.length; j++) {
line(points[i].x, points[i].y, points[j].x, points[j].y);
}
}
}