<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AJCM</journal-id><journal-title-group><journal-title>American Journal of Computational Mathematics</journal-title></journal-title-group><issn pub-type="epub">2161-1203</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ajcm.2013.31A003</article-id><article-id pub-id-type="publisher-id">AJCM-30854</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  On Constructing Approximate Convex Hull
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>.</surname><given-names>Zahid Hossain</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>M.</surname><given-names>Ashraful Amin</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Computer Vision and Cybernetics Research Group, School of Engineering and Computer Science, Independent University, Dhaka, Bangladesh</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>mzhossain@gmx.com(.ZH)</email>;<email>aminmdashraful@ieee.org(MAA)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>30</day><month>04</month><year>2013</year></pub-date><volume>03</volume><issue>01</issue><fpage>11</fpage><lpage>17</lpage><history><date date-type="received"><day>January</day>	<month>29,</month>	<year>2013</year></date><date date-type="rev-recd"><day>February</day>	<month>28,</month>	<year>2013</year>	</date><date date-type="accepted"><day>March</day>	<month>13,</month>	<year>2013</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   The algorithms of convex hull have been extensively studied in literature, principally because of their wide range of applications in different areas. This article presents an efficient algorithm to construct approximate convex hull from a set of n points in the plane in O(n+k) time, where k is the approximation error control parameter. The proposed algorithm is suitable for applications preferred to reduce the computation time in exchange of accuracy level such as animation and interaction in computer graphics where rapid and real-time graphics rendering is indispensable. 
 
