Skip to content

dawidswiton/jarvismarch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeQL

jarvismarch

Convex Hull algorithm

Simplest solution of creating a convex hull.

List<Point> points = new ArrayList<>();

points.add(new Point(100, 100));
points.add(new Point(160, 150));
points.add(new Point(200, 200));
points.add(new Point(150, 180));
points.add(new Point(100, 200));
points.add(new Point(150, 150));

points = JarvisMarch.convexHull(points);

After this you will get convex hull points in appropriate order.