HTplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 5.2, Creation date: 2022-05-18, Last change: 2025-09-15

plots a HT matrix

Description

in the plane San Diego to Boston

See Also: tplot

Example Illustration

 missing image of HTplot(T,Torg)

Syntax

h=HTplot(T,[Torg])

Input Parameter

T: HT matrix
Torg: Origin of T

Output Parameter

h: handle to go

Examples


A=SGsample(27); SGfigure(-30,30); T=TofP([20 0 10],rot(0,0,pi/10)); A=SGtransT(A,T);
SGplotalpha(A,'w',0.5); B=SGtransT(A,T); SGplotalpha(B,'w',0.5); HTplot(T,T);




Copyright 2022-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, HTplot, is designed to plot a homogeneous transformation (HT) matrix in a 3D space. It is part of the SolidGeometry library and is used for visualizing transformations in kinematics and frames.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the origin transformation matrix Torg using the function getfuncparams. If not specified, it defaults to the identity matrix.
  2. Compute the transformed matrix T0 by multiplying Torg with T.
  3. Initialize an empty array h to store plot handles.
  4. Plot the transformed matrix T0 using the function tplot with parameters for size and label, and append the handle to h.
  5. Plot the origin matrix Torg using tplot with different parameters for size and label, and append the handle to h.
  6. Draw a line between the origin and the transformed position using lplot, specifying the color, line width, and style, and append the handle to h.

Example Usage

The example provided demonstrates how to use the HTplot function:

A = SGsample(27);
SGfigure(-30,30);
T = TofP([20 0 10], rot(0,0,pi/10));
A = SGtransT(A, T);
SGplotalpha(A, 'w', 0.5);
B = SGtransT(A, T);
SGplotalpha(B, 'w', 0.5);
HTplot(T, T);

This example shows how to create a sample object, apply a transformation, and plot the result using HTplot.

Algorithm explaination created using ChatGPT on 2025-08-18 22:54. (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