Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

transformPointsForward

Class: affine2d

Apply forward geometric transformation

Syntax

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

Description

[x,y] = transformPointsForward(tform,u,v) applies the forward geometric transformation of tformto the input 2-D point arrays u andv and outputs the point arrays xand y. The input point arrays u and v must be of the same size.

X = transformPointsForward(tform,U) applies the forward geometric 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 affine2d 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.

U

X and Y coordinates of points to be transformed, specified as an n-by-2 matrix

Output Arguments

x

Transformed coordinates in X dimension, returned as a array.

y

Transformed coordinates in Y dimension, returned as a array.

X

Transformed points in X and Y dimensions, returned as an n-by-2 point matrix

Examples

expand all

Create an affine2d object that defines the transformation.

theta = 10;

tform = affine2d([cosd(theta) -sind(theta) 0; sind(theta) cosd(theta) 0; 0 0 1])
tform = 

  affine2d with properties:

                 T: [3x3 double]
    Dimensionality: 2

Apply forward geometric transformation to an input (U,V) point.

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

    6.6605


Y =

    8.9798
Was this topic helpful?