next up previous
Next: Up: Previous:

Jarvis' March

Jarvis-March(P) $\;\;\;\;\;$; P = $\langle p_0, .., p_{n-1} \rangle$ points
$\;\;\;\;\;$p = p0, the lowest point
$\;\;\;\;\;$while p not highest point
$\;\;\;\;\;$ $\;\;\;\;\;$find point pm with minimum polar angle from $p \longrightarrow$
$\;\;\;\;\;$ $\;\;\;\;\;$add pm to convex hull
$\;\;\;\;\;$ $\;\;\;\;\;$p = pm
$\;\;\;\;\;$while $p \neq p_0$
$\;\;\;\;\;$ $\;\;\;\;\;$find point pm with minimum polar angle from $\longleftarrow p$
$\;\;\;\;\;$ $\;\;\;\;\;$add pm to convex hull
$\;\;\;\;\;$ $\;\;\;\;\;$p = pm


next up previous
Next: Up: Previous: