A modified Graham’s convex hull algorithm for finding the connected orthogonal convex hull of a finite planar point set

https://doi.org/10.1016/j.amc.2020.125889Get rights and content

Abstract

Graham’s convex hull algorithm outperforms the others on those distributions where most of the points are on or near the boundary of the hull (Allison and Noga, 1984). To use this algorithm for finding an orthogonal convex hull of a finite planar point set, we introduce the concept of extreme points of a connected orthogonal convex hull of the set, and show that these points belong to the set. Then we prove that the connected orthogonal convex hull of a finite set of points is an orthogonal (x,y)-polygon where its convex vertices are its connected orthogonal convex hull’s extreme points. As a result, an efficient algorithm, based on the idea of Graham’s convex hull algorithm, for finding the connected orthogonal convex hull of a finite planar point set is presented. We also show that the lower bound of computational complexity of such algorithms is O(nlogn). Some numerical results for finding the connected orthogonal convex hulls of random sets are given.

Introduction

The computation of the convex hull of a finite planar point set has been studied extensively. It is natural to relate convex hulls to orthogonal convex hulls. Orthogonal convexity is also known as rectilinear, or (x,y) convexity. It has found applications in several research fields, including illumination [1], polyhedron reconstruction [8], geometric search [21], and VLSI circuit layout design [22], digital images processing [19]. The notation of orthogonal convexity has been widely studied since early eighties [23] and some of its optimization properties are given in [11]. However, unlike the classical convex hulls, finding the orthogonal convex hull of a finite planar point set is fraught with difficulties. An orthogonal convex hull of a finite planar point set may be disconnected. Unfortunately the connected orthogonal convex hulls of a finite planar point set might be not unique, even countless. There exist several algorithms to find a connected orthogonal convex hull of a finite planar point set [12], [15], [16], [17]. In previous works, the definition of orthogonal convex set was used to find a connected orthogonal convex hull of a finite planar point set, and no numerical result has been shown. The first question is “what the explicit form of a connected orthogonal convex hull is?”. To answer this question, first, we consider some assumption when the connected orthogonal convex hull of a finite planar point set is unique. Secondly, we introduce the concept of extreme points of the connected orthogonal convex hull of a finite planar point set, and show that this hull of a finite planar point set is totally determined by its extreme points and these points belong to the given finite planar point set. There arises the second question “How to detect these extreme points from the given finite planar point set?”

Our QuickhullDisk technique [13] does not work in this case. Let us consider Graham convex hull algorithm [10] that depends on an initial ordering of the given finite planar point set. The initial point with the other points in this order actually forms a star-convex set. Based on this shape, they constructed Graham’s convex hull algorithm. Some advantages of Graham’s convex hull algorithm can be seen in [7]. In case of connected orthogonal convex hulls, if we have a reasonably ordered points, we then can scan these ordered points to detect extreme points of the connected orthogonal convex hull from these points. As a result, an efficient algorithm to find the connected orthogonal convex hull of a finite planar point set which is based on the idea of Graham’s convex hull algorithm [10] will be presented in this paper. As can been seen later in this paper, our new algorithm takes only O(nlogn) time (Theorem 1).

In Sections 2 and 3, we detect in what circumstances, there exists the connected orthogonal convex hull of a planar points set (Propositions 2 - 3). Following the uniqueness of the connected orthogonal convex hull, we provide the construction of the hull which is an (x,y)-orthogonal polygon (Proposition 5 and Corollary 2), and its extreme vertices belong to the given points (Proposition 6). We present a procedure to determine if a given finite planar point set has the connected orthogonal convex hull. Section 4 contains the main algorithm, which is based on the idea of Graham’s convex hull algorithm, for finding the connected orthogonal convex hull of a finite planar point set (Algorithm 1) and it states that the lower bound of computational complexity of such algorithm is O(nlogn) (Proposition 8). Some numerical results show the connected orthogonal convex hulls of some sets of a finite number of points which is randomly positioned in the interior of a given square (Table 1).

Section snippets

Preliminaries

