Syntax
VL=VLtransR(VL,[R])
Input Parameter
VL : | | Original vertex list |
R : | | 3x3 Rotation matrix |
Output Parameter
VL : | | Transformed vertex list |
Examples
VL=VLtransR(VL,rot(pi/2,0,0))
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 function, VLtransR
, is designed to transform a list of vertices using a rotation matrix. It is part of the SolidGeometry library and was introduced by Tim Lueth.
Input Parameters
- VL: The original vertex list that needs to be transformed.
- R: A 3x3 rotation matrix. This matrix is optional and defaults to the identity matrix if not provided.
Output
- VL: The transformed vertex list after applying the rotation.
Algorithm Steps
- Initialize the rotation matrix
R
to the identity matrix eye(3)
.
- Check if a second argument is provided and if it is a 3x3 matrix. If so, set
R
to this matrix.
- Create a transformation matrix
T
by extending R
to a 4x4 matrix with an additional row and column for homogeneous coordinates. The last row and column are set to [0 0 0 1]
.
- Call the function
VLtransT
with the vertex list VL
and the transformation matrix T
to apply the transformation.
Example
An example usage of the function is VL=VLtransR(VL,rot(pi/2,0,0))
, which rotates the vertex list VL
by 90 degrees around the x-axis.
Algorithm explaination created using ChatGPT on 2025-08-18 22:47. (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