Toolgeist › Developer

Convex Hull Visualizer — Real Graham Scan, Click to Add Points

A real Graham scan convex hull algorithm: points are sorted by polar angle from the lowest point, then scanned with a stack that pops any point failing an actual cross-product turn test — not a pre-baked hull shape drawn around your points. Click anywhere to add a point and watch the hull recompute; amber dots are points the algorithm genuinely rejected as interior, white connected dots are the real computed hull boundary.

How to use Convex Hull Visualizer — Graham Scan

  1. Click anywhere to add a point.
  2. Watch the hull update live.
  3. Notice which points end up amber (interior) versus white (on the hull).
  4. Randomize a new point cloud to see the pattern repeat.

Frequently asked questions

What is the convex hull, precisely?
The smallest convex polygon that contains every point in the set — imagine stretching a rubber band around all the points and letting it snap tight; the points it touches are the hull.
What is the cross-product turn test actually checking?
For the last three points on the scan stack, the cross product's sign reveals whether they turn left or right — a right turn (or straight line) means the middle point cannot possibly be on the convex hull, since some other path around it stays further out, so it gets popped from the stack.
Why sort by polar angle from the lowest point first?
Starting from a point guaranteed to be on the hull (the lowest, hence outermost, point) and sweeping by angle processes candidates in the exact order needed for the stack-based scan to correctly build the boundary in one pass.
Where is convex hull computation actually used?
Collision detection in games and physics engines, GIS boundary computation, pattern recognition, and as a building block in computational geometry algorithms like finding the diameter of a point set.

Related Developer tools

Also searched for: convex hull algorithm visualizer · graham scan demo online · convex hull calculator interactive

Browse all 738 free tools on Toolgeist →