Operators

# hom_mat3d_compose (Operator)

## Name

hom_mat3d_compose — Multiply two homogeneous 3D transformation matrices.

## Signature

hom_mat3d_compose( : : HomMat3DLeft, HomMat3DRight : HomMat3DCompose)

## Description

hom_mat3d_compose composes a new 3D transformation matrix by multiplying the two input matrices:

```  HomMat3DCompose = HomMat3DLeft * HomMat3DRight
```

For example, if the two input matrices correspond to rigid transformations, i.e., to transformations consisting of a rotation and a translation, the resulting matrix is calculated as follows:

```  HomMat3DCompose  =  | R(l)  t(l) |  *  | R(r)  t(r) |
| 0 0 0  1   |     | 0 0 0  1   |

=  | R(l)*R(r)  R(l)*t(r)+t(l) |
|  0 0 0           1        |
```

## Attention

Note that homogeneous matrices are stored row-by-row as a tuple; the last row is usually not stored because it is identical for all homogeneous matrices that describe an affine transformation. For example, the homogeneous matrix

```    / ra rb rc td \
| re rf rg th |
| ri rj rk tl |
\ 0  0  0  1  /
```

is stored as the tuple [ra, rb, rc, td, re, rf, rg, th, ri, rj, rk, tl]. However, it is also possible to process full 4×4 matrices, which represent a projective 4D transformation.

## Parallelization

• Multithreading type: reentrant (runs in parallel with non-exclusive operators).
• Processed without parallelization.

## Parameters

HomMat3DLeft (input_control)  hom_mat3d (real)

Left input transformation matrix.

HomMat3DRight (input_control)  hom_mat3d (real)

Right input transformation matrix.

HomMat3DCompose (output_control)  hom_mat3d (real)

Output transformation matrix.

## Result

If the parameters are valid, the operator hom_mat3d_compose returns 2 (H_MSG_TRUE). If necessary, an exception is raised.