momesana / de-casteljau_algorithm_demo

A very simple demo of the De-Casteljau's algorithm
GNU General Public License v3.0
2 stars 1 forks source link

Casteljau's Algorithm Demo

A very simple application that highlights how De-Casteljau's algorithm works by showing the intermediate lines used by the algorithm to calculate the resulting bezier curve.

Requirements

In order to compile this demo, you need to have:

How to build it

  1. Make sure the above mentioned requirements are met.
  2. Clone the repository or download an archive and unpack it, then change into the directory.
  3. $ mkdir build
  4. $ cd build
  5. $ cmake ../ (you may also have to add -DCMAKE_PREFIX_PATH or -DBUILD_WITH_QT5 with appropriate values depending on your environment
  6. $ make

The resulting executable can then be launched by issuing ./src/de\_casteljau\_demo inside the build directory. If CMake fails to find Qt, you may use the CMAKE_PREFIX_PATH environment variable to help cmake locate the correct version of Qt. Running CMake would then may look like this for Qt5 $ cmake -DCMAKE_PREFIX_PATH=~/Qt/5.15.2/gcc_64 -DBUILD_WITH_QT5=ON .. or the following for Qt6: $ cmake -DCMAKE_PREFIX_PATH=~/Qt/6.5.2 .. (assuming your Qt versions are installed under ~/Qt).

Screenshot

de-casteljaus-screenshot

License

The application is released under the terms of the GPLv3 or any later edition.