Point within triangle test
This repository implements in C++, all the methods discussed in this blog , for checking whether a point is within a triangle. The application draws on the screen the triangle, the containing points and the points that are not enclosed in the triangle with different colors. A sample input file is provided (points.txt) that contains 2D points to check whether each one is within a triangle. The triangle is hardcoded into the source code.
Project Requirements
- C++11
- CMake
- OpenCV
Install OpenCV
sudo apt-get install libopencv-dev python-opencv
How to run on Linux
git clone https://github.com/gevago01/point-within-triangle-test.git
cd point-within-triangle-test
mkdir build
cd build
cmake ..
make
./PointInTriangle