From c6def0e8a26e96b80c206720bdec3a55078dee5c Mon Sep 17 00:00:00 2001 From: William Boyles <40878829+wmboyles@users.noreply.github.com> Date: Sun, 8 Jul 2018 15:02:30 -0400 Subject: [PATCH 1/3] Replaced duplicate point from test example --- .../gift_wrapping/jarvis_march/code/py/jarvisMarch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/py/jarvisMarch.py b/chapters/computational_geometry/gift_wrapping/jarvis_march/code/py/jarvisMarch.py index 781f598a1..34bea40e4 100644 --- a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/py/jarvisMarch.py +++ b/chapters/computational_geometry/gift_wrapping/jarvis_march/code/py/jarvisMarch.py @@ -26,7 +26,7 @@ def jarvisMarch(gift): def main(): - testGift = [(5, 7), (5, 7), (-6, -12), (-14, -14), (9, 9), + testGift = [(-5, 2), (5, 7), (-6, -12), (-14, -14), (9, 9), (-1, -1), (-10, 11), (-6, 15), (-6, -8), (15, -9), (7, -7), (-2, -9), (6, -5), (0, 14), (2, 8)] hull = jarvisMarch(testGift) From 5e6a70d6c98085296867058053bae93f32e16a2e Mon Sep 17 00:00:00 2001 From: William Boyles <40878829+wmboyles@users.noreply.github.com> Date: Sun, 8 Jul 2018 15:20:58 -0400 Subject: [PATCH 2/3] Include python code in .md --- .../gift_wrapping/graham_scan/graham_scan.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md b/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md index 877e8111c..346adedbd 100644 --- a/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md +++ b/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md @@ -20,6 +20,8 @@ We can find whether a rotation is counter-clockwise with trigonometric functions [import:24-26, lang:"c_cpp"](code/c/graham.c) {% sample lang="js" %} [import:36-38, lang:"javascript"](code/javascript/graham-scan.js) +{% sample lang="py" %} +[import3-5, lang:"python"](code/python/grahamScan.py) {% endmethod %} If the output of this function is 0, the points are collinear. @@ -42,6 +44,8 @@ In the end, the code should look something like this: [import:65-95, lang:"c_cpp"](code/c/graham.c) {% sample lang="js" %} [import:1-30, lang:"javascript"](code/javascript/graham-scan.js) +{% sample lang="py" %} +[import31-44, lang:"python"](code/python/grahamScan.py) {% endmethod %} ### Bibliography From 63f6ba6287ad31ecb19712484df14122435bba41 Mon Sep 17 00:00:00 2001 From: William Boyles <40878829+wmboyles@users.noreply.github.com> Date: Sun, 8 Jul 2018 15:22:30 -0400 Subject: [PATCH 3/3] Change in wrong branch --- .../gift_wrapping/graham_scan/graham_scan.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md b/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md index 346adedbd..877e8111c 100644 --- a/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md +++ b/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md @@ -20,8 +20,6 @@ We can find whether a rotation is counter-clockwise with trigonometric functions [import:24-26, lang:"c_cpp"](code/c/graham.c) {% sample lang="js" %} [import:36-38, lang:"javascript"](code/javascript/graham-scan.js) -{% sample lang="py" %} -[import3-5, lang:"python"](code/python/grahamScan.py) {% endmethod %} If the output of this function is 0, the points are collinear. @@ -44,8 +42,6 @@ In the end, the code should look something like this: [import:65-95, lang:"c_cpp"](code/c/graham.c) {% sample lang="js" %} [import:1-30, lang:"javascript"](code/javascript/graham-scan.js) -{% sample lang="py" %} -[import31-44, lang:"python"](code/python/grahamScan.py) {% endmethod %} ### Bibliography