Authors: Sebastien Alaiwan, Vivien Bonnet
This is a sandbox for prototyping computational geometry algorithms. It uses fibers to allow visual single-stepping through algorithms, while keeping intrusivity minimal.
The goal here is to be able to easily copy prototyped algorithm code to other projects, where it won't be as easy to experiment with.
So we don't want the algorithm implementations to depend too much on this project.
This is why the core sandbox only provides the absolute minimum data structures: Vec2, which is used for communication between the algorithm and the sandbox, and span, whose implementation leaves not much room for choice anyway.
More advanced geometric data structures are expected to be provided by the specific algorithm implementations.
Triangulation using the Bowyer-Watson algorithm:
Voronoi diagram using the Fortune algorithm:
Polyline simplification using the Douglas-Peucker algorithm:
Continuous collision detection using the separating-axis-theorem:
Convex space partitionning using BSP:
Requirements:
* libsdl2-dev
It can be compiled to native code using your native compiler (gcc or clang):
$ make
The binaries will be generated to a 'bin' directory (This can be overriden using the BIN makefile variable).
Just run the following command:
$ bin/GeomSandbox.exe <appName>
For example:
$ bin/GeomSandbox.exe Example
Keys:
- F2 : reset the algorithm with new input data.
- Space: single-step the current algorithm.
- Return: finish the current algorithm.
- Keypad +/- : zoom/dezoom
- Keypad arrows : scroll