PL2T

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 1.0, Creation date: 2010-11-06, Last change: 2025-09-14

Expands two HT Matrizes into 8 edges/vertices of the corresponding bar between T1 and T2

Description

calculates from two given full HT Matrices a list of 8 points which form a square around the origin of the HT-Matrices: 4 Points for each HT-Matrix. The size in x and y is given as parameter.

Example Illustration

 missing image of PL2T(T1,T2,bx,by)

Syntax

PL=PL2T(T1,T2,bx,by)

Input Parameter

T1: Start of bar
T2: End of bar
bx: size in x direction
by: size in y direction

Output Parameter

PL: List of 8 vertices to describe the edges of a bar from T1 to T2




Copyright 2010-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 algorithm, PL2T, calculates the vertices of a bar defined by two homogeneous transformation matrices, T1 and T2. The bar is represented by 8 points forming a square around the origin of each HT matrix.

Input Parameters

Output

Algorithm Steps

  1. Check if the number of input arguments is 4. If so, set by to the fourth argument; otherwise, set by to bx.
  2. Divide bx and by by 2 to get half the size in each direction.
  3. Calculate the four corner points for the starting transformation matrix T1:
    • p1: T1's origin minus half the size in x and y directions.
    • p2: T1's origin plus half the size in x direction, minus half in y direction.
    • p3: T1's origin plus half the size in both x and y directions.
    • p4: T1's origin minus half the size in x direction, plus half in y direction.
  4. Calculate the four corner points for the ending transformation matrix T2 using the same logic as for T1:
    • p5: T2's origin minus half the size in x and y directions.
    • p6: T2's origin plus half the size in x direction, minus half in y direction.
    • p7: T2's origin plus half the size in both x and y directions.
    • p8: T2's origin minus half the size in x direction, plus half in y direction.
  5. Combine all eight points into a single list, PL, which represents the vertices of the bar.
Algorithm explaination created using ChatGPT on 2025-08-19 00:09. (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