RVL=VLswapZX(VL)
VL : | Original vertex list |
RVL : | Rotated vertex list. |
This algorithm is a function named VLswapZX
that performs a specific transformation on a list of vertices. The function is designed to rotate a 3D vertex list by -90 degrees around the y-axis, effectively swapping the z-axis with the x-axis. This transformation is useful when a 2D drawing made in the x/z plane needs to be used in the x/y plane.
The function VLswapZX
takes a matrix VL
as input, where each row corresponds to a vertex with coordinates [x, y, z]. The function then constructs a new matrix RVL
by rearranging the columns of VL
as follows:
RVL
is taken from the third column of VL
(z-coordinate).RVL
is taken from the second column of VL
(y-coordinate).RVL
is the negative of the first column of VL
(-x-coordinate).This transformation effectively rotates the vertex list by -90 degrees around the y-axis, swapping the z-axis with the x-axis.
The function is part of a library for spatial relations and was introduced in SolidGeometry 1.0. It is a fast function used for specific 2D to 3D transformations. The inverse procedure to revert the transformation is VLswapXZ
.