Documentation for 0fea073413

This commit is contained in:
github-actions
2022-10-25 21:38:38 +00:00
parent 179526ce7a
commit 54cd9079ad
1772 changed files with 5550 additions and 5247 deletions

View File

@@ -143,7 +143,7 @@ Functions</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation of <a href="https://en.wikipedia.org/wiki/Gift_wrapping_algorithm" target="_blank">Jarviss</a> algorithm. </p>
<p >Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the points of it.</p>
<h3><a class="anchor" id="autotoc_md72"></a>
<h3><a class="anchor" id="autotoc_md73"></a>
Algorithm</h3>
<p >The idea of Jarviss Algorithm is simple, we start from the leftmost point (or point with minimum x coordinate value) and we keep wrapping points in counterclockwise direction.</p>
<p >The idea is to use orientation() here. Next point is selected as the point that beats all other points at counterclockwise orientation, i.e., next point is q if for any other point r, we have “orientation(p, q, r) = counterclockwise”.</p>