Syntax
FL=FLshift(FL)
Input Parameter
Output Parameter
Examples
FL=[10 20 30; 30 10 20; 20 30 10]
FL=[FL*1.5;FL]
FLshift(FL)
Copyright 2014-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 process a facet list (FL) by rotating each row so that the smallest vertex index is in the first column. The function does not sort the rows after this operation.
Input Parameters
- FL: The original facet list, which is a matrix where each row represents a facet with three vertex indices.
Output Results
- FL: The final facet list with each row rotated such that the smallest vertex index is in the first column.
Algorithm Steps
- Check each row of the facet list to determine if the first vertex index is greater than the second vertex index.
- If the first vertex index is greater than the second, rotate the row so that the second vertex index becomes the first, the third becomes the second, and the first becomes the third.
- Repeat the check for the first vertex index against the third vertex index. If the first is greater, rotate the row so that the third vertex index becomes the first, the first becomes the second, and the second becomes the third.
- Perform the first check again to ensure the smallest index is in the first column after the previous rotations.
Example
Given a facet list:
FL = [10 20 30; 30 10 20; 20 30 10]
After applying the function:
FL = [10 20 30; 10 20 30; 10 20 30]
Each row is rotated to ensure the smallest vertex index is in the first column.
Algorithm explaination created using ChatGPT on 2025-08-18 22:34. (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