Syntax
RVL=VLswapX(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 algorithm is designed to mirror a 2D or 3D point/vertex list at the x-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, which can be a 2D or 3D array of points. Each row represents a point, and the columns represent the x, y, and possibly z coordinates.
Output Results
- RVL: This is the resulting vertex list after mirroring the input list at the x-axis.
Algorithm Explanation
The function VLswapX
takes a vertex list VL
as input and returns a new vertex list RVL
that is mirrored at the x-axis. The mirroring is achieved by negating the x-coordinates of each point in the list.
Steps
- Initialize
RVL
as a copy of VL
.
- Negate the x-coordinates of all points in
RVL
. This is done by multiplying the first column of RVL
by -1.
- Return the modified
RVL
as the output.
Code Explanation
function RVL=VLswapX(VL)
RVL=VL; % Copy the input vertex list to RVL
RVL=[-RVL(:,1) RVL(:,2:size(RVL,2))]; % Negate the x-coordinates
end
Algorithm explaination created using ChatGPT on 2025-08-18 22:14. (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