PLtransT

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Spatial Relations
Introduced first in SolidGeometry 2.1, Creation date: 2015-01-30, Last change: 2025-09-14

rotates and moves a point list nx2



See Also: PLtransP , PLtransR , PLtrans , PLtrans0 , PLtrans1 , PLtransC

Example Illustration

 missing image of PLtransT(PL,T)

Syntax

PL=PLtransT(PL,T)

Input Parameter

PL: Point list nx2
T: Transformation matrix 2x3 or 3x3

Output Parameter

PL: Point list nx2




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

Output

Algorithm Steps

  1. Check if the point list PL is empty. If it is, the function returns immediately without performing any operations.
  2. Extract the rotation matrix R from the first two rows and columns of the transformation matrix T.
  3. 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.
  4. Apply the rotation to the point list PL using the function PLtransR, which takes PL and R as inputs.
  5. Apply the translation to the rotated point list using the function PLtransP, which takes the rotated PL and p as inputs.
  6. 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