Suppose I have a quadrilateral ABCD in 3D space
A----------B
\ \
\ \
\ \
C----------D
And two-dimensional coordinates (x,y), how can I "map" these coordinates onto ABCD to get 3D coordinates of the point on the quadrilateral.
For example, assuming that AC = 2, CD = 4,
- (0,0) => A because A is the top-left
- (4,2) => D because D is the bottom-right
- (2,1) => The center of the quadrilateral on all axes
This question on Stack Overflow is more or less the exact opposite of what I want to do.