Fun and experimentation with curve drawing algorithms using Ada.
- De Castelijau
- De Boor
- Catmull Rom
- Lagrange interplation on equidistant nodes
- Lagrange interpolation on Chavyshev nodes
One needs to install cmake to build glfw3 and gprbuild to build OpenGLAda.
In order to recieve the OpenGLAda submodule, you need to clone recursively:
git clone https://github.com/alkhimey/Ada_Curve.git --recursive
make will execute:
gprbuild -p -P adacurve.gpr -XWindowing_System=x11 -XGLFW_Version=3
make run will execute:
Path to the font file is optional and is required only for displaying the text on the screen.
- Press and hold
Hto view help information.
- Right-click on an empty locating to add a control point there.
- Right-click on a control point to delete it.
- Left-click and drag control point to move it.
Ato cycle through different algorithms.
Pto toggle control points and control polygon.
When displaying a B-Spline curve (De Boor algorithm):
Uto transform the knot vector into a uniform and clamped vector.
- In De-Boor algorithm, knot multiplicity in the middle of the knot vector causes incorrect rendering of the curve.