
Implementation of loop subdivision algorithm in Smooth Subdivision Surfaces Based on Triangles by Charles T. Loop (1987)
c++ 20
CMake 3.12+
VTK 9.4.0+
VTK has its own implementation of loop subdivision,
see vtkLoopSubdivisionFilter.
This project provides an optimized re-implementation of the Loop subdivision algorithm using data-oriented design (DOD)
principles.
The implementation includes two distinct data layouts: Array of Structures (AoS) and Structure of Arrays (SoA), allowing
for a comparative analysis of their performance benefits in a computational geometry context.
See the differences between AoS and SoA here.
The program accepts a triangular mesh file as input. The following file formats are supported:
- .stl
- .ply
- .obj
- .vtk
Loop subdivision result mesh files, exported to resultAoS.stl and resultSoA.stl in data folder
1.Clone the repo
2.Initialize the submodule
3.Build the project
cd LoopSubdivision/build
cmake -DVTK_DIR=/dir/to/your/vtk/install ..
make