</p></abstract><kwd-group><kwd>Convex Hull; Approximation Algorithm; Computational Geometry; Linear Time</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The construction of planar convex hull is one of the most fundamental problems in computational geometry. The applications of convex hull spread over large number of fields including pattern recognition, regression, collision detection, area estimation, spectrometry, topology, etc. For instance, computer animation, the most crucial section of computer gaming, requires fast approximation for real-time response. Consequently, it is evidential from literature that numerous studies focus on fast approximation of different geometric structures in computer graphics [1,2]. Moreover, the construction of exact and approximate convex hull is used as a preprocessing or intermediate step to solve many problems in computer graphics [3,4].</p><p>Convex hull for a given finite set <img src="3-1100227\d717e601-1d54-468f-b804-92d18bd885c4.jpg" /> of <img src="3-1100227\2360da80-0b4f-4414-a503-7b4f1666f9c6.jpg" /> points where <img src="3-1100227\a62c78e7-2a3e-491d-83be-95d1fc85ea61.jpg" /> denotes the <img src="3-1100227\3165112d-8eeb-4c12-9a5b-c3939fc01f21.jpg" />-dimensional Euclidean space, is defined as the smallest convex set that contains all the <img src="3-1100227\6418f94c-5da2-4efe-8ecd-865061e934bb.jpg" /> points. A set <img src="3-1100227\abb08f12-cc36-49cf-9f31-f723578d84b2.jpg" /> is convex if for two arbitrary points<img src="3-1100227\b462d555-a75d-48c1-9403-093098916895.jpg" />, the line segment <img src="3-1100227\cdfe1074-254d-4d1e-8438-b90912463cd5.jpg" /> is entirely contained in the set<img src="3-1100227\00cb7379-26bf-4c69-a838-d39fbdbcd664.jpg" />. Alternatively, the convex hull can be defined as the intersection of all halfspaces (or half-planes in<img src="3-1100227\b828d9ab-e276-4e48-9173-ea6e667206f9.jpg" />) containing<img src="3-1100227\9ec97902-c5ff-42fe-bd58-cd99d4263681.jpg" />. The main focus of this article is limited on the convex hull in Euclidean plane<img src="3-1100227\95d8b645-3142-4cb1-842b-58376b37e34c.jpg" />.</p></sec><sec id="s2"><title>2. Previous Work</title><p>Because of the importance of convex hull, it is natural to study for improvement of running time and storage requirements of the convex hull algorithms in different Euclidean spaces. Graham [<xref ref-type="bibr" rid="scirp.30854-ref5">5</xref>] published one of the fundamental algorithms of convex hull, widely known as Graham’s scan as early as 1972. This is one of the earliest convex hull algorithms with <img src="3-1100227\ed5ddc91-11ec-4c2b-ba6b-0f75373566c7.jpg" /> worst-case running time. Graham’s algorithm is asymptotically optimal since <img src="3-1100227\8e593b40-472b-49cc-bdd7-c52f990db7e8.jpg" /> is the lower bound of planar convex hull problem. It can be shown [<xref ref-type="bibr" rid="scirp.30854-ref6">6</xref>] that <img src="3-1100227\31332069-4091-4c6d-b2cc-2c5e7a85fb8a.jpg" /> is a lower bound of a similar but weaker problem of determining the points belonging to the convex hull, not necessarily producing them in cyclic order.</p><p>However, all of these lower bound arguments assume that the number of hull vertices <img src="3-1100227\e2bd2e24-b909-47df-9e76-b236873a4736.jpg" /> is at least a fraction of<img src="3-1100227\6037bc4a-140f-42e4-abb2-f8f152318e00.jpg" />. Another algorithm due to Jarvis [<xref ref-type="bibr" rid="scirp.30854-ref7">7</xref>] surpasses the Graham’s scan algorithm if the number of hull vertices <img src="3-1100227\49a11654-f3ea-422b-a1d3-866e1d4d4cfc.jpg" /> is substantially smaller than<img src="3-1100227\459dbfeb-97ee-4d3a-ac7a-9a54ebb4efe8.jpg" />. This algorithm with <img src="3-1100227\41880019-d88e-4773-8265-e04369893c4c.jpg" /> running time is known as Jarvis’s march. There is a strong relation between sorting algorithm and convex hull algorithm in the plane. Several divide-and-conquer algorithms including MergeHull and QuickHull algorithms of convex hull modeled after the sorting algorithms [<xref ref-type="bibr" rid="scirp.30854-ref8">8</xref>] and the first algorithm Graham’s [<xref ref-type="bibr" rid="scirp.30854-ref5">5</xref>] scan uses explicit sorting of points.</p><p>In 1986, Kirkpatrick and Seidel [<xref ref-type="bibr" rid="scirp.30854-ref9">9</xref>] proposed an algorithm that computes the convex hull of a set of <img src="3-1100227\e91495f0-7b6d-44c7-978c-6cbf8f5a8bd5.jpg" /> points in the plane in <img src="3-1100227\5c913f3b-5da9-4e37-b5f9-bd02478a775d.jpg" /> time. Their algorithm is both output sensitive and worst case optimal. Later, a simplification of this algorithm [<xref ref-type="bibr" rid="scirp.30854-ref9">9</xref>] was obtained by Chan [<xref ref-type="bibr" rid="scirp.30854-ref10">10</xref>]. In the following year Melkman [<xref ref-type="bibr" rid="scirp.30854-ref11">11</xref>] presented a simple and elegant algorithm to construct the convex hull for simple polyline. This is one of the on-line algorithms which construct the convex hull in linear time.</p><p>Approximation algorithms for convex hull are useful for applications including area estimation of complex shapes that require rapid solutions, even at the expense of accuracy of constructed convex hull. Based on approximation output, these algorithms of convex hull could be divided into three groups—near, inner, and outer approximation algorithms. Near, inner, and outer approximation algorithms compute near, inner, and outer approximation of the exact convex hull for some point set respectively.</p><p>In 1982, Bentley et al. [<xref ref-type="bibr" rid="scirp.30854-ref12">12</xref>] published an approximation algorithm for convex hull construction with <img src="3-1100227\ae039d67-ab37-4313-9a39-8eb7af058251.jpg" /> running time. Another algorithm due to Soisalon-Soininen [<xref ref-type="bibr" rid="scirp.30854-ref13">13</xref>] which uses a modified approximation scheme of&#160; [<xref ref-type="bibr" rid="scirp.30854-ref12">12</xref>] and has the same running time and error bound. Both of the algorithms are the inner approximation of convex hull algorithm. The proposed algorithm in this article is a near approximation algorithm of <img src="3-1100227\71095709-b375-4c35-be16-54122845e656.jpg" /> running time.</p></sec><sec id="s3"><title>3. Approximation Algorithm</title><p>Let <img src="3-1100227\0918039a-0350-400f-93d5-a299fdfb2c4b.jpg" /> be the finite set of <img src="3-1100227\30e476a4-ab34-4e20-bcd5-1e54741ad535.jpg" /> points in general position and the (accurate) convex hull of <img src="3-1100227\d917500c-3ec6-4664-8a73-a8e0d6bb864b.jpg" /> be<img src="3-1100227\77e77c07-a5bd-48df-b488-e911ee647a11.jpg" />. Kavan, Kolingerova, and Zara [<xref ref-type="bibr" rid="scirp.30854-ref14">14</xref>] proposed an algorithm with <img src="3-1100227\54831776-39ae-40fd-8d07-c2914a2c6805.jpg" /> running time which partitions the plane <img src="3-1100227\3f837036-e8de-4da5-82d3-9be41d09cd1e.jpg" /> into <img src="3-1100227\e5dc02e2-16de-4f34-8d54-9fc53ecedf58.jpg" /> sectors centered in the origin. Their algorithm requires the origin to be inside the convex hull. (It is possible to choose a point <img src="3-1100227\ec71e778-5eea-447b-9382-64270bf66027.jpg" /> and translate all the other points of <img src="3-1100227\a1054715-d475-4f66-93a7-804e1589034a.jpg" /> accordingly using additional steps in their algorithm). Conversely, we partition the plane <img src="3-1100227\5cc8a595-dadc-4d88-890d-99ab514a95d0.jpg" /> into <img src="3-1100227\1d2e0bc3-ecd9-4b3a-8d28-85094ff8e741.jpg" /> vertical sector pair with equal central angle <img src="3-1100227\3ed199db-9be4-46e2-b485-fe26d7753547.jpg" /> in the origin and for our algorithm the origin <img src="3-1100227\94bf66f6-6e53-4f3f-912e-33ac63d03bc6.jpg" /> could be located outside of the convex hull. The sets represent the vertically opposite sectors that form the vertical sector pairs defined as</p><p><img src="3-1100227\fb9032b9-6646-4e1d-b85f-b88227b18c01.jpg" /></p><p>where, <img src="3-1100227\cb0d7df7-1903-4981-bfc6-bedb84c9681e.jpg" />and the central angle<img src="3-1100227\65db6e49-c9ba-4347-8c83-2c733c2b8c72.jpg" />. Then, the sets <img src="3-1100227\9734ab35-738d-453c-a9ec-e66bd010ca2a.jpg" /> and <img src="3-1100227\d2a368d2-092b-448d-be5e-d3f75ec6d2de.jpg" /> denote the points belonging to the set <img src="3-1100227\dcb9d74f-3a9a-4ce9-990d-1c59bb5e96be.jpg" /> in sectors <img src="3-1100227\99bd627c-0928-478a-96ff-89e08665ee09.jpg" /> and <img src="3-1100227\c0bedba8-36f7-4cc6-9b85-c8accd5dc88f.jpg" /> respectively. Formally,</p><p><img src="3-1100227\a90a6030-c10f-436c-82c5-0ba0e25ff9ed.jpg" /></p><p>A pair of unit vectors <img src="3-1100227\5680f048-92ac-4f4e-adfc-146d5fbcae27.jpg" /> and <img src="3-1100227\f7df5bd3-cf3f-4435-ae43-fb749feb9663.jpg" /> obtain in <img src="3-1100227\c960ecfd-1963-40ae-b6a3-e2eef033ef87.jpg" /> th vertical sector pair as</p><p><img src="3-1100227\b355d9bd-59d6-47da-85cf-60eeecd5267e.jpg" /></p><p><img src="3-1100227\474dcebd-a5ac-483b-8af5-aa1a171f6176.jpg" /></p><p>The maximum projection magnitudes in the directions of <img src="3-1100227\312b13e1-57b9-4770-b3d4-a74f24797362.jpg" /> and <img src="3-1100227\71b545f5-36b9-43ce-ae98-379883c0c8c0.jpg" /> are (<xref ref-type="fig" rid="fig1">Figure 1</xref>)</p><p><img src="3-1100227\46ef68ff-392e-4e5c-8015-a1f840812125.jpg" /></p><p>The definition of max function is extend to return <img src="3-1100227\628cccb2-da65-40d4-ad9f-8e42f57b105a.jpg" /> for no parameter. The sets of points which provide the maximum projection magnitude in the sectors of <img src="3-1100227\5b5cb50d-3cce-4e5a-a126-8b6b2e35a4dc.jpg" />th vertical sector pair are</p><p><img src="3-1100227\d67491a0-0f08-42a6-bb15-ecd8daeee9b6.jpg" /></p><p>The vectors that produce the maximum magnitude in the directions of <img src="3-1100227\619a3eca-dddf-4b00-b832-52f0ffecc032.jpg" /> and <img src="3-1100227\1b570fbb-fed8-4346-a226-cbb58a7dacb3.jpg" /> for some points in the <img src="3-1100227\5ad1117b-2ad6-4be2-84d5-b01427efaa80.jpg" />th vertical sector pair are</p><p><img src="3-1100227\9a6336f6-6780-4a42-8990-78e7eec91bc5.jpg" /></p><p>The magnitude of the vectors <img src="3-1100227\0b521b6f-dcd4-4dda-8663-96908a07b905.jpg" /> and <img src="3-1100227\a60faf04-f181-457f-b980-63620bafbbe6.jpg" /> could be <img src="3-1100227\2099b2c5-3fae-48a3-8439-0ed22de962d7.jpg" /> for the <img src="3-1100227\34be200a-b3f2-40c1-8d2b-a069a4f74164.jpg" />th vertical sector pair containing less than two points. The sets <img src="3-1100227\bc296fcb-c89c-4c4f-82ce-5fedc6cb87f0.jpg" /> and <img src="3-1100227\4dfa2789-9e05-4892-89b0-d40a4b008063.jpg" /> containing all the finite vectors in the ranges <img src="3-1100227\64263343-93cd-4d5b-998b-3a412d93c12b.jpg" /> and<img src="3-1100227\f675e6f7-a76a-4b79-9cf3-9baaf131f38f.jpg" />, are</p><p><img src="3-1100227\78f80d6e-7476-4a3d-8923-a5475f0a6314.jpg" /></p><p>Let, <img src="3-1100227\d817e06f-4b3e-451f-849f-df66f51a80b0.jpg" />and <img src="3-1100227\f2808bd4-ef24-40a9-906a-f3c1be7b967f.jpg" /> contains at least three terminal points of the vectors in general position to construct the convex hull.</p><p>The convex hull approximation of <img src="3-1100227\6222457e-806c-4aa3-9656-8e4db9a28eeb.jpg" /> vertical sector pairs according to the proposed algorithm in this article is:</p><p><img src="3-1100227\e29e9ca8-577f-430d-8c49-c0d3f310e9bb.jpg" /></p></sec><sec id="s4"><title>4. Implementation</title><p>The input of the algorithm <img src="3-1100227\431518d0-d9b4-4264-bbfb-d2f9ea2d098a.jpg" /> is a set of <img src="3-1100227\60a8addc-c698-4372-825c-aa9eef42b89d.jpg" /> points in general position. For simplicity, we assume that the origin <img src="3-1100227\d522351a-bc2e-4831-a275-29b18a849ece.jpg" /> and<img src="3-1100227\d0d102d0-936d-4e6f-b3a4-88ca54b7a06d.jpg" />. (This assumption can be achieved by taking a point arbitrarily close to the origin instead of the origin itself, within the upper bound of error calculated in Section 5) (<xref ref-type="fig" rid="fig2">Figure 2</xref>).</p><p>We also assume that at least two vertical sector pairs together contains minimum three points (where none of these two are empty). The assumption can be reduced to one of the requirements of minimum three points input (i.e.,<img src="3-1100227\ffd27643-4ed4-4172-a69e-5a263c7a0a57.jpg" />) of convex hull. To illustrate that, let us consider <img src="3-1100227\ccfeb5cf-d92c-477f-b193-b7eddf671432.jpg" /> and <img src="3-1100227\3edf104f-48ff-4d3b-8b63-767a902d3e03.jpg" /> to be two points in <img src="3-1100227\727b45f1-47b2-4c68-8c14-a7745b4346cc.jpg" /> such that <img src="3-1100227\5d86c452-ca33-45e5-a74f-b534a6df303c.jpg" /> where <img src="3-1100227\3b12b72e-8e24-4a29-98ac-1c95f40cbdad.jpg" /> is the origin. Such two points do exist if no three points are collinear in <img src="3-1100227\a2bd1c52-19e5-4fbe-9b45-09e111faa420.jpg" /> (i.e., the points of <img src="3-1100227\97248310-6201-433d-b26c-1ca456e02027.jpg" /> are in general position). If <img src="3-1100227\bdcc287e-42cf-4fae-a770-68172b8747dd.jpg" /> is the bisector of<img src="3-1100227\526c8cd2-ea3a-4ebe-b3ee-191c73573018.jpg" />, then adding the angle of <img src="3-1100227\bfe83bd8-87d7-45d9-94b7-eef59d025ded.jpg" /> from positive <img src="3-1100227\0a727b7b-5925-4060-83ac-00d8a8c4c4bd.jpg" />-axis as an offset to every vertical sector pair ensures that all the input points cannot be in the same vertical sector pair. Thus, the assumption is satisfied. Alternatively, if less than three absolute values in <img src="3-1100227\c259f5ff-e754-40f3-97ef-918dfc0a0878.jpg" /> are finite, then for each<img src="3-1100227\52722adb-22d3-4549-83ec-1d48c864a784.jpg" />, assign <img src="3-1100227\8a048945-f3cf-40e8-8c91-4719a7726fd8.jpg" /> to <img src="3-1100227\56d70883-b0bb-4ed8-a5f5-145f76678c6f.jpg" /> and <img src="3-1100227\5a5c8ca7-306c-4280-80cc-4ce2b2abbc51.jpg" /> where these are infinite. (The next pa-</p><p>ragraph contains details about M.) Therefore, the number of points in <img src="3-1100227\061b1192-dbb5-4c83-8736-d53573b1647a.jpg" /> must be at least three.</p><p>A circular array <img src="3-1100227\abf47746-7774-4fd8-ac2d-bcd8ee212f85.jpg" /> is used to contain the <img src="3-1100227\c257dd82-e772-4a97-8611-bbb094d98a13.jpg" /> pairs of unit vectors of all the <img src="3-1100227\a07cca73-af8d-40dd-b9b2-7485210e36e4.jpg" /> vertical sector pairs and another circular array <img src="3-1100227\5b2446b6-0769-4304-be62-2e798e357e5c.jpg" /> is used to hold the number of <img src="3-1100227\c3cf301a-3380-4c56-ab31-96b6e4d8f67c.jpg" /> pairs of maximum projection magnitude in all the <img src="3-1100227\46cfa4c2-9f86-4f38-be42-446f36ebec5f.jpg" /> vertical sector pairs. Both circular arrays have the same size of <img src="3-1100227\ee5201e1-35e5-45a0-9378-838f98a96cbf.jpg" /> and use zero based indexing scheme. The function atan2 is a variation of function arctan with point as a parameter. The function returns the angle in radians between the point and the positive <img src="3-1100227\9641a7da-5c42-4482-9b64-276332a39f52.jpg" />-axis of the plane in the range of<img src="3-1100227\093f2da9-28b7-43b6-98e9-34a22c3e365c.jpg" />. The function anglex searches sequentially for the index of maximum angular distance between two consecutive positive finite vectors (computed using projection magnitude with index referring angle). If the index is <img src="3-1100227\c90842e2-8ad1-4d01-8557-ddd70b49ab29.jpg" /> such that maximum angle occurs in between <img src="3-1100227\2c94a3c1-1e91-4514-bd86-053cbac2fce4.jpg" /> and<img src="3-1100227\6d5552ea-bc21-4f66-8789-e4e6b0279500.jpg" />, the anglex function returns<img src="3-1100227\fb90f307-f7a6-4e1e-8862-a9e6dc9a9822.jpg" />. The final convex hull is constructed using Melkman’s [<xref ref-type="bibr" rid="scirp.30854-ref11">11</xref>] algorithm from set of <img src="3-1100227\62391718-7736-4ca9-9102-574538836f3a.jpg" /> points which are the terminal points of finite vectors computed in steps 14 and 15. If the first three points of <img src="3-1100227\6e2a6121-4939-4da5-965c-7fd44caf613a.jpg" /> are collinear, displacing one of these points within the error bound solves the problem.</p><p>Since the vertices of the convex hull produced by the proposed algorithm are not necessarily in the input point set<img src="3-1100227\9011df8e-de0b-4934-9315-ac67a5cfd3a7.jpg" />, the algorithm cannot be applied straight away to solve some other problems. Let us consider another circular array <img src="3-1100227\69ec7bed-072f-4546-ad24-5c600f94dc73.jpg" /> of <img src="3-1100227\c3abc2cc-412f-49cd-bdb2-f92d819c0476.jpg" /> size which used to contain the points generating the inner products of<img src="3-1100227\7479cc62-b390-499a-b883-44f89e81c034.jpg" />. Adding the point <img src="3-1100227\83381293-0cff-4f43-a251-a09a9e240209.jpg" /> instead of <img src="3-1100227\2f97f56b-696b-4e20-b63f-f7d9be6719b2.jpg" /> to the sequence <img src="3-1100227\a94bf281-5216-4216-b977-0d84a89cac32.jpg" /> in Steps 14 and 15 ensures that the vertices of the convex hull will be the points from<img src="3-1100227\d3216a5c-6da1-4440-82f1-6de9dd69792e.jpg" />. These modifications of the algorithm allow us to solve some problems including approximate farthest-pair problem but increase the upper bound of error (described in Section 5) to<img src="3-1100227\fdbcfef1-63a3-4d25-ae23-39609eda6ded.jpg" />.</p></sec><sec id="s5"><title>5. Error Analysis</title><p>There are different schemes for measuring the error of an approximation of the convex hull. We measured the error as distance from point set of accurate convex hull<img src="3-1100227\0ac995e2-5281-47fc-b3c2-d1f776a57211.jpg" />. The distance of an arbitrary point <img src="3-1100227\b630ac56-ddf0-425c-9c1d-280221ff33ae.jpg" /> from a set <img src="3-1100227\1ad0801e-fd64-49fd-8cad-b033d5f97dbe.jpg" /> is defined as</p><p><img src="3-1100227\5d4791bd-9a8b-4283-966b-2d1659175dcf.jpg" /></p><p>Formally the approximation error <img src="3-1100227\430452f9-be6b-49cb-9b3a-abf64d4f91c2.jpg" /> can be defined as</p><p><img src="3-1100227\98e5ac2c-67fb-4a26-99d7-3835bfbe04bf.jpg" /></p><p>It is sufficient to determine the upper bound of error <img src="3-1100227\73bf29ea-5ba6-4625-b88c-879af0f5453b.jpg" /> of the approximate convex hull<img src="3-1100227\70f80c80-a8ee-4589-903f-f3e90e92381e.jpg" />. Let, <img src="3-1100227\3a76b59e-b413-48eb-8efa-8b1f49354faf.jpg" />be be a point lying outside of the convex hull <img src="3-1100227\d83a0331-8b03-4e3c-9315-066db6b1ab5c.jpg" /> and <img src="3-1100227\967f49dc-6779-4707-8689-38a5a38775a8.jpg" /> be the origin. Suppose that, <img src="3-1100227\5c029353-86e7-4a89-8697-9cf1f79c4901.jpg" />is an edge of the approximate convex hull (as shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>).</p><p>Therefore, the distance of the point <img src="3-1100227\9fffcb5c-d638-4fa0-add2-5e47907e2441.jpg" /> from the</p><p><img src="3-1100227\b9e1ef4c-e7dd-4493-892f-3dd7babbfad5.jpg" />is</p><p><img src="3-1100227\f8ec575a-c12c-407b-8955-6e09d9e8bd7f.jpg" />.</p><p>The distance of the point <img src="3-1100227\30fbfcdf-bdb5-4d7b-a1ee-ea0c0f37027a.jpg" /> from vertex <img src="3-1100227\ac8a732d-d3f3-4d44-9719-f2ff5049f035.jpg" /> is<img src="3-1100227\ef7efede-ce4b-42e2-aaa9-0915be230297.jpg" />. Thus,</p><p><img src="3-1100227\2a9af38e-cfc3-4c21-826d-0deb6e791fa2.jpg" />.</p><p>Let, <img src="3-1100227\f71c196f-d73c-4fc2-be6e-55e452bb19bc.jpg" />and<img src="3-1100227\a6b06c38-2207-48f2-beb7-cea6d2fd82c4.jpg" />. Thus we obtain</p><p><img src="3-1100227\6a877b1d-9efc-4c35-b60b-342c89c8efc9.jpg" /></p><p>It follows that the minimum distance <img src="3-1100227\aee39711-2f31-4d7b-804e-adbbb62976ae.jpg" /> directly depends on <img src="3-1100227\5e04277c-7ed8-4e77-aa0f-55190724aa3a.jpg" /> which is denoted as function<img src="3-1100227\16ed933d-df6f-461e-abcb-a380409755d8.jpg" />. Thus, the upper bound of approximation error <img src="3-1100227\450ec1e7-6dfa-43d2-83d5-5a547620038c.jpg" /> is<img src="3-1100227\f1790143-2498-4d09-8db3-40f165fb3cec.jpg" />. If <img src="3-1100227\cd4ed239-ab34-4b74-a6f3-66d97e753b17.jpg" /> approaches to infinity, the <img src="3-1100227\5c171f3d-f36a-419a-acda-369406d5e08a.jpg" /> converges to<img src="3-1100227\91ba9bcb-6242-4791-a3b2-afa75628b46d.jpg" />.</p><p><img src="3-1100227\bc72f3c8-cf45-4f0a-8240-f0e2b065a73e.jpg" /></p><p>For instance, when k approaches to a large value, the area approximation error of the circle is reducing exponentially as shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>. Therefore, this algorithm is more optimize than the KKZ algorithm [<xref ref-type="bibr" rid="scirp.30854-ref14">14</xref>] with respect to error bound as shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p></sec><sec id="s6"><title>6. Correctness</title><p>Theorem 1. The approximation algorithm produces the convex hull from a set of points in <img src="3-1100227\c9ace6d3-8906-460d-8eef-e0a81e56d5bb.jpg" /> correctly within the prescribed error bound.</p><p>Proof. Since, Melkman’s algorithm can construct the convex hull correctly for points on a simple polygonal chain, it suffices to prove that the sequence of points <img src="3-1100227\597134fc-7506-43e5-bb0f-31df22b1b75b.jpg" /> denotes a simple polygonal chain. (Melkman [<xref ref-type="bibr" rid="scirp.30854-ref11">11</xref>] published the on-line algorithm of convex hull with formal proof of correctness in 1987).</p><p>Suppose that, the plane <img src="3-1100227\9c70e573-7adf-4c98-ba4a-919616a2b613.jpg" /> is partitioned into <img src="3-1100227\73e7a156-e99e-4474-89d9-77db62a183b9.jpg" /> vertical sector pairs which correspond to the sequence</p><p><img src="3-1100227\09282cea-8d61-40af-a0ae-4dc30bd2d7d4.jpg" />of <img src="3-1100227\2719bf67-e94b-4655-ba87-855b528c31e7.jpg" /> simple sectors. The sequence</p><p><img src="3-1100227\8e4776b4-ac06-44d1-8551-221c94f2f977.jpg" />of sectors is ordered according to the angle measured anticlockwise. If <img src="3-1100227\e3af9f67-e970-4397-b854-7dff7ee31653.jpg" /> is a half-line (denoting the set of points on the half-line) from the origin in the direction of the unit vector of the sector<img src="3-1100227\b87d471e-0744-4438-ba0c-598e55b7c8fe.jpg" />, then the sequence</p><p><img src="3-1100227\722eadf0-463f-420a-b9b7-cf2f9e889184.jpg" />represents all the half-lines correlated with the sequence<img src="3-1100227\830eb7ca-d0af-49e8-9803-89aa3aef32e4.jpg" />. According to the algorithm all the points of <img src="3-1100227\6a8e5b1c-f9c5-4634-a415-f99cf728dcaa.jpg" /> must be distinct (as referred in steps 9-10) and lying on some of the half-lines of<img src="3-1100227\ca51ad52-3f19-4eed-b2c6-5e1654d812a5.jpg" />. The sequence of half-lines <img src="3-1100227\a816bc08-a70a-42b5-8b19-11ba983fd869.jpg" /> where each contained at least one point from<img src="3-1100227\f8ffad20-14da-4ea6-85df-144652c2fcc9.jpg" />, is</p><p><img src="3-1100227\8adc7a0f-2d5a-4134-9243-0acf4446e741.jpg" /></p><p>Each half-line <img src="3-1100227\af182b59-433d-4f74-88dd-81bd8b964865.jpg" /> can contain at most two points of<img src="3-1100227\f8fafb44-c965-42f7-88da-df6bfceb735b.jpg" />. Let, <img src="3-1100227\9adf2b62-2d15-4395-88cf-f4a439fdea83.jpg" />are points on each halfline <img src="3-1100227\ad074386-87eb-4d10-bea5-a50583d39fd5.jpg" /> such that<img src="3-1100227\d5e074bc-7600-4150-b045-455021452af8.jpg" />. If a half-line <img src="3-1100227\67fc5581-2030-4bf6-be01-67f4bda11bbe.jpg" /></p><p>contains only one point of<img src="3-1100227\e86e311d-7d89-46bb-b378-e6e888fe7e5b.jpg" />, the length of virtual <img src="3-1100227\1d53b9de-1825-4c72-9e84-ae8e49d0183f.jpg" /> is zero with <img src="3-1100227\6641900a-628f-4b62-8147-1b37aa0e0586.jpg" /> and <img src="3-1100227\6a893387-a890-4894-bfff-f1b53be35078.jpg" /> refer to the same point of <img src="3-1100227\1a0d89f5-4090-4eef-abff-0e7634a273a7.jpg" /> (e.g., <img src="3-1100227\9692f3af-981f-4794-bf3c-f5856cbad0fc.jpg" />contains only one point in the <xref ref-type="fig" rid="fig6">Figure 6</xref>). Let <img src="3-1100227\4499f553-b0e4-4cc6-b5ea-70b7d32d712d.jpg" /> denotes the angle from <img src="3-1100227\c333e0a3-5c68-4e48-8aeb-ec407a6996b2.jpg" /> to <img src="3-1100227\72f54fca-e3c5-47c9-b70f-0d73fef87b82.jpg" /> where <img src="3-1100227\0d3808a3-304d-4c2d-a857-446eff7b7165.jpg" /> and <img src="3-1100227\96423b7a-e08a-4a98-afd0-ed798db3dfce.jpg" /> are half-lines from the origin. Since the angle between two consecutive half-lines <img src="3-1100227\0e638c62-14a9-4512-9070-2dcbe599ff39.jpg" /> and <img src="3-1100227\bfa26682-7b07-4072-8ffe-4f1409c7e757.jpg" /> (because <img src="3-1100227\d7bbb386-a224-4efb-a25a-d88e6d2e56d8.jpg" /> for our assumptions <img src="3-1100227\334431b1-cee5-43cc-aa2a-6389c4a8ca0b.jpg" /> and <img src="3-1100227\cf115dc1-bacd-47fe-a8f6-efca798969de.jpg" /> in the algorithm), no two line segments <img src="3-1100227\4b798c8c-585f-4620-9f28-b4566910c468.jpg" /> and <img src="3-1100227\ca91a528-78b0-4c58-99d3-93c6d2265187.jpg" /> intersect each other, for all<img src="3-1100227\99d972b7-2ef9-4a8f-a484-90a233a23ec0.jpg" />. However, the line segment <img src="3-1100227\c58459e7-e906-4061-a43d-01639c76a3c9.jpg" /> could cross the polygonal chain <img src="3-1100227\6ebd6044-699d-4019-ba34-74274e0cec6e.jpg" /> if the angle<img src="3-1100227\51c62fc9-ac63-4e3a-988a-91b87e179194.jpg" />. The equation of <img src="3-1100227\41098b4c-b622-48cd-8e36-4d3ccb17aed2.jpg" /> (derived using the law of sines and basic properties of triangle) also illustrates this fact mathematically for <img src="3-1100227\06f7dc22-7584-4da0-96a8-23ffc1936293.jpg" /> (as shown in the <xref ref-type="fig" rid="fig6">Figure 6</xref>).</p><p>The solution with minimum magnitude of the above equation is negative for<img src="3-1100227\ab8c87fb-8450-4cee-8d9e-2e1518c8b2d1.jpg" />, even if<img src="3-1100227\fc228c30-95da-46f8-94dc-02d8393a93a1.jpg" />. Thus the line segment <img src="3-1100227\458e806f-358d-4902-9e2e-d241b6ad9ac2.jpg" /> could intersect with the edges of the polygonal chain only if<img src="3-1100227\38b5dd3e-96e3-434a-9c35-574e74e05a1e.jpg" />. If the maximum angle between two consecutive half-lines is <img src="3-1100227\f13a508c-1d52-434f-b452-a808d32b332f.jpg" /> for some<img src="3-1100227\0d7a6538-1f42-443a-a656-cc293b794eac.jpg" />, then anglex function returns the index <img src="3-1100227\e444fd3a-cf36-42bd-bf10-cd3259d8ffc6.jpg" /> that ensures the construction a simple polygonal chain <img src="3-1100227\5e087865-9a70-4c1c-b28b-f962700ff254.jpg" /> where <img src="3-1100227\2725c847-99d5-4ff6-bbe9-4693352a4220.jpg" /> and all the indices are modulo<img src="3-1100227\af44db8d-5ecc-4854-84f6-39f12841b84c.jpg" />. Thus the sequence of points <img src="3-1100227\327add9d-01bc-4e4e-bf14-3e985f124f44.jpg" /> represents a simple polygonal chain. (It is possible to prove the algorithm obtained by interchanging the steps 14 and 15, using a similar method). <img src="3-1100227\39c319b2-6e42-4bbb-8e0c-13c73b0f7476.jpg" /></p><p>Theorem 2. If <img src="3-1100227\c67bea27-e3f6-4ac0-8f1f-6ed27fb9f90e.jpg" /> is the number of input points and <img src="3-1100227\552a33ab-9625-4894-82e6-6556cb09a0a9.jpg" /> is the number of vertical sector pairs in<img src="3-1100227\6d98243d-7b21-40a2-8afb-40a8b84365e4.jpg" />, then the running time of the proposed algorithm is<img src="3-1100227\8ee3e420-7638-4ab6-8ec3-4d26d013bb22.jpg" />.</p><p>Proof. Let us estimate the running time for each part of the algorithm to prove that the algorithm compute the approximate convex hull in <img src="3-1100227\b4fafbed-62cc-4578-9fc3-eea16ade9394.jpg" /> time. It is clear that, the initialization steps 2-5 take <img src="3-1100227\f117da82-daab-4057-b1c8-f333fbc92b5b.jpg" /> time. Since, the next loop of steps 6-10 iterates for each point<img src="3-1100227\9a2f8a28-e000-4063-8dbd-51f37e6c1e38.jpg" />, thus it takes <img src="3-1100227\1d47d378-8738-4398-833b-fe8a9bfe22eb.jpg" /> time considering constant time for floor function. According to the description of anglex function in Section 4, the function can be implemented in <img src="3-1100227\cb942de3-1be6-4e33-8e50-1aef437aa3f3.jpg" /> time because it requires <img src="3-1100227\23ebcad3-c3a1-4d58-acf8-1166dbf67dcd.jpg" /> iterations to compute the index. The loop of steps 13-15 takes <img src="3-1100227\22b690cf-6075-48e8-9c3d-8638ba013902.jpg" /> time and Melkman’s [<xref ref-type="bibr" rid="scirp.30854-ref11">11</xref>] algorithm runs in linear time. Steps 1 and 11 require constant time. Thus the running time of the algorithm is<img src="3-1100227\be20dc53-7e5b-40a2-a489-1859824d01db.jpg" />.</p></sec><sec id="s7"><title>7. Conclusion</title><p>Geometric algorithms are frequently formulated under the non-degeneracy assumption or general position assumption [<xref ref-type="bibr" rid="scirp.30854-ref15">15</xref>] and the proposed algorithm in this article is also not an exception. To make the implementation of the algorithm robust an integrated treatment for the special cases can be applied. There are other general techniques called perturbation schemes [16,17] to transform the input into general position and allow the algorithm to solve the problem on perturbed input. Both symbolic perturbation and numerical (approximation) perturbation (where perturbation error is consistent with the error bound of the algorithm) can be used on the points of <img src="3-1100227\3fe4b04f-d783-48fc-94e8-3ed5caff7ddd.jpg" /> to eliminate degenerate cases.</p></sec><sec id="s8"><title>8. Acknowledgements</title><p>This research is supported by a grant from Independent University Bangladesh (IUB).</p></sec><sec id="s9"><title>REFERENCES</title></sec><sec id="s10"><title>Appendix</title><p>The article describes a near approximation algorithm for convex hull however it is possible to extend the concept for inner as well as outer approximation algorithms for convex hull. An illustration of inner approximate convex hull algorithm is shown in <xref ref-type="fig" rid="fig7">Figure 7</xref>.</p></sec></body><back><ref-list><title>References</title><ref id="scirp.30854-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">J. Hu and H. Yan, “Polygonal Approximation of Digital Curves Based on the Principles of Perceptual Organization,” Pattern Recognition, Vol. 30, No. 5, 2006, pp. 701- 718. doi:10.1016/S0031-3203(96)00105-7</mixed-citation></ref><ref id="scirp.30854-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">R. Bellman, B. Kashef and R. Vasudevan, “Mean Square Spline Approximation,” Journal of Mathematical Analysis and Applications, Vol. 45, No. 1, 1974, pp. 47-53. 
doi:10.1016/0022-247X(74)90119-X</mixed-citation></ref><ref id="scirp.30854-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">J. T. Klosowski, M. Held, J. S. B. Mitchell, H. Sowizral, and K. Zikan, “Efficient Collision Detection Using Bounding Volume Hierarchies of k-DOPs,” IEEE Transactions on Visualization and Computer Graphics, Vol. 4, No. 1, 1998, pp. 21-36. doi:10.1109/2945.675649</mixed-citation></ref><ref id="scirp.30854-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">X. Zhang, Z. Tang, J. Yu and M. Guo, “A Fast Convex Hull Algorithm for Binary Image,” Informatica (Slovenia), Vol. 34, No. 3, 2010, pp. 369-376.</mixed-citation></ref><ref id="scirp.30854-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">R. L. Graham, “An Efficient Algorithm for Determining the Convex Hull of a Finite Planar Set,” Information Processing Letters, Vol. 1, No. 4, 1972, pp. 132-133. 
doi:10.1016/0020-0190(72)90045-2</mixed-citation></ref><ref id="scirp.30854-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">A. C.-C. Yao, “A Lower Bound to Finding Convex Hulls,” Journal of the ACM, Vol. 28, No. 4, 1981, pp. 780-787. doi:10.1145/322276.322289</mixed-citation></ref><ref id="scirp.30854-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">R. A. Jarvis, “On the Identification of the Convex Hull of a Finite Set of Points in the Plane,” Information Processing Letters, Vol. 2, No. 1, 1973, pp. 18-21. 
doi:10.1016/0020-0190(73)90020-3</mixed-citation></ref><ref id="scirp.30854-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">F. P. Preparata and M. I. Shamos, “Computational Geometry: An Introduction,” Springer-Verlag Inc., New York, 1985.</mixed-citation></ref><ref id="scirp.30854-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">D. G. Kirkpatrick and R. Seidel, “The Ultimate Planar Convex Hull Algorithm,” SIAM Journal on Computing, Vol. 15, No. 1, 1986, pp. 287-299. doi:10.1137/0215021</mixed-citation></ref><ref id="scirp.30854-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">T. M. Chan, “Optimal Output-Sensitive Convex Hull Algorithms in Two and Three Dimensions,” Discrete &amp; Computational Geometry, Vol. 16, No. 4, 1996, pp. 361-368. doi:10.1007/BF02712873</mixed-citation></ref><ref id="scirp.30854-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">A. A. Melkman, “On-Line Construction of the Convex Hull of a Simple Polyline,” Information Processing Letters, Vol. 25, No. 1, 1987, pp. 11-12. 
doi:10.1016/0020-0190(87)90086-X</mixed-citation></ref><ref id="scirp.30854-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">J. L. Bentley, F. P. Preparata and M. G. Faust, “Approximation Algorithms for Convex Hulls,” Communications of the ACM, Vol. 25, No. 1, 1982, pp. 64-68. 
doi:10.1145/358315.358392</mixed-citation></ref><ref id="scirp.30854-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">E. Soisalon-Soininen, “On Computing Approximate Convex Hulls,” Information Processing Letters, Vol. 16, No. 3, 1983, pp. 121-126. doi:10.1016/0020-0190(83)90062-5</mixed-citation></ref><ref id="scirp.30854-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">L. Kavan, I. Kolingerova and J. Zara, “Fast Approximation of Convex Hull,” Proceedings of the 2nd IASTED International Conference on Advances in Computer Science and Technology, ACTA Press, Anaheim, 2006, pp. 101-104.</mixed-citation></ref><ref id="scirp.30854-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">J. O’Rourke, “Computational Geometry in C,” 2nd Edition, Cambridge University Press, New York, 1998. 
doi:10.1017/CBO9780511804120</mixed-citation></ref><ref id="scirp.30854-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">H. Edelsbrunner and E. P. Mücke, “Simulation of Simplicity: A Technique to Cope with Degenerate Cases in Geometric Algorithms,” ACM Transactions on Graphics, Vol. 9, No. 1, 1990, pp. 66-104. 
doi:10.1145/77635.77639</mixed-citation></ref><ref id="scirp.30854-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">I. Z. Emiris, J. F. Canny and R. Seidel, “Efficient Perturbations for Handling Geometric Degeneracies,” Algorithmica, Vol. 19, No. 1-2, 1997, pp. 219-242. 
doi:10.1007/PL00014417</mixed-citation></ref></ref-list></back></article>