VLswapXY

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

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

Description

z-rotation by +90 degree of a vertex list that [x y z] becomes [y -x z];
This very fast function is used if a 2D/3D drawing should be rotated 90 degree around z.
The name could also be: VLFLrotateZ090, rotate090z
Inverse procedure: VLswapYZ(VL)

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

Example Illustration

 missing image of VLswapXY(VL)

Syntax

RVL=VLswapXY(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 performs a z-axis rotation by +90 degrees on a vertex list (VL), effectively swapping the x and y coordinates. The function is designed to handle both 2D and 3D vertex lists.

Input Parameters

Output

Algorithm Steps

  1. Initialize the rotation count r to 1. If a second argument is provided, set r to that value.
  2. For each rotation (from 1 to r):
  3. Assign the transformed vertex list to RVL.

This function is part of the SolidGeometry library and is used for quick 90-degree rotations around the z-axis. It is particularly useful for 2D/3D drawings that require such transformations.

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