Syntax
EL=ELswap(EL)
Input Parameter
Output Parameter
Examples
[EL ELswap(EL)]
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 algorithm is a function named ELswap
that flips the orientation of an edge list. It is part of the SolidGeometry library and was introduced by Tim Lueth in 2012.
Input Parameters
- EL: This is the edge list that the function takes as input. An edge list is typically a matrix where each row represents an edge, and the two columns represent the start and end points of the edge.
Output Results
- EL: The function returns the edge list with its orientation flipped. This means that for each edge, the start and end points are swapped.
Algorithm Explanation
The function ELswap
performs the following steps:
- It takes the input edge list
EL
.
- It creates a new matrix by swapping the columns of
EL
. This is done using the expression [EL(:,2) EL(:,1)]
, which rearranges the columns of the matrix.
- The function then applies
flipud
to the rearranged matrix. The flipud
function flips the matrix in the up-down direction, but in this context, it effectively just returns the rearranged matrix since the rows are not altered.
- The result is a new edge list where each edge's start and end points are swapped.
Example
An example usage of the function is given as [EL ELswap(EL)]
, which shows the original and flipped edge lists side by side.
The function does not support contour edge lists, meaning it does not handle cases where the order of contours is significant.
Algorithm explaination created using ChatGPT on 2025-08-18 22:16. (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