Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Why would 40 faces / 32 vertices have 120 edges

This topic is 540 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I put the found edges from a face into a set, and each of those will differ

if their vertex ids or vertex ids reverses (2 of them) are not the same But finally, still 120 edges are reported....

I speculate there would be only 64 edges in 32 vertices and 40 faces....

Let's say I had 40 faces at first. I iterate thru them, say for face1,

it has edge0, 1 and 2 and put them into a std::set....

Edited by lucky6969b

Share this post


Link to post
Share on other sites
Advertisement

Slow down. What is the mesh you find puzzling? What topological and structural constraints do you expect it to have? Are they hoped for or actually enforced? it's an important question because an arbitrary nonmanifold mesh can have from zero to n*(n-1)/2 distinct edges and from 0 to at least O(n*n) faces for the same set of n vertices. Only very constrained mesh types have a predictable number of edges and faces.

Edited by LorenzoGatti

Share this post


Link to post
Share on other sites

If your faces are triangles, then it's self evident that there will be 120 edges for 40 faces. I'm not sure what exactly you are working with, but I would start from this premise. A better question is, "Why wouldn't your 40 faces have 120 edges?" The number of vertices may tell you nothing of the number of triangles. If you have an index buffer, vertices can be reused without sharing an edge.

 

I would recommend reducing the problem. For example, make it two faces and try and solve the problem with just two faces and however many vertices that takes. If you can solve the simple problem, then add more to it and solve that until you get back to the original problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!