The aim of this project was to implement 'loop subdivision' algorithm. A subdivision algorithm is used to represent a smoother surface through creating a coarser polygon mesh. The loop subdivision is a two-pass approximating algorithm. In the first pass one creates all the new points and triangles for the coarser mesh. The second pass refines all the old points that were not created during the first pass. The challenge in this project was to handle the boundary and interior edges differently.
Here is another example. Each image represents the loop algorithm refining the previous mesh: