projective_trans_point_3d — Project a 3D point using a projective transformation matrix.
projective_trans_point_3d applies the homogeneous projective transformation matrix HomMat3D to all input points (Px,Py,Pz) and returns an array of output points (Qx,Qy,Qz). The transformation is described by the homogeneous transformation matrix given in HomMat3D. This corresponds to the following equations (input and output points as homogeneous vectors):
/ Tx \ / Px \ | Ty | = HomMat3D * | Py | | Tz | | Pz | \ Tw / \ 1 /
projective_trans_point_3d then transforms the homogeneous coordinates to Euclidean coordinates by dividing them by Tw:
(Qx,Qy,Qz) = (Tx/Tw,Ty/Tw,Tz/Tw)
If a point in the plane at infinity (Tw = 0) is created by the transformation, an error is returned. If this is undesired, projective_trans_hom_point_3d can be used.
Homogeneous projective transformation matrix.
Input point (x coordinate).
Input point (y coordinate).
Input point (z coordinate).
Output point (x coordinate).
Output point (y coordinate).
Output point (z coordinate).