Skip to content

This program lets the user create a custom triangle using mouse-clicks. Then the user places a 4th point, and the program will use an algorithm for determining if this point falls within the triangle's area.

Notifications You must be signed in to change notification settings

CalebErnst01/Triangle-Barycentric-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

This program lets the user create a custom triangle using mouse-clicks. Then the user places a 4th point, and the program will use an algorithm for determining if this point falls within the triangle's area.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages