Two ways to implement:
// ignore
Robot motion planning. Find shortest path in the plane from s to t that avoids a polygonal obstacle.
Farthest pair problem. Given N points in the plane, find a pair of points with the largest Euclidean distance between them.
Geometric properties
Choose point p with smallest y-coordinate.
Sort points by polar angle with p.
Consider points in order; discard unless it create a counterclockwise turn.
Given three points a, b, and c, is a → b→ c a counterclockwise turn?