Syntax
RVL=VLswapZ(VL)
Input Parameter
Output Parameter
RVL : | | Resulting vertex list |
Copyright 2013-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, VLswapZ
, is designed to mirror a list of vertices at the z-axis. It is part of the SolidGeometry library and was introduced by Tim Lueth in 2013.
Input Parameters
- VL: This is the input vertex list. It can be a 2D or 3D list of points or vertices. Each row in the list represents a vertex, and the columns represent the x, y, and z coordinates, respectively. Additional columns may exist for other data associated with each vertex.
Output Results
- RVL: This is the resulting vertex list after the mirroring operation. The z-coordinate of each vertex is negated, effectively mirroring the vertex across the z-axis.
Algorithm Explanation
The function begins by copying the input vertex list VL
to the output variable RVL
. This ensures that the original list is not modified during the operation.
The core operation of the function is performed in the line:
RVL=[RVL(:,1:2) -RVL(:,3) RVL(:,4:size(RVL,2))];
This line constructs a new matrix for RVL
by performing the following steps:
RVL(:,1:2)
: This extracts the first two columns of the vertex list, which correspond to the x and y coordinates. These coordinates remain unchanged.
-RVL(:,3)
: This negates the third column, which is the z-coordinate. This operation mirrors the vertex across the z-axis.
RVL(:,4:size(RVL,2))
: This extracts any additional columns beyond the third, preserving any extra data associated with each vertex.
The function then returns the modified vertex list RVL
, which contains the mirrored vertices.
Algorithm explaination created using ChatGPT on 2025-08-18 22:17. (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