I am writing a program where I would like to allow the user to draw 4 connecting lines, such as:
And convert this shape into a 3D plane. Is this possible? Is there an existing algorithm to do so? If not, any idea of the steps I should be taking?
Things we can assume: the camera is at $0,0,0$, facing $[0,0,-1]$. The plane we create will be centered at $0$ on the $z$-axis.
Ideally I'd like the result to be in the form of a set of rotate, scale, translate vectors for a rectangle centered at $[0,0,0]$ of size $[1,1]$.
Please let me know if you need any more information. I don't really know where to start on this...
(I'm not sure if this question would be more suitable for stackoverflow or gamedev. If so, please feel free to move it. However the question is mainly math related so I'm going to try here first.)
Given the aspect ratio of the rectangle, then there is a unique (up to scaling) transformation that yields the given quadrilateral.
– robjohn Sep 08 '11 at 20:43"Homogenous coordinates"
, check them up. More here or here. – hhh Sep 13 '12 at 22:18