# How to find matrix that projects 3d points into 2d plane centered in the origin?

I have a list of 3D points defined by Cartesian coordinates, i.e. [(x1,y1,z1), (x2,y2,z2), ..., (xn,yn,zn)]. I want to project them to a 2D plane which has origin in the center (0,0,0) but which is rotated by polar angle theta, and azimuthal angle phi (*).

As far as I understand I need some kind of 3x2 matrix that when multiplied with my points matrix nx3 will give me my projection in 2D.

nx3 matrix-multiply 3x2 = nx2

How to calculate this matrix if I know the angles of the plane rotation?

If it helps here's a quick explanation what I'm trying to do. I have a 3d object consisting of point cloud, which is centered in the origin and I want to calculate how it looks from a camera placed on different points that are on equal distance from the origin, looking directly toward the origin, and with light coming from the camera and toward the origin.

(*) I'm not sure does does those two angle define the plane in a unique way.

• Do you mean orthographic projection? If that is the case then find by what rotation matrix do you need to transform the xy plane for example (normal=(0,0,1)) to get to the plane in your problem. Then multiply each point with the transposed rotation matrix and drop the third coordinate. Jun 24, 2019 at 11:03
• @lightxbulb I think so but I'm not sure. Could you give me an example for say projecting a point A(2,1, 3) which I need to project to plane with 60 degrees polar angle and 20 degrees azimuth angle. Jun 24, 2019 at 11:10
• Compute it yourself and see if that is what you want. Jun 24, 2019 at 11:47