Convex Hull

Convex hull of a set of points

List the points as x,y pairs, e.g. 0,0, 6,0, 6,4, 0,4, 3,2. Order doesn't matter.

Andrew's monotone chain — sort the points, then sweep to build the lower and upper hull with cross-product turn tests
Hull vertices
4
Distinct points
6
Hull area
24
Hull perimeter
20
Hull vertices (counter-clockwise)
(0, 0)(6, 0)(6, 4)(0, 4)
Convex HullScatter plot of the input points with the convex hull outlined and its corner vertices highlighted.

Sobre esta calculadora

The Convex Hull Calculator finds the smallest convex polygon that encloses a set of 2D points using Andrew's monotone chain algorithm. It lists the hull's corner vertices in counter-clockwise order, counts how many points lie on the hull versus inside it, and reports the exact area and perimeter, with a scatter plot that outlines the result. Duplicate and collinear points are handled correctly.

How to find a convex hull

  1. Enter your points as x,y pairs separated by commas — the order doesn't matter.
  2. The calculator merges duplicates and sorts the points from left to right.
  3. It sweeps the sorted points to build the lower and upper boundary, keeping only the corner vertices where the outline turns left.
  4. Read off the hull vertices, area, and perimeter, and see the outline drawn over your points.

Exemplos comuns

  • Square corners 0,0 6,0 6,4 0,4 with interior points 3,2 and 2,1 → 4 hull vertices, area 24, perimeter 20
  • Triangle 0,0 4,0 0,3 → 3 hull vertices, area 6, perimeter 12
  • Collinear points 0,0 1,1 2,2 3,3 → degenerate hull (a line segment), area 0
  • Square 0,0 4,0 4,4 0,4 plus apex 2,5 → 5 hull vertices as the peak extends the top edge

Perguntas frequentes

What is a convex hull?

The convex hull of a set of points is the smallest convex polygon that contains all of them — like stretching a rubber band around the outermost points and letting it snap tight.

Which points become hull vertices?

Only the extreme corner points lie on the hull. Points strictly inside the shape, and points that fall exactly on a hull edge, are not listed as vertices.

How are duplicate or collinear points handled?

Identical points are merged first. If every point lies on a single straight line, the hull collapses to a line segment with zero area, which the calculator reports as a degenerate hull.

How many points do I need?

At least three distinct, non-collinear points are required to form a hull with positive area.