On the Oβ-Hull of a Planar Point
Total Page:16
File Type:pdf, Size:1020Kb
Computational Geometry 68 (2018) 277–291 Contents lists available at ScienceDirect Computational Geometry: Theory and Applications www.elsevier.com/locate/comgeo ✩,✩✩ On the Oβ-hull of a planar point set ∗ Carlos Alegría-Galicia a, David Orden b, ,1, Carlos Seara c,2, Jorge Urrutia d,3 a Posgrado en Ciencia e Ingeniería de la Computación, Universidad Nacional Autónoma de México, Mexico b Departamento de Física y Matemáticas, Universidad de Alcalá, Spain c Departament de Matemàtiques, Universitat Politècnica de Catalunya, Spain d Instituto de Matemáticas, Universidad Nacional Autónoma de México, Mexico a r t i c l e i n f o a b s t r a c t Article history: We study the Oβ -hull of a planar point set, a generalization of the Orthogonal Convex Hull Received 1 April 2015 where the coordinate axes form an angle β. Given a set P of n points in the plane, we Accepted 1 April 2017 show how to maintain the Oβ -hull of P while β runs from 0toπ in (n logn) time and Available online 13 June 2017 O (n) space. With the same complexity, we also find the values of β that maximize the area and the perimeter of the O -hull and, furthermore, we find the value of β achieving Keywords: β Restricted-orientation geometry the best fitting of the point set P with a two-joint chain of alternate interior angle β. © Convex hull 2017 Elsevier B.V. All rights reserved. Area optimization Perimeter optimization Fitting 1. Introduction Let Oβ be a set of two lines with slopes 0 and tan(β), where 0 <β<π . A region in the plane is said to be Oβ -convex, if its intersections with all translations of any line in Oβ are either empty or connected. An Oβ -quadrant is a translation of one of the (Oβ -convex) open regions that result from subtracting the lines in Oβ from the plane. We call the quadrants of Oβ as top-right, top left, bottom-right, and bottom-left according to their position with respect to the elements of Oβ , see Fig. 1(a). Let P be a set of n points, and Q the set of all Oβ -quadrants that are P-free; i.e., that contain no elements of P . The Oβ -hull of P is the set 2 Oβ H(P ) = R − q q∈Q of points in the plane belonging to all connected supersets of P which are Oβ -convex [3,11]. See Fig. 1(b). ✩ In memoriam of professor Ferran Hurtado, inspirational friend and colleague, acknowledging his key contribution to the development of Computational Geometry. ✩✩ This work has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 734922. * Corresponding author. E-mail addresses: [email protected] (C. Alegría-Galicia), [email protected] (D. Orden), [email protected] (C. Seara), [email protected] (J. Urrutia). 1 Research supported by MINECO Projects MTM2014-54207 and TIN2014-61627-EXP. 2 Research supported by projects Generalitat de Catalunya DGR 2014SGR46 and MINECO MTM2015-63791-R. 3 Research supported by SEP-CONACYT 80268, PAPPIIT IN102117 Programa de Apoyo a la Investigación e Innovación Tecnológica UNAM. http://dx.doi.org/10.1016/j.comgeo.2017.06.003 0925-7721/© 2017 Elsevier B.V. All rights reserved. 278 C. Alegría-Galicia et al. / Computational Geometry 68 (2018) 277–291 Fig. 1. (a) A set Oβ -hull, the top-right, top-left, bottom right, and bottom left quadrants. (b) The corresponding Oβ -hull of a point set. π Fig. 2. (a) O π H(P).(b)Oβ H(P),whereβ0 > . (c) A two-joint non-orthogonal polygonal chain fitting a point set. 2 0 2 The concept of Oβ -convexity stemmed from the notion of restricted orientations [9], where geometric objects com- ply with a property (or a set of properties) related to some fixed set of lines. Researchers have extensively studied this notion by considering restricted-oriented polygons [9], proximity [18], visibility [17], and both restrictions and gener- O π alizations of β -convexity. The particular case of orthogonal convexity [16] considers β to be fixed at 2 . In the more general O-convexity [15,16], Oβ is replaced by a (possibly infinite) set of lines with arbitrary orientations. Other restricted- oriented notions of convexity include D-convexity [8] and O-convexity [14]. The former is based in a functional (rather than set-theoretical) definition, while the latter (unlike Oβ -convexity) always leads to connected sets. For a comprehensive com- pilation of studies on the area please refer to Fink and Wood [7]. Some recent computational results can be found in [1–3, 12]. In this paper, we solve the problem of maintaining the combinatorial structure of Oβ H(P) while β goes from 0to π , and apply this result to some optimization problems. Following the lines of Bae et al. [5], we find the values of β that maximize the area and the perimeter of Oβ H(P). In addition, we include an appendix extending the results from Díaz-Báñez et al. [6] to fit a two-joint not-necessarily orthogonal polygonal chain to a point set. See Fig. 2. In all cases, our general approach is to perform an angular sweep. We first discretize the set {β : β ∈ (0, π)} into a linear sequence of increasing angles {β1, β2, ..., βO (n)}. While β runs from 0to π , each βi corresponds to an angle where there is a change in the combinatorial structure of Oβ H(P). We then solve the particular problem for any β ∈[β1, β2) in O (n logn) time, and show how to update our solution in logarithmic time in the subsequent intervals [βi , βi+1). All our algorithms run in O (n logn) time and O (n) space. Outline of the paper In Section 2 we show how to maintain the Oβ -hull of P while β goes from 0to π . In Section 3 we extend this result to solve the optimization problems we mentioned above. We end in Section 4 with our concluding remarks. 2. The Oβ -hull of P In this section we introduce definitions that are central to our results. We also show how to compute Oβ H(P) for a fixed value of β, and how to maintain its combinatorial structure while β runs from 0to π . 2.1. Preliminaries For the sake of simplicity, we will assume P to have no three colinear points, and no pair of points on a horizontal line. Consider the region R obtained by removing from the plane all top-right Oβ -quadrants free of elements of P . The top-right Oβ -staircase of P is the directed polygonal chain formed by the segment of the boundary of R that starts at the rightmost and ends at the topmost vertex (element of P that lies over the boundary) of Oβ H(P), with respect to the coordinate C. Alegría-Galicia et al. / Computational Geometry 68 (2018) 277–291 279 Fig. 3. (a) Construction of the top-right Oβ -staircase. (b) The four Oβ -staircases of P . Fig. 4. The initial increasing configuration. system defined by the lines in Oβ .We further define the top-left, bottom-left, and bottom-right Oβ -staircases in a similar way. See Fig. 3. Observation 1. A point in Pis a vertex of Oβ H(P) if, and only if, it is the apex of at least one P-free Oβ -quadrant free of elements of P . Conversely, a point in the plane lies in the interior of OβH(P) if, and only if, every Oβ -quadrant with apex on it contains at least one point in P. We say that an Oβ -quadrant is maximal if its boundary joins two consecutive elements in the sequence of vertices found while traversing an Oβ -staircase in its corresponding direction. Two Oβ -quadrants are opposite to each other if, after placing their apices over a common point, their rays bound opposite angles. Similarly, we say that two Oβ -staircases are opposite to each other, if they were constructed using opposite Oβ -quadrants. It is easy to see that Oβ H(P) is disconnected when the intersection of two opposite maximal Oβ -quadrants is not empty. In such case we say that both Oβ -quadrants overlap, and refer to their intersection as an overlapping region. See the regions bounded by dashed lines in Figs. 1(b) and 2(b). Observation 2. Non-opposite Oβ -staircases cannot generate overlapping regions. Moreover, only one pair of Oβ -staircases can inter- sect at the same time. We will specify Oβ H(P) in terms of its vertices and its overlapping regions. From Observation 1, the set of vertices of Oβ H(P) is the set of maximal elements of P under vector dominance [4]. Thus they can be computed for a fixed value of β in (n logn) time and O (n) space [10,13]. Note that Oβ -staircases are monotone with respect to both lines in Oβ (they could not bound Oβ -convex regions otherwise), so any pair of them intersect with each other at most a linear number of times. From Observation 2, in a fixed value of β there is at most a linear number of overlapping regions. Thus, if the vertices of Oβ H(P) are sorted according to either the x-or the y-axis, we can compute from them the set of overlapping regions in linear time. We get then the following theorem where the (n log n) time lower bound comes from the fact that from Oβ H(P) we can compute the convex hull of P in linear time.