For 3d software, in the code, I'm changing a 3d point to a 2d point on a 2d plane, which represents a screen view, with the following method:
$x, y, z$ = given point in the 3d system.
$(X_u, Y_u, Z_u)$ = The transform for the 2d view plane Y-direction/upwards vector relative to the 3d system.
$(X_r, Y_r, Z_r)$ = The transform for the 2d view plane X-direction/rightwards vector relative to the 3d system.
View plane values: $x_1, y_1, z_1$
$$x_1 = X_r x + Y_r y + Z_r z$$
$$y_1 = X_u x + Y_u y + Z_u z$$
$$z_1 = 0$$ Note that the software still tracks $z_1$ even though it always equals $0$
Now, I need to determine how to reverse this and determine the 3d point $x, y, z$. But I do not have the original 3d point. I do have values for:
The transforms for the 2d plane: $(X_u, Y_u, Z_u)$ and $(X_r, Y_r, Z_r)$
I, of course, have: $x_1, y_1, z_1$
I also happen to have the 3d x, y, z (say, $x_2$, $y_2$, $z_2$) values for a second point on the 2d plane (being the 3d values, this point has not been transformed, just like $x, y, z$ have not been transformed) The second point might be useful because $z_1$ was made to equal $0$. Though, please note, for my purposes, it should be okay if we pretend $$z_1 = 0$$ by way of a transform, so when it is reversed, the 3d point will actually lie on the 2d plane.
How can this be done?