CPKit
v1.6.1

Convex Hull Graham Scan

GeometryHard

Compute the minimal enclosing boundary around coordinates points.

Alt+Shift+H

Convex Hull Visual Border (Drag points to check dynamic updates)

P1 (-3, -2)P2 (3, -3)P3 (1, 3)P4 (-4, 2)P5 (0, 0)P6 (2, 1)

Time Complexity

O(N log N) sorting + O(N) stack sweeps

Space Complexity

O(N) stack storage
Conceptual Overview

Convex Hull is the smallest convex polygon that contains all points of a given dataset, forming a boundary border enclosing the points.

Mathematical Formula
\text{Orientation test (CCW): } (y_B - y_A)(x_C - x_B) - (x_B - x_A)(y_C - y_B) < 0
Source: CP-Algorithms geometry reference