If I have the number of faces and vertices, how do I determine the topology of a filled polygon?

조회 수: 4 (최근 30일)
I have a filled polygon created by the 'patch' function and what I would like to do calculate it's topology. My input to the 'patch' command was generated by the 'isosurface' function, so I know the number of vertices and faces, but I need to determine the number of edges so that I can compute the Euler Characteristic.
Any help would be greatly appreciated.
-n
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 4월 27일
I would have thought that if you are trying to work only with the number of faces and vertices that there are multiple answers, as you do not have any connectivity information?

댓글을 달려면 로그인하십시오.

채택된 답변

Roger Stafford
Roger Stafford 2013년 4월 27일
편집: Roger Stafford 2013년 4월 27일
Surely you mean you want the topology of a polyhedron, rather than a "filled polygon".
You should be able to directly calculate the number of edges from the structure produced by 'isosurface'. Write code such that for every pair of adjacent vertices in each of the polygon faces, the corresponding pair of vertex indices will be appended as a two-element row to a single two-column array, and then do a sort along its rows so that index pairs alway appear in ascending order. Then do a unique(... , 'row') on this sorted array. The number of resulting unique pairs must necessarily be the same as the number of unique edges.
  댓글 수: 1
Nora
Nora 2013년 4월 27일
Thank you for your advice.
I've just begun to work with 3D structures and I don't know how to determine the adjacency of vertices. Would you mind to provide some code?
My input is defined as a 3D signed distance function I call 'isosurface(phi3D,0)' and it returns and structure containing the vertices and faces. For me vertices has 2158x3 elements and faces has 4312x3 elements.
Thank you for your help. -n

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by