Game Development Reference
Figure 15.7 Identification of vertices in an extraordinary vertex in the modified
Figure 15.8 Identification of border vertices in the modified butterfly scheme.
Implementing modified butterfly subdivision
Having explained the theory, now for a practical guide to implementation.
First, we need to know more about our mesh than just the vertices and
polygons. We need to know about the edges in the mesh and we need to
know how the vertices connect to other vertices. For this purpose we
create two new structures, EDGE and POINTCON. EDGE stores both the
indices of the end-points and the index of an added mid-point vertex.
POINTCON stores the valence of the vertex, an ordered array of vertex
indices stored in anticlockwise order and a flag to indicate whether this
vertex is a border vertex. If the flag is set then this is a boundary vertex;
if the border flag is set for both vertices in an edge then the edge must be