xuzebin / point-in-polygon

An interactive program for creating polygons and determining if a given point is inside or outside the polygons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Point in Polygon

Experimenting the point-in-polygon algorithm with C++ and OpenGL.

Runtime

O(N), where N = #sides of polygon(s).

Build and Run

mkdir build && cd build
cmake ..
make

// Run example with single polygon
./Example

// Run example with multiple polygons 
// (i.e. you can draw multiple polygons and test
// if a point is inside of any of the polygons).
./Example2

Examples

Alt Text Alt Text

About

An interactive program for creating polygons and determining if a given point is inside or outside the polygons


Languages

Language:C++ 96.6%Language:CMake 3.4%