Input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a corresponding vertices list).
It sometimes happens a triangle may be duplicated several times. The goal of this problem is to remove all the duplicated triangles of T, and to keep only one.
For instance if :
T_in = [1 2 3;...
4 5 6;...
1 2 3;...
7 8 9;...
6 4 5;...
10 11 12;...
2 1 3;...
8 7 9;...
10 11 12]
then the output must be :
T_out = [1 2 3;...
4 5 6;...
7 8 9;...
10 11 12]
since rows [1 2 3], [6 4 5], [2 1 3], [8 7 9], and [10 11 12] are just duplicata. Indeed triangle [i2 i1 i3] is the same as triangle [i1 i2 i3] for example.
Hypothesis :
- T is always a N x 3 integer matrix with N > 0 (non empty matrix)
- Each row / triangle of T always contains three distinct integers
See also
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers54
Suggested Problems
-
Matrix with different incremental runs
598 Solvers
-
336 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
405 Solvers
-
Is this triangle right-angled?
6852 Solvers
-
Compute the missing quantity among P, V, T for an ideal gas
260 Solvers
More from this Author42
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!