rigid3d

3-D rigid geometric transformation

Description

A rigid3d object stores information about a 3-D rigid geometric transformation and enables forward and inverse transformations.

Creation

Description

tform = rigid3d creates a default rigid3d object that corresponds to an identity transformation.

tform = rigid3d(t) creates a rigid3d object based on a specified forward rigid transformation matrix, t. The t input sets the T property.

example

tform = rigid3d(rot,trans) creates a rigid3d object based on the rotation, rot, and translation, trans, components of the transformation. rot sets the Rotation property. trans sets the Translation property.

Properties

expand all

Forward rigid transformation, specified as a 4-by-4 numeric matrix. This matrix must be a homogeneous transformation matrix that satisfies the post-multiply convention given by:

[xyz1]=[uvw1]*T

T has the form

[r11r12r130;...r21r22r230;...r31r32r330;...txtytz1];

Data Types: single | double

This property is read-only.

Dimensionality of the geometric transformation, specified as a positive integer.

Rotation component of the transformation, specified as a 3-by-3 numeric matrix. This rotation matrix satisfies the post-multiply convention given by

[xyz]=[uvw]*R

Data Types: single | double

Translation component of the transformation, specified as a 3-element numeric row vector. This translation vector satisfies the convention given by

[xyz]=[uvw]+t

Data Types: single | double

Object Functions

invertInvert geometric transformation
outputLimitsFind output spatial limits given input spatial limits
transformPointsForwardApply forward geometric transformation
transformPointsInverseApply inverse geometric transformation

Examples

collapse all

Specify an angle of rotation in degrees and create a 3-by-3 rotation matrix.

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

Specify the amount of horizontal, vertical, and depthwise translation, respectively.

trans = [2 3 4];

Create a rigid3d object that performs the rotation and translation.

tform = rigid3d(rot,trans)
tform = 
  rigid3d with properties:

       Rotation: [3x3 double]
    Translation: [2 3 4]

Introduced in R2020a