mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-30 16:51:57 +08:00
Documentation for 554919d9f5
This commit is contained in:
@@ -137,7 +137,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">Jarvis’s</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_md57"></a>
|
||||
<h3><a class="anchor" id="autotoc_md58"></a>
|
||||
Algorithm</h3>
|
||||
<p>The idea of Jarvis’s 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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.46.1 (20210213.1702)
|
||||
<!-- Generated by graphviz version 2.47.2 (20210527.0053)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="395pt" height="100pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.46.1 (20210213.1702)
|
||||
<!-- Generated by graphviz version 2.47.2 (20210527.0053)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="469pt" height="100pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Reference in New Issue
Block a user