---
id: hull
title: "Convex Hull"
author: Benjamin Qi
description: Smallest convex polygon containing a set of points on a grid.
prerequisites:
- Platinum - Geometry Primitives
## [Convex Hull](https://en.wikipedia.org/wiki/Convex_hull_algorithms)
- [Kattis Convex Hull](https://open.kattis.com/problems/convexhull)
### Tutorial
- Graham Scan
- [cp-algo](https://cp-algorithms.com/geometry/grahams-scan-convex-hull.html)
- [My Implementation](https://github.com/bqi343/USACO/blob/master/Implementations/content/geometry%20(13)/Polygons/ConvexHull2.h)
- Monotone Chain
- CPH 30.3 (brief)
- [Wikipedia](https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain)
- [My Implementation](https://github.com/bqi343/USACO/blob/master/Implementations/content/geometry%20(13)/Polygons/ConvexHull%20(13.2).h)
### Problems
- [USACO Plat - Balance Beam](http://www.usaco.org/index.php?page=viewproblem2&cpid=864)
- quite easy (but make sure to avoid precision issues)
- [USACO Plat - Falling Portals](http://www.usaco.org/index.php?page=viewproblem2&cpid=998)
- [USACO Old Gold - Fencing](http://www.usaco.org/index.php?page=viewproblem2&cpid=534)
- [USACO Old Gold - Cow Curling](http://www.usaco.org/index.php?page=viewproblem2&cpid=382)
- [Kattis Fence Orthogonality](https://open.kattis.com/problems/fenceortho)
- [AGC 44 Random Pawn](https://atcoder.jp/contests/agc044/tasks/agc044_e)
- Generalization of "Balance Beam"
Minkowski addition?