by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Spatial Relations
Introduced first in SolidGeometry 1.0, Creation date: 2013-04-23, Last change: 2025-09-14
See Also: VLswapYZ
, VLswapZY
, VLswapXY
, VLswapYX
, VLswapZX
, VLswapXZ
, VLswapY
, VLswapZ
RVL=VLswapX(VL)
VL: | Vertex list |
RVL: | Resulting vertex list |
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.
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.
RVL as a copy of VL.RVL. This is done by multiplying the first column of RVL by -1.RVL as the output.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 endAlgorithm explaination created using ChatGPT on 2025-08-18 22:14. (Please note: No guarantee for the correctness of this explanation)