I need an algorithm that, given a certain polygonal object, can find out how many vertices the polygon has. The object consists of faces, edges and vertices. An edge has 2 vertices but a vertice kan have an unknown amount of edges. The data model I am using is hierarchical:
Bodies contain Faces, which contain Loops (linked lists of Edges that define the edge of a Face). Those edges exist of 2 vertices. This means that vertices can be the same, but be defined multiple times (for every edge). I can compare them to find matching locations but that is going to be pretty exhausting.
This is for an assignment, so I cannot change the dataa model. I need a way that traverses the model. Oh and please don't give me Euler, the assignment is to prove the correctness of Euler :)
Any pointers are most welcome.