A modified Graham’s convex hull algorithm for finding the connected orthogonal convex hull of a finite planar point set
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 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 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 -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 (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 . For denote . A path in is a continuous mapping from an interval to . We say that joins the point to the point . The length of is the quantity where the supremum is taken over the set of partitions of . We assume that all paths in this paper have finite length. We have and equality holds only if
Orthogonal convex sets and their properties
Definition 1 A set is said to be orthogonal convex if its intersection with any horizontal or vertical line is convex.[23]
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 . 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).
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 or axis). The polygon has therefore only 90 and 270 degree internal angles. Definition 4 An 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) -polygons.[15]
Let us describe when is a finite planar point set. Take the points
New algorithm based on Graham’s scan
Let 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 .
Assume without loss of generality that and . First of all, for each set we reorder points due to their -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 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)
- et al.
A fast convex hull algorithm
Inf. Process Lett.
(1978) - et al.
Reconstructing orthogonal polyhedra from putative vertex sets
Comput. Geometry
(2011) Metric spaces, convexity and nonpositive curvature
(2014)- et al.
Preprocessing steiner problems from VLSI layout
Networks
(2002) - et al.
Illumination of orthogonal polygons with orthogonal, oodlights
Int. J. Comput. Geomet. Appl.
(1998) Method of orienting curves for determining the convex hull of a finite set of points in the plane
Optimization
(2010)Finding shortest paths in a sequence of triangles in 3d by the method of orienting curves
Optimization
(2018)- et al.
An efficient improvement of gift-wrapping algorithm for computing the convex hull of a finite set of points in
Numer. Algorithms
(2020) - et al.
On the o-hull of a planar point set
Comput. Geometry
(2018) - et al.
Some performance tests of convex hull algorithms
BIT Numer. Math.
(1984)