Main Content

rigid3d

3-D rigid geometric transformation

Description

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

Creation

Description

tform = rigid3dcreates a defaultrigid3dobject that corresponds to an identity transformation.

tform = rigid3d(t)creates arigid3dobject based on a specified forward rigid transformation matrix,t. Thetinput sets theTproperty.

example

tform = rigid3d(rot,trans)creates arigid3dobject based on the rotation,rot, and translation,trans, components of the transformation.rotsets theRotationproperty.transsets theTranslationproperty.

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:

[ x y z 1 ] = [ u v w 1 ] * T

Thas the form

[ r 11 r 12 r 13 0 ; ... r 21 r 22 r 23 0 ; ... r 31 r 32 r 33 0 ; ... t x t y t z 1 ] ;

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

[ x y z ] = [ u v w ] * 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

[ x y z ] = [ u v w ] + t

Data Types:single|double

Object Functions

invert 逆几何transformation
outputLimits Find output spatial limits given input spatial limits
transformPointsForward Apply forward geometric transformation
transformPointsInverse Apply 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.

反式= (2 3 4);

创建一个rigid3dobject that performs the rotation and translation.

tform = rigid3d(rot,trans)
tform = rigid3d with properties: Rotation: [3x3 double] Translation: [2 3 4]

Version History

Introduced in R2020a