Problem 60981. Mesh the pentagon (with the minimum number of triangles)
- regexp
- assignin
- str2num
- echo
Solution Stats
Problem Comments
-
4 Comments
To visualize and check your result you can do for instance :
trisurf(T,V(:,1),V(:,2),V(:,3));
colormap([0 1 1]);
axis equal, alpha(0.5);
Hi, I was wondering should the following mesh pass the test:
T = [1, 2, 3; 5, 1, 3; 4, 5, 3]
There should not be intersecting triangles, and the triangle vertices should be enumerated counter-clockwise.
Hi Pauli. You are right of course. Actually it corresponds to the test case #4,
T_correct4 = [3 4 5; 3 5 1; 3 1 2];
but while improving the tests, I forgot to put back the circular shift possibilities. I am going to do it now. Thanks again.
There was a little bug in the tests. I just fixed them. Thanks again for this feedback Pauli.
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
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!