VLswapZX

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Spatial Relations
Introduced first in SolidGeometry 1.0, Creation date: 2012-05-02, Last change: 2025-09-14

z-axis becomes x-axis of a VL (y-rotation by -90 degree)

Description

y-rotation by -90 degree of a vertex list that [x y z] becomes [z y -x];
This very fast function is used if a 2D drawing is made in x/z and should be used in x/y.
The name could also be: VLFLrotateX270, rotate270X
Inverse procedure: VLswapXZ(VL)

See Also: VLswapYZ , VLswapZY , VLswapXY , VLswapYX , VLswapXZ , VLswapX , VLswapY , VLswapZ

Example Illustration

 missing image of VLswapZX(VL)

Syntax

RVL=VLswapZX(VL)

Input Parameter

VL: Original vertex list

Output Parameter

RVL: Rotated vertex list.




Copyright 2012-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 is a function named VLswapZX that performs a specific transformation on a list of vertices. The function is designed to rotate a 3D vertex list by -90 degrees around the y-axis, effectively swapping the z-axis with the x-axis. This transformation is useful when a 2D drawing made in the x/z plane needs to be used in the x/y plane.

Input Parameters

Output Results

Algorithm Explanation

The function VLswapZX takes a matrix VL as input, where each row corresponds to a vertex with coordinates [x, y, z]. The function then constructs a new matrix RVL by rearranging the columns of VL as follows:

This transformation effectively rotates the vertex list by -90 degrees around the y-axis, swapping the z-axis with the x-axis.

Additional Information

The function is part of a library for spatial relations and was introduced in SolidGeometry 1.0. It is a fast function used for specific 2D to 3D transformations. The inverse procedure to revert the transformation is VLswapXZ.

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