# so3

SO(3) rotational transformation

## Description

The `so3` object represents an SO(3) rotational transformation in 3-D.

This object acts like a numerical matrix enabling you to compose poses using multiplication and division.

## Creation

### Syntax

``transformation = so3``
``transformation = so3(rotation)``

### Description

````transformation = so3` creates an SO(3) transformation representing an identity rotation with no translation.```

example

````transformation = so3(rotation)` creates an SO(3) rotation representing a pure rotation defined by the orthonormal rotation `rotation`.```

### Input Arguments

expand all

Orthonormal rotation, specified as a 3-by-3 matrix, a 3-by-3-byM array, a scalar `so3` object, or an M-element array of `so3` objects. M is the total number of rotations.

Example: `eye(3)`

Data Types: `single` | `double`

## Object Functions

 `dist` Calculate distance between transformations `interp` Interpolate between transformations `mtimes, *` Transformation multiplication `mrdivide, ./` Transformation right division `normalize` Normalize transformation matrix `rdivide, ./` Element-wise transformation right division `rotm` Extract rotation matrix `times, .*` Transformation element-wise multiplication `transform` Apply rigid body transformation to points

## Examples

collapse all

Define a 3-by-3 rotation matrix and a three-element translation vector.

```rot = eye(3); tr = [3 5 2];```

Create the SO(2) and SO(3) rotations using the rotation matrix `rot`.

`R2d = so2(rot(1:2,1:2))`
```R2d = so2 1 0 0 1 ```
`R3d = so3(rot)`
```R3d = so3 1 0 0 0 1 0 0 0 1 ```

Create the SE(2) and SE(3) rotations using the rotation matrix `rot`, and the translation vector `tr`.

`T2d = se2(rot(1:2,1:2),tr(1:2))`
```T2d = se2 1 0 3 0 1 5 0 0 1 ```
`T3d = se3(rot,tr)`
```T3d = se3 1 0 0 3 0 1 0 5 0 0 1 2 0 0 0 1 ```

## Version History

Introduced in R2022b