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
- T1: The starting transformation matrix of the bar.
- T2: The ending transformation matrix of the bar.
- bx: The size of the bar in the x-direction.
- by: The size of the bar in the y-direction. If not provided, it defaults to the value of bx.
Output
- PL: A list of 8 vertices that describe the edges of the bar from T1 to T2.
Algorithm Steps
- Check if the number of input arguments is 4. If so, set by to the fourth argument; otherwise, set by to bx.
- Divide bx and by by 2 to get half the size in each direction.
- 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.
- 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.
- 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