VLtrans

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Spatial Relations
Introduced first in SolidGeometry 2.4, Creation date: 2015-08-08, Last change: 2025-09-14

return similar to PLtrans or SGtrans a transformed VL

Description

Function that analyzes the transfer argument for translation. Slower than VLtransT etc.
Usage of T
0 Center around origin
1 Only 1st quadrant
[nx3] Translation vector
[3x3] Rotation matrix
[3x4] Rotation plus translation matrix
[4x4] Fully homogenous transformation matrix

See Also: VLtransT , VLtransP , VLtrans1 , VLtrans0 , VLtransR , VLtransT , VLtransN

Example Illustration

 missing image of VLtrans(VLA,T)

Syntax

VL=VLtrans(VLA,T)

Input Parameter

VLA: Vertex list
T: Transformation vector

Output Parameter

VL: tranformed vertex list

Examples

close all; SGfigure(-30,30); view(-30,30)
VLtrans(VLaddz(PLcircle(10,8)),0)
VLtrans(VLaddz(PLcircle(10,8)),1)
VLtrans(VLaddz(PLcircle(10,8)),[0 0 40])
VLtrans(VLaddz(PLcircle(10,8)),rot([pi/3,pi/3,pi/3]))




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 VLtrans is designed to transform a vertex list (VLA) using a specified transformation (T). It is part of the SG-Library and is used for spatial transformations.

Input Parameters

Output

Algorithm Steps

  1. Check if the vertex list VLA has fewer than 3 columns. If so, add a z-coordinate of 0 using the function VLaddz.
  2. Create a structure SG with fields VL (set to VLA) and FL (an empty array).
  3. Call the function SGtrans with the structure SG and the transformation T to perform the transformation.
  4. Extract the transformed vertex list from SG.VL and assign it to VL.
  5. If no output is requested (i.e., nargout==0), plot the original and transformed vertex lists using SGfigure and VLplot.

Example Usage

The function can be used in various ways, as shown in the examples:

Algorithm explaination created using ChatGPT on 2025-08-19 01:40. (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