This project demonstrate the implementation of collision detection on segments of a circle.
This algorithm check the distance between circle center point and mouse position if the distance less than or equals the radius then the point is inside the circle which lead us to the next step to calculate the angle between the center and mouse which then compare it with the evenly distributed slices of the circle.
To be able to compile this project you should have:
- Any C compiler (eg GCC)
- GNU Make
- git version control system
- pkg-config package configuration utility
- GTK4 GUI library
- libcairo low-level postscript like drawing library
To build this project follow these steps:
$ git clone https://github.com/joinlaw/pda-demo
$ cd pda-demo
$ make
to run the executable type:
$ ./demo
or to run the project in one drop:
$ make && ./demo
to clean build files:
$ make clean
To hack on this project use the common pull request workflow to push changes to repo but first follow the GNU coding standard and GNOME coding standard when writing your changes.
Generally don't put braces with curly brackets in the same line ;).
when rotating too much the algorithm will lose the control partially on some segments and rotating even further will broke the collision detection.
Critical security bugs should not revealed into the public until they are solved so since github doesn't support private issues you should report them at this email address: =mrfantastic at firemail dot cc=
Distributed under the GPLv3 or later License. See LICENSE for more information.