var x = 200;
var curve = 400;
var v = 7;
function setup() {
createCanvas (400, 300);
}
function draw(){
background(240);
for (var i = 0; i<=500; i++) {
strokeWeight (0.2);
stroke (180);
// bottom left
line(i*v, height, x, height-i*v);
// bottom right
line (mouseX, i*v, i*v, mouseY);
// top right
line(x, i*v, width-(i*v), 0);
// top left
line(i*v, mouseY, mouseX, i*v);
}
}
This project was difficult for me as it was hard for me to understand which values to multiply to which variable. It was a lot of guess and check and hard to get the curves to do exactly what I wanted, but I think the end result is pretty fun to play with.