Convex Hull Algorithms Jarvis Algorithm or gift wrapping algorithm To understand the Jarvis’s Convex Hull Algorithm at first we have to take a glance the detecting process of orientation of given three cartesian 2D points. Picture - 1 In the above picture the orientation of Points A, B and C is Clockwise, Orientation of Points D, E and F is Counter Clockwise and Orientation of Points G, H and I is Linear. According to the picture, if the Orientation of Points X, Y and Z is Clockwise then Orientation of Points Z, Y and X must be Counter Clockwise and vice versa. Suppose we have three cartesian 2D points $ X(x_{1},y_{1}) $ , $ Y(x_{2},y_{2}) $ and $ Z(x_{3},y_{3}) $. The slope of XY is $$ m1 = \frac{ y_{2} - y_{1} } { x_{2} - x_{1} } $$ The slope of YZ is $$ m2 = \frac{ y_{3} - y_{2} } { x_{3} - x_{2} } $$ If m1 > m2 , X, Y and Z orientation will be clockwise, If m1 < m2 , ...