function setup() {
createCanvas(400, 400);
console.log(width/2);
}
function draw() {
background(220);
translate(width/2,height/2);
scale(1,-1);
stroke(128);
line(-width/2, 0, width/2, 0);
line(0, -height/2, 0, height/2);
scl = 20;
x1 = -width/2;
x2 = width/2;
y1 = (2 * scl) * x1 / scl -(1 * scl);
y2 = (2 * scl) * x2 / scl -(1 * scl);
stroke(255,0,0);
line(x1, y1, x2, y2);
y1 = -(1/2 * scl) * x1 / scl + (13/2 * scl);
y2 = -(1/2 * scl) * x2 / scl + (13/2 * scl);
stroke(0,0, 255);
line(x1, y1, x2, y2);
}