PLtransP

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Spatial Relations
Introduced first in SolidGeometry 1.1, Creation date: 2013-12-27, Last change: 2025-09-14

returns a translated point list



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

Example Illustration

 missing image of PLtransP(PL,p)

Syntax

PL=PLtransP(PL,p)

Input Parameter

PL: Point list nx2
p: translation vector 1x2

Output Parameter

PL: Translated point list




Copyright 2013-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, PLtransP, is designed to translate a list of points in a 2D space by a given translation vector. It is part of the SolidGeometry library and was introduced in version 1.1.

Input Parameters

Output Results

Algorithm Steps

  1. The translation vector p is explicitly defined as a 1x2 array to ensure it has the correct dimensions.
  2. The function uses the repmat function to replicate the translation vector p to match the number of points in PL. This creates a matrix of the same size as PL where each row is the translation vector.
  3. The original point list PL is then added to this replicated matrix, effectively translating each point by the vector p.
  4. If the function is called without an output argument, it automatically plots the translated points using the PLplot function. The view is set to a top-down perspective with view(0,90), and the plot is configured with equal axis scaling, grid lines, and axis visibility.
Algorithm explaination created using ChatGPT on 2025-08-18 22:28. (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