Calculate the dimensions of a projected plane

Hi OF world, nice to meet you.

I am working on a project where I have a plane in 3d and I want to project a flat square texture onto it as if it was coming from a projector. Imagine a virtual projection mapping system.

I have the 3D plane, position and orientation (as a quaternion) of my “projector” and the throw ratio of this projector. How can I calculate where on the plane this projection is?

Any ideas on what I need to look up in order to achieve this? I know I need some kind of projection matrix but not sure exactly how to calculate the intersected corners of the projected image onto the plane.


Hi, I think there are several addons for doing such. I think that ofxRay provides such. Take a look at There are several addons specifically made for projection mapping.

Also, the projector mathmatically speaking works exactly the same as a camera, so you can use ofCamera instead to act as a projector and use all of its functions for finding the matrices and all. Yo probably dont even need to use the matrix. Its coordinate transformation functions will be very handy for such, as screenToWorld or cameraToWorld, etc