Assume we have a mesh represented as a half edge datastructure.
We want to subdivide faces without introducing unnecessary vertices (i.e the new number of vertices must be exactly V + E where V is the old number of vertices and E is the old number of edges).
This is what a single subdivided triangle looks like: [![enter image description here][1]][1]
If I naively try to iterate over every edge and reconnect faces I get the following sequence [![enter image description here][2]][2] [![enter image description here][3]][3] [![enter image description here][4]][4]
Clearly this is wrong.
If instead I iterate over the faces I get the following pattern:
[![enter image description here][5]][5]
This is happening because at every step I am trying to to:
- Focus on only one simplex at a time,
- Maintain the connectivity information of the mesh in a valid state (every edge has <2 faces, vertices only exist at the end of edges, faces only have 3 Half edges...), like for example, I am avoiding getting into this state:
[![enter image description here][6]][6]
Any suggestions? [1]: https://i.sstatic.net/MYmhk.png [2]: https://i.sstatic.net/Jgn94.png [3]: https://i.sstatic.net/D4SZe.png [4]: https://i.sstatic.net/04SMi.png [5]: https://i.sstatic.net/vWp6b.png [6]: https://i.sstatic.net/4SexY.png