Project triangle from $\mathbb{R}^3$ into $\mathbb{R}^2$ with to fixed vertex texture coordinates

41 Views Asked by At

I have a triangle made out of the three vertices $\mathbf{p}_1$, $\mathbf{p}_2$, $\mathbf{p}_3$. I know the positions of the vertices in $\mathbb{R}^3$, called $x_i, y_i, z_i$ for $i=1,2,3$.

I now want to assign each vertex a texture coordinate in $\mathbb{R}^2$ (therefore a projection into $\mathbb{R}^2$), called $u_i, v_i$ for $i=1,2,3$. As a constrain, the texture coordinates of vertex 1 and 2 are already given. I only have to find the missing coordinates for vertex $3$. The angles inside the triangle and the side lengths should be kept.

Is there a formular that calculates these two variables?