Let be given an Euclidean space (R2,.). For u,vR2, denote [u,v]:={(1λ)u+λv:0λ1}. A path in R2 is a continuous mapping γ from an interval [t0,t1]R to R2. We say that γ joins the point γ(t0) to the point γ(t1). The length of γ:[t0,t1]R2 is the quantity length(γ)=supσi=1kγ(τi1)γ(τi), where the supremum is taken over the set of partitions t0=τ0<τ1<<τk=t1 of [t0,t1]. We assume that all paths in this paper have finite length. We have length(γ)γ(t0)γ(t1) and equality holds only if γ([

Orthogonal convex sets and their properties

Definition 1

[23]

A set KR2 is said to be orthogonal convex if its intersection with any horizontal or vertical line is convex.

In some previous papers (see [12] and [23]), a slightly different definition of orthogonal convexity were given. Here, we use the term “convex” to cover line segments with or without its endpoints. Furthermore, our definition can be extended for Rn. Observe that any convex set is orthogonal convex as seen in Fig. 1 (a), but the vice versa may be not true as seen in Fig. 1 (b).

K is said

Construction of the connected orthogonal convex hull of a finite planar point set

We need some definitions.

A rectilinear polygon (see [15]) is a simple polygon whose edges are rectilinear (i.e., they are parallel to either x or y axis). The polygon has therefore only 90 and 270 degree internal angles.

Definition 4

[15]

An (x,y)polygon is one of the following: (a) a point; (b) connected rectilinear line segments; (c) a rectilinear polygon; and (d) a connected union of type (b) and or type (c) (x,y)-polygons.

Let us describe COCH(P) when P is a finite planar point set. Take the points a, b, c, d,

New algorithm based on Graham’s scan

Let P be a finite planar point set and (A) do not hold. In case of connected orthogonal convex hulls, if we have a reasonably ordered points, we then can scan these ordered points to get candidates for extreme points of COCH(P).

Assume without loss of generality that pquv and ap. First of all, for each set Pcb Pah, Pgf, Ped, we reorder points due to their y-coordinates only. Then we use Graham’s scan. More details can be seen in Algorithm 1.

Before starting the algorithm we need to determine

Implementation

Our algorithm was implemented in Python. Tests were run on a PC 3.20GHz with an intel Core i5 and 8 GB of memory. The actual run times of our algorithm on the set of a finite number of points which is randomly positioned in the interior of a square of size 10000000 having sides parallel to the coordinate lines are given in Table 1. In our experiments, the more points we add the less cases of semi-isolated points happen. In the code we consider the case a=h=p as follows: we take the last point

Concluding remarks

We have provided a similar result as in convex analysis, that is the connected orthogonal convex hull of a planar point set is the intersection of all connected orthogonal convex sets of the given set under the assumption of no semi-isolated point. We then have introduced the concept of extreme vertices of the connected orthogonal convex hull of a finite planar point set under the same condition. The construction of the connected orthgonal convex hull via extreme points is also presented. Then

Acknowledgments

The first author would like to thank the Institute of Mathematics, Vietnam Academy of Science and Technology (VAST) and the Ho Chi Minh City University of Technology (HCMUT), VNU-HCM for the support of time and facilities for this study. This research is funded by the International Centre for Research and Postgraduate Training in Mathmatics (ICRTM), Vietnam under grant number ICRTM02-2020.01. We thank the two anonymous reviewers for their valuable comments on our manuscript.

References (23)

  • S.G. Akl et al.

    A fast convex hull algorithm

    Inf. Process Lett.

    (1978)
  • T. Biedl et al.

    Reconstructing orthogonal polyhedra from putative vertex sets

    Comput. Geometry

    (2011)
  • A. Papadopoulos

    Metric spaces, convexity and nonpositive curvature

    (2014)
  • E. Uchoa et al.

    Preprocessing steiner problems from VLSI layout

    Networks

    (2002)
  • J. Abello et al.

    Illumination of orthogonal polygons with orthogonal, oodlights

    Int. J. Comput. Geomet. Appl.

    (1998)
  • P.T. An

    Method of orienting curves for determining the convex hull of a finite set of points in the plane

    Optimization

    (2010)
  • P.T. An

    Finding shortest paths in a sequence of triangles in 3d by the method of orienting curves

    Optimization

    (2018)
  • P.T. An et al.

    An efficient improvement of gift-wrapping algorithm for computing the convex hull of a finite set of points in Rn

    Numer. Algorithms

    (2020)
  • C. Alegri’a-Galiciaa et al.

    On the o-hull of a planar point set

    Comput. Geometry

    (2018)
  • D.C.S. Allison et al.

    Some performance tests of convex hull algorithms

    BIT Numer. Math.

    (1984)
  • M. Breen

    A krasnosel’skii theorem for staircase paths in orthogonal polygons

    J. Geometry

    (1994)
  • Cited by (0)

    View full text