Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 908 Bytes

README.md

File metadata and controls

10 lines (8 loc) · 908 Bytes

Triangle-Barycentric-Algorithm

Summary

This is a program to take in irregularly shaped triangles and determines if a given coordinate falls within it's area. The user manually defines the triangle using a window, then places a point. Using the Barycentric Algorithm, this project will determine if that point is inside the triangle's bounds, outside, or stradling the edge of that triangle.

How to use

  1. Once compiled, the program will display an empty window.

  2. Click on any 3 random parts of this window. Once you've clicked the 3rd point on this window, the triangle will appear.

  3. Now determine a place to put the 4th point. Once clicked, text will appear in the top-left explaining where this point is in relation to the triangle.

    NOTE: Program does not allow user to override previously input coordinates, to fix a mistake (or run the program again), close the window and compile again.