I have four points in a 3D space, example:
$$(0,0,1),\ (1,0,1),\ (1,0,2)\ \mbox{and}\ (0,0,2).$$
Then I have a 2D position on that square plane:
$$x = 0.5,\ y = 0.5.$$
I need to find out the 3D space point of that position in the plane. In this example it's easy: $(0.5,0,1.5)$ Because $y$ is zero. But imagine that $y$ was not zero (and not all the same), that the plane is leaning in some direction. How would I calculate the point in that case?
I imagine this should be a pretty easy thing to solve, but I can't figure it out. If at all possible, please answer in programming terms and not in straight math terms. I'm not very good at "reading math".
Also, from the few number of tags I can add to this question I'm starting to believe I'm asking in the wrong place... If so, sorry. Feel free to suggest a place where I should ask, if you can't help me here.
Update with image: The gray plane (made out of two triangles) are the real one actually existing. I create a non-existing plane on top of this, the ABCD corners are exactly the same, however it doesn't slope. What I need to do is project a pixel (blue one in example) from the non-existing plane to the existing plane. It will be in the exact same location, except that it has gained a Y value from the sloping plane.
What I've been able to work out so far on my own is which one of the two triangles to use in the gray plane and the normal of triangle. I basically just need to figure out how I can project the pixel.