Loop Subdivision

This is an implementation of a loop subdivision algorithm. The algorithm has two passes which together split each triangle into four new triangles. The first pass creates the new triangle vertices while the second adjusts the old vertices. Whether or not triangle edges are boundary or interior edges determine the math behind adjusting old vertices and creating new ones along that edge. Since vertex normals and texture coordinates are automatically handled by the algorithm along with the vertex positions, and because both boundary and interior edges are handled by the algorithm, the algorithm works on arbitrary triangle meshes.

The cube, torus, and bunny models only contain interior edges.


The open cube and stegosaurus models contain boundary edges in addition to interior edges.


Loop subdivision adjusts texture coordinates accordingly, as shown in the textured bunny model.