Skip to content

berkbavas/BSplineRenderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B-Spline Renderer

Render 3D B-splines in C++ using Qt, OpenGL, and Eigen.

Overview

B-splines are parametric curves composed of multiple Bézier segments, where each segment's control points satisfy specific continuity conditions. This project uses cubic Bézier curves to interpolate between knots. For each pair of knots, a cubic Bézier curve is generated, and these are joined to form the final B-spline curve.

The core algorithm is based on this reference (originally for 2D B-splines, but easily adapted to 3D).

Features

  • Interactive 3D B-spline curve rendering
  • Modern C++ codebase
  • Utilizes Qt for GUI, OpenGL for rendering, and Eigen for linear algebra

Build Instructions

  1. Install dependencies:

  2. Set environment variable:

    • Qt6_DIR to C:\Qt\6.7.3\msvc2022_64
  3. Clone the repository:

    git clone https://github.com/berkbavas/BSplineRenderer.git
  4. Create and enter build directory:

    mkdir Build
    cd Build
  5. Generate build files with CMake:

    cmake ..
  6. Open the solution in Visual Studio:

    • Open BSplineRenderer.sln in Visual Studio 2022
  7. Build the project:

    • Build and run.

Demo Video

BSplineRenderer.mp4

For more details on the mathematics of B-splines, see the UCLA handout.

License

This project is licensed under the MIT License.

About

3D B-Spline renderer written in C++ using Qt, OpenGL and Eigen

Topics

Resources

License

Stars

Watchers

Forks