C++ Catmull-Rom Splines interpolaltion.
Compile the Catmull-Rom-Splines.cpp file and run it. A white window will appear with an empty canvas ready to draw.
Click with LMB to place points. The spline updates automatically as you add more points. Click back on the first point to close the curve — then you can start a new one.
Shortcuts:
- c → clear all curves
- a → de/activate the animation
- Esc → quit the program
The interpolation is done with Catmull-Rom splines, a type of cubic Hermite spline that passes through every control point. Both centripetal and uniform case are implemeted. The default method is centripetal, but it can be changed by commenting the centripedal section and uncommenting the uniform section.
Ideas, bug reports, or pull requests — all are welcome. Let’s build something awesome together!
Now it is your turn to draw nice smooth shapes.
Thank you for using Catmull-Rom Splines 🙂
Just interpolate!
