Rendering 3D B-splines in C++
using Qt
, OpenGL
and Eigen
.
B-splines are parametric curves that consist of several Bézier curves whose control points satisfy specific conditions. I used cubic Bézier curves for the interpolation of knots. Given a set of knots, a cubic Bézier curve is generated between each pair of knots. Then, these Bézier curves are glued together to form the final curve, the B-spline. The algorithm for the generation of the curves can be found here. Although it is about 2D B-splines, interpolating 3D B-splines is not so different.
- Install
CMake 3.25.1
or above. - Install
Visual Studio 2022
andMSVC C++ v143 Compiler
. - Install
Qt 6.7.3 MSVC2022 64bit
kit. - Set environment variable
Qt6_DIR
asC:\Qt\6.7.3\msvc2022_64
. - Clone the repo
git clone https://github.com/berkbavas/BSplineRenderer.git
. - Create a folder
mkdir Build
. - Enter the folder
cd Build
. - Run CMake
cmake ..
. - Open
BSplineRenderer.sln
withVisual Studio 2022
. - Build with
Release
configuration.