VLswapYZ

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

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

Description

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

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

Example Illustration

 missing image of VLswapYZ(VL)

Syntax

RVL=VLswapYZ(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 function, VLswapYZ, is designed to perform a specific transformation on a list of vertices. It is part of the SolidGeometry library and was introduced to facilitate the manipulation of 3D coordinates, particularly for converting 2D drawings from the x/y plane to the x/z plane.

Input Parameters

Output Results

Algorithm Explanation

The function performs a simple transformation on the input vertex list VL. For each vertex in the list, the function rearranges the coordinates as follows:

This transformation effectively rotates the vertex list around the x-axis by +90 degrees, which is useful for converting 2D drawings from the x/y plane to the x/z plane.

Code Explanation

The core of the function is a single line of code:

RVL = [VL(:,1) -VL(:,3) VL(:,2)];

This line constructs the output matrix RVL by selecting and rearranging the columns of the input matrix VL:

The result is a new matrix RVL where each vertex has been transformed according to the specified rotation.

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