Main Content

isRigid

Determine if geometric transformation is rigid transformation

Description

TF = isRigid(tform) determines whether or not the affine transformation specified by tform is a rigid transformation. A rigid transformation includes only rotation and translation. It does not include reflection, and it does not modify the size or shape of an input object.

example

Examples

collapse all

Create an affine2d object that defines a pure translation.

A = [ 1  0  0
      0  1  0
     40 40  1 ];

tform = affine2d(A)
tform = 

  affine2d with properties:

                 T: [3x3 double]
    Dimensionality: 2

Test if it is a rigid transformation.

tf = isRigid(tform)
tf =

     1

Create an affine3d object that defines a different scale factor in each dimension.

Sx = 1.2;
Sy = 1.6;
Sz = 2.4;
tform = affine3d([Sx 0 0 0; 0 Sy 0 0; 0 0 Sz 0; 0 0 0 1])
tform = 

  affine3d with properties:

                 T: [4x4 double]
    Dimensionality: 3

Check if the transformation is rigid.

TF = isRigid(tform)
TF =

     0

Input Arguments

collapse all

Geometric transformation, specified as an affine2d or affine3d geometric transformation object.

Output Arguments

collapse all

Geometric transformation is a rigid transformation, returned as true or false.

Data Types: logical

Version History

Introduced in R2013a