===== Joint Rot 4x4 ===== A joint angle can be represented as a 4x4 rotation matrix that describes the transformation between two coordinate systems. This rotation matrix can be computed and stored as a model-based item. To express the right knee angle as a rotation matrix, choose the Right Shank as your segment and the Right Thigh as your reference segment. {{:dialog_joint_rotation_4by4.png}} ==== Item Format ==== The command will return 16 columns of data for each point in time with each column representing a position in the 4x4 matrix. {{:jointrotationmatrix4x4.png}} **NOTE:** If looking at the signal in the Data Viewer, the columns will be numbered 0 through 15. When accessing the columns using the Evaluate_Expression command, the columns can be accessed as 1 through 16. For this reason, the image above shows numbers 1 through 16. It is always important to pay attention when a signal or command is 0 or 1 based. ==== See Also ==== It is also possible to represent joint angles using Cardan sequences ([[visual3d:documentation:pipeline:model_based_data_commands:joint_angle|JOINT_ANGLE]]), helical angles ([[visual3d:documentation:pipeline:model_based_data_commands:helical_angle|HELICAL_ANGLE]]), or with a 3x3 rotation matrix ([[visual3d:documentation:pipeline:model_based_data_commands:joint_rotation|JOINT_ROTATION]]). Or return to [[visual3d:documentation:visual3d_signal_types:link_model_based_data_type|LINK_MODEL_BASED items]].