plotT2P

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

plots a HT matrix as straight line vector



See Also: pplot , lplot , tfplot , tlplot , slplot , plotTP , plotL , plotT

Example Illustration

 missing image of plotT2P(p,c,s,w,N)

Syntax

plotT2P(p,[c,s,w,N])

Input Parameter

p: Point or
c: color
s: width
w: String for name
N: Name of Frame




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)

The function plotT2P is designed to plot a homogeneous transformation matrix as a straight line vector. It is part of the SolidGeometry library and was introduced in version 2.1. The function takes a point and optional parameters to customize the plot.

Input Parameters

Algorithm Steps

  1. Initialize default values for c, s, w, and N based on the number of input arguments.
  2. Determine the size of p to extract the ez vector and the point p:
    • If p is 3x3, set ez to the second column and p to the third column.
    • If p is 4x4 or 3x4, set ez to the third column and p to the fourth column.
    • If p does not match these sizes, use the first optional argument as ez and adjust other parameters accordingly.
  3. Ensure p and ez are 3D vectors by appending a zero if they are 2D.
  4. Compute the transformation matrix T using the function Tof2P with p and ez.
  5. Extract the translation vector t and the ez vector from T.
  6. Determine the label zt for the plot based on the presence of N.
  7. Plot the line using lplot from t to t + s*ez with the specified color and width.
  8. Create a circle using PLcircle and transform it with VLtransT using T.
  9. Set the colormap and color limits, then plot the circle using patch.
  10. Plot the point t using pplot with a black dot.
Algorithm explaination created using ChatGPT on 2025-08-19 07:42. (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