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
- p: A point or transformation matrix. It can be a 3x3, 4x4, or 3x4 matrix.
- c: (Optional) Color of the plot. Default is 'g-' (green line).
- s: (Optional) Width of the plot. Default is 10.
- w: (Optional) String for the name. Default is 1.
- N: (Optional) Name of the frame. Default is an empty array.
Algorithm Steps
- Initialize default values for
c
, s
, w
, and N
based on the number of input arguments.
- 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.
- Ensure
p
and ez
are 3D vectors by appending a zero if they are 2D.
- Compute the transformation matrix
T
using the function Tof2P
with p
and ez
.
- Extract the translation vector
t
and the ez
vector from T
.
- Determine the label
zt
for the plot based on the presence of N
.
- Plot the line using
lplot
from t
to t + s*ez
with the specified color and width.
- Create a circle using
PLcircle
and transform it with VLtransT
using T
.
- Set the colormap and color limits, then plot the circle using
patch
.
- 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