The project implements the Catmull-Clark subdivision surface algorithm with C++.
The source includes following knowledge:
- half edge data structure representing mesh.
- C++11 syntax and
shared_ptr
,weak_ptr
. - freeglut opengl library.
- obj file reading implementation.
In ubuntu:
$ sudo apt install -y freeglut3-dev
$ mkdir build && cd build
$ cmake .. && make -j
In macOS:
$ brew install freeglut
$ mkdir build && cd build
$ cmake .. && make -j
ccsubd filename.obj
- up/down/left/right arrow key -> up/down/left/right rotation
c
key -> subdivison one timeu
key -> previous mesh