# rigid2d

（不推荐）使用后乘约定的二维刚性几何变换

## 说明

`rigid2d` 对象存储有关二维刚性几何变换的信息，并支持正向变换和逆变换。

## 创建对象

### 语法

``tform = rigid2d``
``tform = rigid2d(t)``
``tform = rigid2d(rot,trans)``

### 描述

``tform = rigid2d` 创建对应于恒等变换的默认 `rigid2d` 对象。`
``tform = rigid2d(t)` 将 `T` 属性设置为指定的二维刚性变换矩阵 `t`。`

``tform = rigid2d(rot,trans)` 将 `Rotation` 和 `Translation` 属性分别设置为指定的旋转矩阵 `rot` 和平移向量 `trans`。`

## 属性

`[x y 1] = [u v 1] * ``Rotation` + `Translation`

## 对象函数

 `invert` Invert geometric transformation `isTranslation` Determine if geometric transformation is pure translation `outputLimits` Find output spatial limits given input spatial limits `transformPointsForward` Apply forward geometric transformation `transformPointsInverse` Apply inverse geometric transformation

## 示例

```theta = 30; rot = [ cosd(theta) sind(theta); ... -sind(theta) cosd(theta)];```

`trans = [2 3];`

`tform = rigid2d(rot,trans)`
```tform = rigid2d with properties: Rotation: [2x2 double] Translation: [2 3] ```

## 版本历史记录

### R2022b: 不推荐

• 将函数名称 `rigid2d` 的实例更改为 `rigidtform2d`

• 将变换矩阵指定为 `T``Rotation` 的转置。`T``rigid2d` 对象的 `T` 属性的值，或用于创建 `rigid2d` 对象的变换矩阵。`Rotation``rigid2d` 对象的 `Rotation` 属性的值，或用于创建 `rigid2d` 对象的旋转矩阵。

```T = [1 0 0; 0 1 0; 5 10 1]; tformPost = rigid2d(T);```

```T = [1 0 0; 0 1 0; 5 10 1]; tform = rigidtform2d(T');```

```T = tformPost.T; tform = rigidtform2d(T');```

```theta = 45; rot = [cosd(theta) sind(theta); -sind(theta) cosd(theta)]; trans = [5 10]; tformPost = rigid2d(rot,trans);```

```theta = 45; rot = [cosd(theta) sind(theta); -sind(theta) cosd(theta)]; trans = [5 10]; tform = rigidtform2d(rot',trans);```

`tform = rigidtform2d(theta,trans);`