A simple mesh subdivider algorithm implemented with C++ and Eigen. In addition to implementing this algorithm, I also modeled a pair of headphones in Maya with a low-poly coarse mesh to subdivide. Algorithm referenced. Run the project and many others here (contact me for access to the github repository).
This algorithm takes an object with a triangle mesh as an input and outputs a more refined, subdivided mesh. We can represent this object input with two arrays: old_vtx and old_tri, which store the certices and triangles of the original mesh respectively. For the output mesh, we store the vertices and triangles in the initally empty new_vtx and new_mesh.