var x0 = 0.4; var y0 = 0.3; var x1 = 0.7; var y1 = 0.5; var x2 = 0.2; var y2 = 0.9; var x3 = x0 + ((y1 - y0) / (y2 - y0)) * (x2 - x0); var y3 = y1; var x4 = x2 + ((x1 - x2) / (y1 - y2)) * (y0 - y2); var y4 = y0; var x5 = x0; var y5 = y1 + ((x1 - x0) / (x2 - x1)) * (y1 - y2);