Syntax
TR=TRunique(TR)
Input Parameter
TR : | | Tetrahedron triangulation |
Output Parameter
TR : | | Tetrahedron triangulation with unique Points |
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 tetrahedron triangulation by ensuring that all points within the triangulation are unique. It then reindexes the connectivity list based on these unique points.
Input Parameters
- TR: This is the input tetrahedron triangulation. It contains a set of points and a connectivity list that defines how these points form tetrahedrons.
Output Results
- TR: The output is a tetrahedron triangulation where all points are unique, and the connectivity list is updated to reflect these unique points.
Algorithm Steps
- The function begins by calling the
unique
function on TR.Points
with the 'rows' option. This operation identifies unique rows in the matrix of points, effectively removing duplicate points.
- The
unique
function returns three outputs:
a:
A matrix containing the unique points.
~:
An unused output that would normally contain the indices of the first occurrence of each unique point.
c:
A vector that maps each original point to its corresponding unique point in a
.
- The function then constructs a new triangulation object using the updated connectivity list and the unique points. The connectivity list is reindexed using
c(TR.ConnectivityList)
, which maps the original connectivity list to the indices of the unique points.
- The function returns the updated triangulation
TR
with unique points and a reindexed connectivity list.
Algorithm explaination created using ChatGPT on 2025-08-18 21:55. (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