12.07.2015 Views

Recognition of Largest Empty Orthoconvex Polygon in a Point Set

Recognition of Largest Empty Orthoconvex Polygon in a Point Set

Recognition of Largest Empty Orthoconvex Polygon in a Point Set

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

20th Canadian Conference on Computational Geometry, 2008RtlFtrRtlp jFtrFblp jp i Rbr Fblp iRbr(a)Figure 1: <strong>Orthoconvex</strong> polygons(b)comb<strong>in</strong>atorial explosion holds for MEOP also. We nowpresent a polynomial time algorithm for comput<strong>in</strong>g themaximum-area MEOP.3 AlgorithmWe shall consider all possible pairs <strong>of</strong> po<strong>in</strong>ts p i , p j ∈ P,and identify the maximum area MEOP with p i ∈ F blas the closest po<strong>in</strong>t <strong>of</strong> the bottom boundary <strong>of</strong> R, andp j ∈ F tr as the closest po<strong>in</strong>t <strong>of</strong> the top boundary <strong>of</strong> R.The po<strong>in</strong>ts p i and p j are said to be the bottom-pivot andtop-pivot respectively, and the correspond<strong>in</strong>g MEOP isdenoted by MEOP(p i , p j ). We will use S to denote thevertical slab bounded by V i and V j . The projections <strong>of</strong>a po<strong>in</strong>t p k ∈ S on V i , V j , H i and H j are denoted by q k ,qk ′ , r k and rk ′ respectively. We now separately considertwo cases: (i) x(p i ) < x(p j ), and (ii) x(p i ) > x(p j ).In Case (i), the l<strong>in</strong>es V i and V j split the po<strong>in</strong>t set P<strong>in</strong>to three parts, P 1 , P 2 and P 3 , where P 1 and P 3 arethe set <strong>of</strong> po<strong>in</strong>ts to the left <strong>of</strong> V i and to the right <strong>of</strong> V jrespectively, and the po<strong>in</strong>ts <strong>in</strong> P 2 lie <strong>in</strong>side the verticalslab S. If V i hits the top and bottom boundaries <strong>of</strong>R at t 1 and b 1 respectively, and V j hits the top andbottom boundaries <strong>of</strong> R at t 2 and b 2 respectively. Now,the portion <strong>of</strong> the MEOP <strong>in</strong>side the vertical slab S,denoted by M 2 (b 1 , t 2 ), is an empty staircase polygonwith diagonally opposite corners b 1 and t 2 among thepo<strong>in</strong>ts <strong>in</strong> P 2 . The two stairs <strong>of</strong> M 2 (b 1 , t 2 ) are parts <strong>of</strong>the ris<strong>in</strong>g stairs R br and R tl respectively. If R tl hitsV i at q α , then the portion <strong>of</strong> the MEOP to the left <strong>of</strong>V i , denoted by M 1 (q α ), is an empty edge-visible polygonwith base [p i , q α ] among the po<strong>in</strong>ts <strong>in</strong> P 1 such that everypo<strong>in</strong>t <strong>in</strong>side the polygon is visible from its base [p i , q α ].Similarly, if R br hits V j at q β ′ then M 3(q β ′ ) is an emptyedge-visible polygon with base [p j , q β ′ ] among the po<strong>in</strong>ts<strong>in</strong> P 3 .In Case (ii), V j is to the left <strong>of</strong> V i . Here M 2 is an emptystaircase polygon from p i to p j , and these are the parts<strong>of</strong> F bl and F tr <strong>of</strong> the MEOP respectively. If F bl (resp.F tr ) hits V j (resp. V i ) at q ′ α (resp. q β), then M 1 (q ′ α )(portion to the left <strong>of</strong> V j ) is an edge-visible polygon withbase [q ′ α , p j], and M 3 (q β ) (portion to the right <strong>of</strong> V i ) isan edge-visible polygon with base [q β , p i ]. After fix<strong>in</strong>g p iand p j as the bottom-pivot and top-pivot respectively,we need to choose M 1 , M 2 and M 3 such that the sum<strong>of</strong> areas <strong>of</strong> these three polygons is maximum among allsuch polygons. We shall describe our algorithm for Case(i) only. Case (ii) can easily be handled us<strong>in</strong>g a similarmethod. For Case (i), we expla<strong>in</strong> the method <strong>of</strong> comput<strong>in</strong>gthe desired M 1 and M 2 . The computation <strong>of</strong> M 3is the same as that <strong>of</strong> M 1 .3.1 Computation <strong>of</strong> M 1Let us consider a po<strong>in</strong>t p i ∈ P. Let P 1 = {p k |x(p k ) x(p i ) and y(p k ) > y(p i )}.Q <strong>in</strong>cludes the top-right corner <strong>of</strong> R, and |Q| = m +1. Let q 0 , q 1 , q 2 , . . . , q m denote the projections <strong>of</strong> thepo<strong>in</strong>ts <strong>in</strong> Q on the vertical l<strong>in</strong>e V i <strong>in</strong> decreas<strong>in</strong>g order<strong>of</strong> their y-coord<strong>in</strong>ates. We create an array EV L(p i )whose elements are the maximum area empty edgevisiblepolygon M 1 (q k ) with [p i , q k ] as the base for allk = 0, 1, 2, . . ., m.We use vertical l<strong>in</strong>e sweep among the po<strong>in</strong>ts <strong>in</strong> P 1 start<strong>in</strong>gfrom the position <strong>of</strong> V i to create a height-balancedb<strong>in</strong>ary tree T . Its each node v is represented as a 5-tuple(I, x val, y val, ∆, δ). I is the base <strong>of</strong> the edge-visiblepolygons attached to node v. (x val, y val) is the po<strong>in</strong>twhere the node v is generated, and ∆ conta<strong>in</strong>s the area<strong>of</strong> the largest edge visible polygon rooted at that node.The ∆ parameters are computed <strong>in</strong> two passes. In theforward pass dur<strong>in</strong>g the sweep, the ∆ parameter <strong>of</strong> anode conta<strong>in</strong>s the area <strong>of</strong> the edge visible polygon thatis computed so far at that node. At the end <strong>of</strong> thesweep, a backward pass is executed from the leaf level<strong>of</strong> T up to its root, and ∆ value <strong>of</strong> each node is properlyset. The δ value <strong>of</strong> all nodes are 0 at the time <strong>of</strong> creation<strong>of</strong> T ; it will be set and used dur<strong>in</strong>g the computation <strong>of</strong>M 1 (q k ) for different q k .Creation <strong>of</strong> TThe root r <strong>of</strong> T corresponds to the entire <strong>in</strong>tervalI = [p i , q 0 ]; its x val and ∆ parameters are set tox(p i ) and 0 respectively. A vertical l<strong>in</strong>e sweep is performedfrom x = x(p i ) towards left. When a po<strong>in</strong>tp = (x(p), y(p)) ∈ P 1 is faced by the sweep l<strong>in</strong>e, theleaf nodes <strong>in</strong> T are searched. If y(p) lies <strong>in</strong> the <strong>in</strong>ter-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!