Documentation Center

  • Trial Software
  • Product Updates

transformPointsForward

Class: affine3d

Apply forward geometric transformation

Syntax

[x,y,z] = transformPointsForward(tform,u,v,w)
X = transformPointsForward(tform,U)

Description

[x,y,z] = transformPointsForward(tform,u,v,w) applies the forward transformation of tform to the input 3-D point arrays u,v, and w and outputs the point arrays x,y, and z. The input point arrays u,v, and w must be of the same size.

X = transformPointsForward(tform,U) applies the forward transformation of tform to the input n-by-2 point matrix U and outputs the n-by-2 point matrix X. transformPointsForward maps the point U(k,:) to the point X(k,:).

Input Arguments

tform

Geometric transformation, specified as an affine3 geometric transformation object.

u

Coordinates in X dimension of points to be transformed, specified as an array.

v

Coordinates in Y dimension of points to be transformed, specified as an array.

w

Transformed coordinates in Z dimension, specified as an array.

U

n-by-2 point matrix

Output Arguments

x

Transformed coordinates in X dimension, returned as a array.

y

Transformed coordinates in Y dimension, returned as a array.

z

Transformed coordinates in Z dimension, returned as a array.

X

Transformed points, returned as an n-by-2 point matrix.

Examples

expand all

Apply Forward Geometric Transformation

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

Apply forward geometric transformation to an input points.

[X,Y,Z] = transformPointsForward(tform,5,10,3)
X =

     6


Y =

    16


Z =

    7.2000
Was this topic helpful?