Image warping

In theory can we make an equation that when given 4 points can create a matrix that warps the image to the plane created by the 4 points

possibly using my 3d to 2d block to figure out the point