# Transformation of Pose in 3D

How to effectively transform the relative pose obtained to a desired fixed frame in three-dimensional world space?

Similar to the transformation procedure discussed in 2D case, a 3D transformation involves considering an additional rotation around X and Y.

If applicable, with the rotation matrix R_x given as a 3 x 3 form as [1 0 0; 0 cos(theta_x) sin(theta_x);0 sin(theta_x) cos(theta_x)].

The rotation matrix R_y given as a 3 x 3 form as [cos(theta_y) 0 sin(theta_y);0 1 0; -sin(theta_y) 0 cos(theta_y)].

The rotation matrix R_z given as a 3 x 3 form as [cos(theta_z) -sin(theta_z) 0; sin(theta_z) cos(theta_z) 0; 0 0 1].

Transformation of pose in a 3D world is also dependent on the sequence of rotations considered. In robotics, there are two main sequence of rotations, primarily, a ZYZ rotation which considers the rotations roll, pitch and yaw along Z, Y and Z axis respectively. Similarly, the XYZ rotation sequence follows accordingly.

Please note: the sequence of rotations starts from the right and proceeds to the left. The translation vector t has the format [x y z]. Finally the homogeneous transformation matrix T can be formulated as a 4 x 4 given as [R;t;0 0 0 1].