the following problem occurs always again when calibrating projectors which exact position and orientation is unknown onto a known projection screen.

given are four points in space which lie on a plane.

x and y are given. without loss of generality z is zero for all four points.

what is the the 3d transformation matrix (projection, scale, translate, rotate) which would transform a quad, so that its projection onto the xy plane has the given four coordinates?

anybody has some mathematical pointers or insights for this?