Gift Wrapping Algorithm

The gift wrapping algorithm is a simple algorithm for computing the convex hull of a given set of points.

Planar case

In the two-dimensional case the algorithm is also known as Jarvis march, by the name of the author, and has O(NK) time complexity, where N is the number of points and K is the number of points on the convex hull. Its real-life performance compared with other convex hull algorithms is favorable when N is small or K is expected to be very small with respect to N. In general case the algorithm is outperformed by many others. The gift wrapping algorithm begins with a point A known to be on the convex hull, e.g., the leftmost point, and selects the point B such that all points are to the right of the line AB. This point may be found on O(N) time by comparing polar angles of all points with respect to point A taken for the center of polar coordinates. Repeating with B and so on until one reaches A again yields the convex hull in K steps. The gift wrapping algorithm is exactly analogous to the process of winding a string (or wrapping paper) around the set of points.

Higher dimensions

The approach is extendable to higher dimensions.

Related articles

 

<< PreviousWord BrowserNext >>
tienne de la botie
song (disambiguation)
dirichlet series
douvrin
anjali
culture of hong kong
queen charlotte
jiaxing
places of worship in hong kong
the bookman (new york)
fightbox
uss reprisal (brig)
tourism in hong kong
bbc three
black boy
cbeebies
ricki wilde
museums in hong kong
cbbc channel
the vapors
list of urban public parks and gardens of hong kong
hong kong park
flagstaff house
bar chart
gwangyang
severn (disambiguation)
operation big
yale (disambiguation)
hong kong disneyland
operation harborage
uithof
bbc parliament
kowloon bay
saab toad
saab monster
government house, hong kong
generation terrorists
sterling, pennsylvania
mount sterling
victoria city
hsbc hong kong headquarters building
beth number
prince of wales building
augustan history