Reconstruct point in rectangle

43 Views Asked by At

I have the following problem: I have $4$ points $A,B,C,D$ and one point $P$ in a rect. Visualisation of the problem:

The flat distance(ignoring $y$) between $|B-A|=|C-D|=|C-A|=|D-B|$ is always $1$. The point $P$ is always in the rect, but I only know it's $x$ and $z$ position and the $y$ position(height) is the value I'm trying to calculate. How can I calculate $P_y$?