Approximation of Convex Figures by Pairs of Rectangles
Total Page:16
File Type:pdf, Size:1020Kb
Approximation of Convex Figures byPairs of Rectangles y z x Otfried Schwarzkopf UlrichFuchs Gunter Rote { Emo Welzl Abstract We consider the problem of approximating a convex gure in the plane by a pair (r;R) of homothetic (that is, similar and parallel) rectangles with r C R.We show the existence of such a pair where the sides of the outer rectangle are at most twice as long as the sides of the inner rectangle, thereby solving a problem p osed byPolya and Szeg}o. If the n vertices of a convex p olygon C are given as a sorted array, such 2 an approximating pair of rectangles can b e computed in time O (log n). 1 Intro duction Let C b e a convex gure in the plane. A pair of rectangles (r;R) is called an approximating pair for C ,ifrC Rand if r and R are homothetic, that is, they are parallel and have the same asp ect ratio. Note that this is equivalentto the existence of an expansion x 7! (x x )+x (with center x and expansion 0 0 0 factor ) which maps r into R. We measure the quality (r;R) of our approximating pair (r;R) as the quotient of the length of a side of R divided by the length of the corresp onding side of r . This is just the expansion factor used in the ab ove expansion mapping. The motivation for our investigation is the use of r and R as simple certi cates for the imp ossibility or p ossibility of obstacle-avoiding motions of C .IfRcan b e moved along a path without hitting a given set of obstacles, then this is also p ossible for C . Let's say that a motion planning problem for C is simple if a motion is still p ossible for C expanded by a factor of 2. Now, if (r;R) has quality 2, then every simple motion planning problem for C has also a solution for R. More details can + b e found in [FMR 90]. Polya and Szeg}o [PS51] showed that for every convex gure C there is an ap- proximating pair (r;R) with (r;R) 3, and raised the question whether this upp er p b ound could b e improved. In fact, an improvementto2 2 follows from work of John [Joh48] and Leichtwei [Lei59]. They proved that for every convex gure C in the plane there is an approximating pair of homothetic ellipses with quality 2. Since p any ellipse has an approximating pair of rectangles with quality 2, the claimed p b ound of 2 2 follows. A related problem has b een considered by Lassak [Las89], This researchwas supp orted by the Deutsche Forschungsgemeinschaft under Grant Al 253/1- 1, Schwerpunktprogramm \Datenstrukturen und eziente Algorithmen", and by the ESPRIT II Basic Research Action of the Europ ean Community under contract No. 3075 (pro ject ALCOM). It was done while the authors were at the Freie Universitat Berlin. y Department of Computer Science, Postech, Hyo ja-dong, Pohang 790-784, South Korea z Fachb ereich Mathematik, Freie Universitat Berlin, Arnimallee 2{6, D-15195 Berlin, Germany x Institut fur Mathematik, Technische Universitat Graz, Steyrergasse 20, A-8010 Graz, Austria { Departement Informatik, ETH Zuric h, IFW, ETH Zentrum, CH-8092 Zuric h, Switzerland 1 who showed that for every centrally symmetric convex body M and every (not nec- essarily centrally symmetric) convex gure C , there are two concentric ane images a and A of M with a C A. He proved that the expansion factor b etween a and p A can always b e chosen to b e 2 + 1, which is optimal. The question of further improvement in our problem has remained op en. In the present pap er we settle the problem by demonstrating that for every convex gure there exists an approximating pair (r;R) with a factor (r;R) 2. This b ound is optimal, since for a triangle there is no approximating pair with a factor less than 2. (This can b e seen by comparing the areas of a minimum circumscrib ed and a maximum inscrib ed rectangle for a triangle.) After the pro ceedings version + of this pap er [SFR 90] app eared, this result has b een indep endently obtained by Lassak [Las93], using the same basic idea. In contrast, our pro of of Lemma 7 is more geometric in nature than the corresp onding pro of in [Las93], and in addition, we showhow to nd the approximating pair eciently. Many problems ab out inner and outer approximation by homothetic gures remain op en. For example, the optimal quality b ound for an approximating pair of homothetic triangles is not known exactly. Fleischer, Mehlhorn, Rote, Welzl, and p + Yap [FMR 90] showed that it lies b etween 1 + 5=2 2:118 and 2:25; see also Lassak [Las92] for a related result. In Section 2 we consider approximations by rectangles with a xed orientation. On the one hand, this prepares the basics for the upp er b ound, and on the other hand we show that an optimal approximating pair with a xed orientation can b e computed in time O (log n)ifC is a convex n-gon whose vertices are stored in a sorted array. The algorithm is an application of the tentative-prune-and-search technique of Kirkpatrick and Sno eyink [KS95]. In Section 3 we show the existence of approximating pairs of quality 2 and in Section 4 we present an algorithm which 2 computes such a pair in time O (log n). + This pap er is an improved version of our conference pap er [SFR 90]. The algo- rithms there were slower by a factor of O (log n) b ecause the tentative-prune-and- search technique was not available and we had to use nested binary search instead. 2 Approximation with a Fixed Orientation Let r b e a rectangle with a counterclo ckwise numb ering v (r ), v (r ), v (r ), v (r )of 1 2 3 4 its vertices. The orientation (r ) is the directed angle b etween the p ositive x-axis and the vector from v (r )tov (r), and the aspect ratio is 1 2 jv (r)v (r)j 2 3 (r )= ; jv (r)v (r)j 1 2 (jpq j denotes the distance b etween p and q ). By R( ; )we denote the set of all rectangles with orientation and asp ect ratio , see Figure 1. Note that, dep ending on the choice of the vertex v , a rectangle b elongs to the 1 1 3 1 ; ), R( + ; ), or R( + ; ). For the time b eing, classes R( ; ), R( + 2 2 whenever we talk ab out a rectangle, we assume that wehave a xed counterclo ckwise numb ering of the vertices. Let C denote a b ounded convex gure in the plane. For every there is a unique minimum area rectangle R( ) with orientation enclosing C . Let ( ) denote the asp ect ratio of R( ); so R( ) 2R( ; ( )). ( ) is the quotient of the widths of C when seen from directions + =2 and . Since the width is a continuous function of and it is b ounded away from 0, ( )is continuous, b ounded from ab ove, and b ounded away from 0. Now consider an approximating pair (r;R) for C with orientation . R contains the minimum area enclosing rectangle R( ). Since we can shrink r and R appro- priately,wemayaswell assume that R = R( ), so r 2R( ; ( )). The problem of 2 0 v (r ) 3 C b v (r ) 4 r 2R( ; ) v (r ) 2 a b = a v (r ) 1 Figure 1: A rectangle with orientation and asp ect ratio nding the b est approximating pair with orientation thus reduces to the problem of nding the largest rectangle with orientation and asp ect ratio ( ) contained in C .Ifwe de ne F ( ):= fr 2R( ; ( )) j r C g; 0 the problem b ecomes: Find the largest rectangle in F ( ). We de ne F ( ) as the 0 set of largest rectangles in F ( ). Wehave 0 Lemma 1 Let r bearectangle in F ( ). Then two diagonal vertices of r lie on the boundary @C of C . Pro of: If at most one vertex of r lies on @C , r is clearly not maximal. So assume vertices v (r ) and v (r ) lie on @C , while v (r ) and v (r ) don't, see Figure 1. Then 1 2 3 4 there are two disks U , U around v (r ) and v (r ) which are contained in C .By 3 4 3 4 0 convexityofC, the convex hull C of v (r ), v (r ), U , and U is contained in C . 1 2 3 4 0 But there is a larger copyofr in C , contradicting the maximalityof r. Lemma 2 The side lengths of al l rectangles r 2F( ), for al l ,are uniformly boundedfrom above and bounded away from zero. Pro of: Since every rectangle r is contained in C , an upp er b ound is trivial. The function ( ) is b ounded from ab ove and b ounded away from zero. Therefore, the shortest side of the rectangle with asp ect ratio ( ) whichiscontained in the incircle of C is b ounded away from zero. This is a lower b ound for the shortest side of any rectangle r 2F( ). We give an algorithm that computes the largest rectangle with xed orientation and shap e contained in a p olygon with n vertices in time O (log n).