Syntax
RVL=VLswapZY(VL,[n])
Input Parameter
VL : | | Original vertex list |
n : | | optional nr of repeated cylces, default is 1 |
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 designed to perform a rotation transformation on a vertex list (VL) in 3D space. The transformation specifically rotates the vertices around the x-axis by -90 degrees, effectively swapping the z-axis with the y-axis and inverting the y-axis.
Input Parameters
- VL: The original vertex list, which is a matrix where each row represents a vertex with coordinates [x, y, z].
- n: An optional parameter that specifies the number of times the rotation should be applied. If not provided, the default value is 1.
Output
- RVL: The rotated vertex list, where each vertex has been transformed according to the specified rotation.
Algorithm Steps
- Initialize the number of rotations,
n
, to 1. If a second argument is provided, set n
to this value.
- For each rotation cycle (from 1 to
n
):
- Transform the vertex list
VL
by rearranging the columns: the x-coordinate remains the same, the y-coordinate is replaced by the z-coordinate, and the z-coordinate is replaced by the negative y-coordinate.
- Update
VL
to the newly transformed vertex list RVL
.
- Return the final transformed vertex list
RVL
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:58. (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