Completed for COMP 438/6381 at Concordia University
This B-Spline Editor project is an interactive B-Spline surface editor that allows users to manipulate control lattices and visualize tensor-product B-Spline surfaces in real time. Designed to explore geometric modeling and interactive 3D editing, this tool enables intuitive control over B-Spline patches with a minimal but functional UI, using the Ligigl library with C++.
- Click & Drag Control Points – Modify the shape of the B-Spline surface by moving control points in 3D space.
- Toggle Display Modes – Switch between control lattice, B-Spline surface, or both.
- Multiple Patches – Add and switch between multiple B-Spline patches dynamically.
- Keyboard Shortcuts:
1- Toggle control lattice visibility2- Toggle B-Spline surface visibility3- Add a new B-Spline patch4- Switch to the next patch5- Toggle visibility of the current patch
Note: You can only edit one patch at a time. Switching patches is necessary to make different control lattices interactive.
This project is built using libigl (C++), leveraging its mesh processing capabilities. The architecture is split into:
- Frontend (UI & Interaction) – Handles user input, point selection, and rendering toggles.
- Backend (Mesh Deformation) – Computes and updates the B-Spline surface based on control point transformations.
- C++ compiler
- CMake
- libigl
git clone https://github.com/altam-sh/BSplineEditor.git
cd libigl-example-project
cd build
rmdir /S
cmake ..
make
./BSplineEditorFrom there, simply navigate to \libigl-example-project\build\Debug and run the example.exe
Note: If the build fails or the cmake .. command is causing issues, I've found success running the following command instead:
cmake -DCMAKE_POLICY_VERSION_MINIMUM="3.5" ..I built this to explore the world of geometric modeling and interactive editing. B-Splines are widely used in CAD and animation, and implementing a real-time editor gave me a deeper understanding of their structure and behavior.