Syntax
PL=PLtransT(PL,T)
Input Parameter
PL : | | Point list nx2 |
T : | | Transformation matrix 2x3 or 3x3 |
Output Parameter
Copyright 2015-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, PLtransT
, is designed to rotate and translate a list of 2D points using a transformation matrix. It is part of the SolidGeometry library and was introduced by Tim Lueth.
Input Parameters
- PL: A point list with dimensions nx2, where n is the number of points.
- T: A transformation matrix, which can be either 2x3 or 3x3 in size.
Output
- PL: The transformed point list, also with dimensions nx2.
Algorithm Steps
- Check if the point list
PL
is empty. If it is, the function returns immediately without performing any operations.
- Extract the rotation matrix
R
from the first two rows and columns of the transformation matrix T
.
- Determine the translation vector
p
:
- If
T
is a 3x3 matrix, p
is taken from the first two elements of the third column of T
.
- If
T
is a 2x3 matrix, p
is taken from the first two elements of the fourth column of T
.
- Apply the rotation to the point list
PL
using the function PLtransR
, which takes PL
and R
as inputs.
- Apply the translation to the rotated point list using the function
PLtransP
, which takes the rotated PL
and p
as inputs.
- If there are no output arguments specified (
nargout==0
), the function will:
- Call
SGfigure
to create a new figure window.
- Plot the transformed point list
PL
using PLplot
with a red star marker ('r-*').
Algorithm explaination created using ChatGPT on 2025-08-18 22:40. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21