Throwing a Sofa Through the Window
TThrowing a Sofa Through the Window ∗ Dan Halperin † Micha Sharir ‡ Itay Yehuda § Abstract
We study several variants of the problem of moving a convex polytope K , with n edges, in three dimensions through a flat rectangular (and sometimes more general)window. Specifically: (i) We study variants where the motion is restricted to translations only, discuss situ-ations where such a motion can be reduced to sliding (translation in a fixed direction),and present efficient algorithms for those variants, which run in time close to O ( n / ). (ii) We consider the case of a gate (or a slab, an unbounded window with two parallelinfinite edges), and show that K can pass through such a window, by any collision-freerigid motion, if and only if it can slide through it, an observation that leads to anefficient algorithm for this variant too. (iii) We consider arbitrary compact convex windows, and show that if K can passthrough such a window W (by any motion) then K can slide through a gate of widthequal to the diameter of W . (iv) We show that if a purely translational motion for K through a rectangular window W exists, then K can also slide through W keeping the same orientation as in thetranslational motion. For a given fixed orientation of K we can determine in linear timewhether K can translate (and hence slide) through W keeping the given orientation,and if so plan the motion, also in linear time. (v) We give an example of a polytope that cannot pass through a certain window bytranslations only, but can do so when rotations are allowed. (vi)
We study the case of a circular window W , and show that, for the regular tetrahe-dron K of edge length 1, there are two thresholds 1 > δ ≈ . > δ ≈ . K can slide through W if the diameter d of W is ≥
1, (b) K cannot slidethrough W but can pass through it by a purely translational motion when δ ≤ d < K cannot pass through W by a purely translational motion but can do it whenrotations are allowed when δ ≤ d < δ , and (d) K cannot pass through W at all when d < δ . (vii) Finally, we explore the general setup, where we want to plan a general motion(with all six degrees of freedom) for K through a rectangular window W , and presentan efficient algorithm for this problem, with running time close to O ( n ). ∗ Work on this paper by DH and IY has been supported in part by the Israel Science Foundation (grantno. 1736/19), by NSF/US-Israel-BSF (grant no. 2019754), by the Israel Ministry of Science and Technology(grant no. 103129), by the Blavatnik Computer Science Research Fund, and by a grant from Yandex. Workby MS and IY has been supported in part by Grant 260/18 from the Israel Science Foundation. Work byMS has also been supported by Grant G-1367-407.6/2016 from the German-Israeli Foundation for ScientificResearch and Development, and by the Blavatnik Research Fund in Computer Science at Tel Aviv University. † Tel Aviv University School of Computer Science, Israel; [email protected];http://acg.cs.tau.ac.il/danhalperin; https://orcid.org/0000-0002-3345-3765 ‡ Tel Aviv University School of Computer Science, Israel; [email protected]; https://orcid.org/0000-0002-2541-3763 § Tel Aviv University School of Computer Science, Israel; [email protected];https://orcid.org/0000-0002-1825-0097 a r X i v : . [ c s . C G ] F e b Introduction
Let K be a convex polytope (a ‘sofa’) in R with n edges, and let W be a rectangularwindow, placed in the xy -plane in the axis-parallel position [0 , a ] × [0 , b ], where a and b are the respective width and height of W . We assume that the complement of W in the xy -plane is a solid wall that K must avoid. The problem is to determine whether K canbe moved, in a collision-free manner, from any position that is fully contained in the upperhalfspace z >
0, through W , to any position that is fully contained in the lower halfspace z <
0, and, if so, to plan such a motion (see Figure 1).Figure 1:
Moving a convex polytope K through a window W . A continuous motion of a rigid body in three dimensions has six degrees of freedom,three of translation and three of rotation, and in the general form of the problem, studiedin Section 8, we allow all six degrees. On the way, we will study simpler versions where onlyrestricted types of motion are allowed, such as purely translational motion (that has onlythree degrees of freedom), a translational motion in a fixed direction, which we refer to as sliding (one degree of freedom), or a translational motion combined with rotations aroundthe vertical axis only (four degrees of freedom), etc. Some of our main results show that,in certain favorable situations, the existence of a general collision-free motion of K through W implies the existence of a restricted motion of one of these types. This allows us to solvethe problem in a significantly more efficient manner.In terms of the free configuration space F of K , all the placements of K that are fullycontained in the upper (resp., lower) halfspace are free, and form a connected subset F + (resp., F − ) of F . Our problem, in general, is to determine whether both F + and F − arecontained in the same connected component of F . This interpretation applies to the generalsetup, with six degrees of freedom, as well as to any other subclass of motions, with fewerdegrees of freedom.Motion planning is an intensively studied problem in computational geometry androbotics. A systematic and general way to describe the free space F is by using con-straint surfaces , namely surfaces describing all the configurations where some feature onthe boundary of the moving object ( K in our case) touches a feature on the boundary ofthe free workspace ( ∂W in our case); see, e.g., [15, 21, 22]. These surfaces partition theconfiguration space into cells, each of which is either fully contained in F or fully containedin the forbidden portion of the configuration space. This representation is based on thearrangement A of the constraint surfaces, whose number in our case is O ( n ), one surfacefor each feature (edge or vertex) of W and each feature (edge, vertex or face) of K . Eachcell of A is fully contained either in F or in its complement. Hence the complexity of F O ( n d ), where d is the number of degrees of freedom (namely, the dimension of the con-figuration space) [15]. To exploit this representation, we construct and transform it into aso-called discrete connectivity graph , which can be searched for the existence of a motion ofthe desired kind.One common way of doing this is to further decompose the arrangement into subcellsof constant complexity, using vertical decomposition [6]. Such constructions are easily im-plementable for motion planning with two degrees of freedom [10], but become significantlymore involved for problems with three or more degrees of freedom. This has lead to the de-velopment of alternative methods, such as sampling-based techniques (see [7, Chapter 7] and[13]), the best known of which are PRM [19] and RRT [20], which have dozens of variants.While extremely successful in solving practical problems, they trade-off the completenessof the arrangement approach with efficiency, and may fail when the setting contains tightpassages [24, 25], a situation that can arise in the problems that we study in this paper.Toussaint [29] studied movable separability of sets, where he collected a variety of tight-setting motion planning problems, similar in nature to the problems studied here. Theseproblems are interesting theoretically (see, e.g., [28] for such a problem and its intriguingsolution), but also from an applied perspective, since motion in tight settings often arisesin manufacturing processes such as assembly planning [12] or casting and molding [5].It was in Toussaint’s review [29] that we encountered the problem of ‘throwing’ a poly-tope through a window. Although Toussaint’s paper was published 35 years ago, we are notaware of any previous progress on this specific problem. We remark that the word sofa inthe title of the paper is borrowed from the classical two-dimensional moving sofa problem(see, e.g., [8, 11]), which is to find the shape of largest area that can be moved through acorner in an L-shaped corridor whose legs have width 1. Our results.
We first consider, in Section 2, sliding motions (translations in a fixeddirection) of K . We characterize situations in which such a sliding motion exists, andpresent efficient algorithms, with runtime close to O ( n / ), for finding such a motion whenone exists.We next consider, in Section 3, the case where W is an unbounded slab, enclosed betweentwo parallel unbounded lines (we call it a gate ). We show that if K can pass through sucha gate W , by any collision-free rigid motion, it can also slide throgh W , making the generalmotion planning problem through a gate particularly easy to solve.In Section 4, we consider arbitrary compact convex windows, and show that if K canmove through such a winodw W , by an arbitrary collision-free motion, then K can slidethrough a gate of width equal to the diameter of W , and this holds in any sliding direction.This requires nontrivial topological arguments, presented in Section 4.We then consider, in Section 5, purely translational motions of K through a rectangularwindow W , and prove that the existence of such a purely-translational collision-free motionimplies the existence of a collision-free sliding motion keeping the same orientation as in thetranslational motion. For a given fixed orientation of K we can determine in linear timewhether K can translate (and hence slide) through W keeping the given orientation, and ifso plan the motion, also in linear time.In Section 6, we show that rotations are sometimes needed, by giving an example of a3onvex polytope K (actually a tetrahedron) that can move through a square window W bya collision-free motion that includes rotation (only around an axis orthogonal to W ), butthere is no purely translational motion of K through W .In Section 7, we consider the problem of passing through a circular window W , andshow that, for the regular tetrahedron K of edge length 1, there are two thresholds 1 >δ ≈ . > δ ≈ . K can slide through the window W if thediameter d of W is ≥
1, (ii) K cannot slide through W but can pass through it by apurely translational motion when δ ≤ d <
1, (iii) K cannot pass through W by a purelytranslational motion but can do it with rotations when δ ≤ d < δ , and (iv) K cannot passthrough W at all when d < δ .We finally consider, in Section 8, the general problem, with all six degrees of freedom.We present an efficient algorithm, which runs in time close to O ( n ), for constructing thefree configuration space, from which one can construct, within a comparable time bound,a valid motion through W if one exists. We remark that the exponent 4 is a significantimprovement over the ‘na¨ıve’ exponent 6 that would arise by a general treatment of theproblem as a motion planning problem with six degrees of freedom. In this section we address the case in which the movement is purely translational in a singlefixed direction. Such a motion, to which we refer as a sliding motion , has only one degreeof freedom. In the most restricted version (which is very easy to solve), we are given a fixedorientation of K at a fixed initial placement, and also the direction of motion. In this sectionwe study a more general setting, in which we seek values for these parameters—orientation,initial placement, and direction of motion, for which such a sliding motion of K through W is possible (or determine that no such motion is possible).In Section 2.1 we observe that if a sliding motion for K exists, then K can also slide in adirection orthogonal to the plane of the window. Using this and other structural propertiesof the problem, we transform the problem at hand into a certain range searching problem.We present an efficient novel solution to the latter problem, which yields an algorithm forsolving our original problem, whose running time is close to O ( n / ). For the most general version of the sliding motion, in which none of the parameters (orien-tation, initial placement, and direction of motion) is prespecified, we have:
Lemma 2.1 If K can slide through W from some starting placement in some direction,then K can slide through W , possibly from some other starting placement (and at anotherorientation), by translating it in the negative z -direction. Proof.
Let K be the starting placement of K and let (cid:126)v be the direction of motionthrough W , for which the resulting sliding motion is collision-free. Form the infinite prismΠ := (cid:83) λ ∈ R ( K + λ(cid:126)v ) that K spans in direction (cid:126)v . The premise of the lemma implies thatthe intersection of Π with the xy -plane is contained in W .4et W be the orthogonal projection of W onto some plane orthogonal to (cid:126)v . Note that W is a parallelogram, and that, by construction, K can pass through W when translatedin direction (cid:126)v . By an old result, reviewed and proved by Debrunner and Mani-Levitska [9],it follows that, when mapped rigidly into the xy -plane, W (the ‘shadow’ of W in direction (cid:126)v ) can be placed fully within W (see Figure 2). Figure 2:
The projection of W (green) can be located in a congruent copy of W (blue). Now rotate and translate R so that (cid:126)v becomes the (negative) z -direction, and theimage of W is fully contained in (the former, untransformed copy of) W . Then the imageof K under this transformation can be moved vertically down through W , in a collision-freemanner, as asserted. (cid:50) Debrunner and Mani-Levitska’s proof is involved, and applies to an arbitrary planarconvex shape (showing that it contains its projection in any direction). For the sake ofcompleteness, we give a simple alternative proof for the case of a rectangle.
Lemma 2.2
Let W be a rectangle on some plane h . Let W be the projection of W on the xy -plane. Then the xy -plane contains a congruent copy of W that contains W . Proof.
Denote the xy -projection by π . Let l be the intersection line of h and the xy -plane,and let α be the dihedral angle between these planes. Let p be an arbitrary point on h , andlet d be the distance from p to l . Then π ( p ) lies at distance d cos α from l (with the samenearest point on l ). Informally, π moves every point in h closer to l by a factor of cos α .Then, instead of projecting h to the xy plane, we apply on h this linear transformation thatmoves every point closer to l by a factor of cos α . Denote this transformation by σ . Thisimplies that every line segment in h is transformed to a shorter segment or of the samelength—no line segment increases its length.Let W = ABCD , and let A (cid:48) = σ ( A ) , B (cid:48) = σ ( B ) , C (cid:48) = σ ( C ) , D (cid:48) = σ ( D ). Let E denotethe center of W (see Figure 3). Note that translating W on h keeps σ ( W ) the same up totranslation, so we may assume that l passes through E without loss of generality.We use the following lemma: Lemma 2.3
Assume without loss of generality that B and C lie on one side of l , and that A and D lie on the other side (otherwise rename the vertices as BCDA ), and that l intersects Curiously, as shown in [9], this property, of containing your shadows, fails in higher dimensions.
The window W (blue), the line l (orange) and the image σ ( W ) (green). the ray −−→ BC , namely the ray starting at B and passing through C (otherwise rename thevertices as DCBA ). Then (cid:94) A (cid:48) C (cid:48) B (cid:48) ≤ (cid:94) ACB . Proof.
Denote by T the intersection point of the lines BC and B (cid:48) C (cid:48) (see Figure 4). As σ ( BC ) = B (cid:48) C (cid:48) the line l must pass through T since it is the only point of BC that staysat the same location when applying σ . We then have: (cid:94) A (cid:48) C (cid:48) B (cid:48) = (cid:94) EC (cid:48) B (cid:48) = (cid:94) T EC (cid:48) + (cid:94) C (cid:48) T E ≤ (cid:94) T EC + (cid:94) CT E = (cid:94) ECB = (cid:94) ACB. (cid:50)
Continuing with the proof of Lemma 2.2, there are two cases to consider:For any pair of points P and Q we denote by P Q the line through P and Q . If (cid:94) C (cid:48) A (cid:48) B (cid:48) ≤ (cid:94) CAB , then, since no line segment increases its length by applying σ , we have A (cid:48) C (cid:48) ≤ AC .Denote by m the line AC . Place A (cid:48) C (cid:48) on m , such that the points A, A (cid:48) , C (cid:48) , C appear on m in this order and A (cid:48) C (cid:48) is centered at E (see Figure 5, left). Note that the angle that AB forms with m is greater than the angle that A (cid:48) B (cid:48) forms with l (by assumption), andthat the angle that BC forms with m is greater than the angle that B (cid:48) C (cid:48) forms with m (byLemma 2.3). Hence B (cid:48) is inside the triangle ABC . By symmetry, D (cid:48) is inside the triangle CDA , and therefore we successfully placed σ ( W ) inside W .If (cid:94) C (cid:48) A (cid:48) B (cid:48) ≥ (cid:94) CAB , draw from C (cid:48) a line perpendicular to A (cid:48) B (cid:48) and denote the inter-section by P (see Figure 3). We place σ ( W ) inside W so that A (cid:48) B (cid:48) is parallel to AB (seeFigure 5, right). To do so, we need to prove that C (cid:48) P ≤ CB and that A (cid:48) P ≤ AB . Indeed,we have: CB ≥ C (cid:48) B (cid:48) ≥ C (cid:48) P,AB = CB · cot (cid:94) CAB ≥ C (cid:48) P · cot (cid:94) C (cid:48) A (cid:48) B (cid:48) = A (cid:48) P. The side BC of W (blue), the side B (cid:48) C (cid:48) (green), and the line l (orange). Figure 5:
Placing σ ( W ) in a congruent copy of W . Left: Placing the diagonal A (cid:48) C (cid:48) on thediagonal AC . Right: Placing the side A (cid:48) B (cid:48) parallel to the side AB . σ ( W ) inside W . (cid:50) The follwoing discussion is with respect to a fixed initial placement K of K . For a givendirection (cid:126)v , the projected silhouette of K in direction (cid:126)v is the boundary of the convexpolygon obtained by the projection of K in direction (cid:126)v , within the image plane h (cid:126)v (whichis orthogonal to (cid:126)v ). The silhouette itself is the cyclic sequence of vertices and edges of K ,whose projections form the projected silhouette. The silhouette and its projection do notchange combinatorially, that is, when represented as a cyclic sequence of vertices and edgesof K (or of their projections), as long as (cid:126)v is not parallel to any face of K . We thus formthe set of the O ( n ) great circles on S that are parallel to the faces of K , and constructtheir arrangement A on S , which is also known as the aspect graph of K [23]. In each face ϕ of A the combinatorial structure of the silhouette is fixed, but the projected silhouettevaries continuously as (cid:126)v moves in ϕ .A view of K is a pair ( (cid:126)v, θ ), where (cid:126)v is a direction, and θ is the angle of rotationof the projected silhouette within h (cid:126)v (translations within that plane are ignored). Thespace of views is thus three-dimensional. A fixed view ( (cid:126)v, θ ) fixes the uppermost, leftmost,bottommost and rightmost vertices w t , w l , w b and w r of the projected silhouette. The viewis valid if x v r − x v l ≤ a and y v t − y v b ≤ b (1)(in the coordinate frame of h (cid:126)v when rotated by θ ).When (cid:126)v is fixed and θ varies, we get O ( n ) quadruples ( w t , w l , w b , w r ) of the projectedsilhouette. The view is valid if the inequalities in (1) (which depend on ( (cid:126)v, θ )) have asolution for one such quadruple, which lies in the appropriate portion of the view space (inwhich w t , w l , w b , w r are indeed the four extreme vertices). The existence of a valid viewis equivalent to the existence of a sliding motion of K through W , after suitably shifting K and rotating it around (cid:126)v by θ . We next show that the total number of quadruplesof vertices is O ( n ), from which we obtain an algorithm for finding a valid view, withnear-cubic running time.Returning to the aspect-graph arrangement A , we observe that, since it is composedof n great circles, its complexity is O ( n ). For all directions (cid:126)v within the same face of A ,the silhouette and its projection are fixed combinatorially, but the actual spatial positionsof the projected vertices depend on the direction (cid:126)v , and the projected silhouette can alsorotate arbitrarily within the image plane h (cid:126)v . (Note that in this discussion we completelyignore translations of K , as they are irrelevant for the analysis and its conclusions.)We assign some canonical coordinate frame to h (cid:126)v , and refer, for simplicity, to its axes asthe x - and y -axes (they depend on (cid:126)v ). For example, excluding O (1) problematic directions,which can be handled separately, and easily, we can take the x -axis within h (cid:126)v to be theintersection of h (cid:126)v with the xz -plane, and take the y -axis to be in the orthogonal directionwithin h (cid:126)v , oriented in the direction that has a positive y -component. The actual spatiallocation of the projected silhouette (up to translation, which we ignore) of K can be pa- The silhouette is indeed such a cycle of vertices and edges of ∂K for generic directions (cid:126)v . When (cid:126)v isparallel to a face f of K , the entire f is part of the silhouette. The silhouette and its projection: (i) The case of a generic (cid:126)v . (ii) The case where (cid:126)v is parallel to a face f of K ( (cid:126)v is on the great circle γ f ). rameterized by ( (cid:126)v, θ ), where θ is the rotation of the projected silhouette within the imageplane h (cid:126)v . We refer to ( (cid:126)v, θ ) as the view of K . See Figure 6.As we vary (cid:126)v and θ , we want to keep track of the leftmost and rightmost vertices of theprojected silhouette (in the x -direction), and of the topmost and bottommost vertices (inthe y -direction, all with respect to the coordinate frame within h (cid:126)v ). We succeed when wefind a projection (in direction (cid:126)v ), followed by a rotation (by θ ), for which the x -differencebetween the rightmost and leftmost vertices is at most a and the y -difference between thetopmost and bottommost vertices is at most b . We reiterate that this is indeed the propertythat we need: It takes place in a slanted plane h (cid:126)v with respect to an artificial coordinateframe within that plane, but using a suitable rotation of h (cid:126)v we can make it horizontal andits coordinate frame parallel to the standard xy -frame. A subsequent suitable translationthen brings the projected silhouette to within W , as desired.Fix a face ϕ of A , and let w , w , . . . , w m denote the cyclic sequence of the verticesof the projected silhouette, say in counterclockwise order, for views in ϕ . If the currentleftmost vertex is some w j , then it remains leftmost as long as neither of the two adjacentedges w j − w j and w j w j +1 becomes y -vertical. (Recall that ‘leftmost’ and ‘ y -vertical’ arewith respect to the artificial frame within h (cid:126)v .) The views ( (cid:126)v, θ ) at which an edge e of K ,say, w j − w j is y -vertical comprise a two-dimensional surface ρ e in the three-dimensionalspace V = S × S of views ( (cid:126)v, θ ). See Figure 8.The discussion so far has been for views that have a combinatorially fixed silhouette.However, to make the algorithm for finding a sliding motion more efficient, we consider allpossible silhouettes ‘at once’, using the following approach. After forming the aspect-grapharrangement A , as defined above, we replace each great circle γ f on S by the cylindricalsurface γ ∗ f = γ f × S , and collect these surfaces into a set Γ, of cardinality O ( n ). Then, foreach edge e of K (regardless of whether it is a silhouette edge or not), we form the surface ρ e , as just defined, and collect these surfaces into a set Σ, of cardinality n . We now formthe three-dimensional arrangement A = A (Γ ∪ Σ) (note that all the surfaces of Γ ∪ Σ aretwo-dimensional). As is easily verified, for each three-dimensional cell τ of A , the projectedsilhouette of K , and its leftmost, rightmost, topmost and bottommost vertices (we refer to9igure 7: A view of K . To simplify the visualization, we rotate the containing window W ratherthan the projected silhouette. The leftmost, rightmost, topmost and bottommost vertices arehighlighted. Figure 8:
A discrete change of the leftmost vertex of the projected silhouette. extreme vertices of the projected sihouette) are fixed for all viewsin τ . Since | Γ ∪ Σ | = O ( n ), the complexity of A is O ( n ).To obtain a representation that is easy to process further, we construct the vertical de-composition of A , which we denote as VD( A ). It is a decomposition of the three-dimensionalcells of A into a total of nearly cubic number of prism-like subcells (that we simply callprisms). See Sharir and Agarwal [27, Section 8.3] for more details. A sharp bound on itscomplexity (i.e., the number of prisms) is O ( n λ s ( n )), for some constant s (a sharp estima-tion of the value of s is not given in this paper), where λ s ( n ) is the maximum length of aDavenport–Schinzel sequence of order s on n symbols; see [27]. The vertical decompositioncan be constructed in time O ( n λ s ( n ) log n ) [4].We now iterate over all prisms of VD( A ). For each prism τ , we retrieve the four extremevertices of the projected silhouette, which are fixed for all views in τ , and check whetherthere is a view in τ for which these vertices, and thus all of the projected silhouette, fit into W (after suitable rotation and translation of W , as discussed above). To do so, denote theseleftmost, rightmost, topmost and bottommost vertices as w l , w r , w t and w b , respectively.The x -coordinates x w l , x w r of w l and w r , and the y -coordinates y w t , y w b of w t and w b (within h (cid:126)v ) are functions of ( (cid:126)v, θ ). We need to determine whether the region S = S ( w l , w r , w t , w b ) := { ( (cid:126)v, θ ) ∈ S × S | x w r ( (cid:126)v, θ ) − x w l ( (cid:126)v, θ ) ≤ a, y w t ( (cid:126)v, θ ) − y w b ( (cid:126)v, θ ) ≤ b } , which is exactly the region of views ( (cid:126)v, θ ) at which W contains a (rotated and translated)copy of the projected silhouette with these four specific vertices as the extreme vertices ofthe projection, has a nonempty intersection with τ . Since S and τ are semialgebraic regionsof constant complexity, this test can be performed, in a suitable (and standard) model ofreal algebraic computation, in constant time [10]. Summing over all prisms τ , the overallcost of these tests is proportional to the complexity of VD( A ), namely it is O ( n λ s ( n )).To complete the description of the algorithm, we now consider the task of computingthe four extreme vertices w l , w r , w b and w t of the silhouette, or, more precisely, the four(fixed) vertices of K that project to them, for each cell c of A . As an easy by-product of theconstruction of VD( A ), each of its prisms can be associated with the cell of A containingit, so the four extreme vertices will also be available for each prism of VD( A ).By the nature of the surfaces forming A , the projection of each cell c of A onto S is fullycontained in a single cell ρ = ρ ( c ) of the two-dimensional aspect-graph arrangement A .For each such cell ρ , the discrete nature of the silhouette, as a cyclic sequence of vertices(and edges) of K , is fixed for every (cid:126)v ∈ ρ and for any θ ∈ S . Although we can do it faster,we simply iterate over the O ( n ) cells of A , and for each cell ρ , compute the silhouette in O ( n ) time, in brute force (by picking an arbitrary point (cid:126)v in ρ , and by examining each edgeof K for being part of the silhouette in direction (cid:126)v ). The overall cost of this step is thus O ( n ).Consider now a cell c of A , and let ρ = ρ ( c ) be the cell of A that contains the S -projection of c . Let ( u , u , . . . , u m ) denote the cyclic counterclockwise sequence of verticesof K that forms the silhouette for directions in ρ , and let w i denote the S -projection of u i , for i = 1 , . . . , m . Since the vertices of K inducing w l , w r , w b and w t are fixed over c , itsuffices to compute them for a fixed arbitrary view in c . We thus fix such a view ( (cid:126)v, θ ), andproceed as follows. 11or each i , define the “derivative” of the silhouette at w i to be the pair of vectors( w − i , w + i ) = ( −−−−→ w i − w i , −−−−→ w i w i +1 ) , where the vectors are represented in the coordinate frame induced by ( (cid:126)v, θ ) in a planeorthogonal to (cid:126)v , and where addition and subtraction of indices is modulo m . The extremevertices w l , w r , w b , w t partition the silhouette into (at most) four subsequences: S , between w r and w t , S , between w t and w l , S , between w l and w b , and S , between w b and w r (see Figure 9), so that, for w i ∈ S (resp., S , S , S ) both vectors w − i , w + i lie in thesecond (resp., third, fourth, first) quadrant. For w r (resp., w t , w l , w b ), the vectors lie,respectively, in the first and second (resp., second and third, third and fourth, fourth andfirst) quadrants. Figure 9:
The sub-silhouettes S (purple), S (blue), S (green), S (orange). The extremevertices w r , w t , w l , w b delimit these sub-silhouettes and are highlighted. Using these observations, we find the four extreme vertices using binary search, asfollows. We break the silhouette sequence into two linear subsequences at w and w m/ , andfind the extreme vertices in each subsequence. Consider the subsequence ( w , w , . . . , w m/ ).We compute the derivatives at w and at w m/ , and thereby identify the two respective sub-silhouettes that contain these vertices. Suppose for specificity that w lies in S and w m/ lies in S . Then we know that our subsequence contains (only) w t and w l , and we can findeach of them by a straightforward binary search, using the derivatives to guide the search.We apply similar procedures in each of the other cases, and for the second subsequence( w m/ , w m/ , . . . , w ).In conclusion, it takes O (log n ) time to find the extreme vertices for each cell of A , andthus also for each prism of VD( A ), for a total running time of O ( n λ s ( n ) log n ). We gloss here over the easy special cases of degeneracy, in which the extreme vertices are not all distinct.In such cases some of the sub-silhouettes S , . . . , S might be empty, and the rules for identifying the extremevertices need to be adjusted. .4 An improved algorithm for sliding motions We next present an improved, albeit more involved algorithm that solves the problem offinding a sliding motion of K , if one exists, in time O ( n / polylog( n )).The problem of finding a direction (cid:126)v in which we can slide K through W is equivalent tothe problem of finding a placement of W on some plane h such that the projected silhouetteof K on h is contained in W , which in turn is equivalent to verifying that all the verticesof K are projected into that placement of W .An equivalent way of checking for the latter characterization is to look for two unitvectors x and y (which will be the directions of the axes of W in the desired placement;note that h is spanned by x and y ) that satisfy: (i) x and y are perpendicular to each other. (ii) For every segment e connecting two vertices of K we have (cid:104) x, e (cid:105) ≤ a . (iii) For every segment e connecting two vertices of K we have (cid:104) y, e (cid:105) ≤ b .(Note that since we go over all unordered pairs of vertices of K in (ii), (iii), we actuallyrequire that |(cid:104) x, e (cid:105)| ≤ a and |(cid:104) y, e (cid:105)| ≤ b for each such segment e .) Every inequality in (ii)defines a halfspace that has to contain x . We intersect those O ( n ) halfspaces, to obtain aconvex polytope Q of complexity O ( n ), and intersect Q with the unit sphere S to obtainthe admissible region A of the vectors x that satisfy (ii), in O ( n log n ). We apply the sameprocedure for y using the suitable collection of halfspaces in (iii), and obtain the admissibleregion B for the vectors y that satisfy (iii), also in O ( n log n ). To satisfy also (i), we need tocheck whether there exist an orthogonal pair of vectors x ∈ A, y ∈ B . We use the followinglemma. Lemma 2.4
Let S A denote the set of all vertices of A , and let T A denote the set of thepoints that are closest locally to the north pole of S along each circular arc of the boundaryof A . (By choosing a generic direction for the north pole of S we may assume that T A isfinite and | S A ∪ T A | = O ( n ) .) Define similarly the sets S B , T B . If there exist an orthogonalpair ( x, y ) ∈ A × B then there exist such an orthogonal pair so that either x ∈ S A ∪ T A or y ∈ S B ∪ T B . Proof.
We refer to an orthogonal pair in A × B as a good pair . Let ( x, y ) be a good pairsuch that x is as close to the boundary of A as possible. If there are multiple pairs with thisproperty, pick the one in which x is the closest to the north pole. If there are still multiplepairs, pick an arbitrary pair among them. By continuity and the compactness of A and B ,it is easy to show that such a “minimal pair” exist.Several cases can arise:1. x or y is one of the desired vertices. In this case we are done.2. Both x and y lie in the interiors of A and B , respectively. In this case they can bemoved slightly together in any direction, while maintaining their mutual orthogonality.In particular, x can get closer to the boundary of A so ( x, y ) is not the minimal pair.13. x is on the boundary of A , and y is in the interior of B . Since we are not in Case1, x lies in the relative interior of an edge of ∂A and is not the point on that edgethat is closest to the north pole. Then we have two available directions to move ( x, y )slightly such that x remains on the same edge. One of these directions brings x to apoint closer to the north pole, so ( x, y ) is not the minimal pair.4. y is on the boundary of B (as in Case 3 we may assume that y lies in the relativeinterior of an edge of ∂B ). In this case we fix x and move y along the great circle C x of points perpendicular to x . Recall that y is on an edge of B , which is a circular arc γ . Every halfspace of the intersection contains the origin, so B is contained in thebigger portion C + (bigger than a hemisphere) of S that is bounded by the circle C containing γ . Since C x is a great circle, it is bigger than C , so when moving y along C x in at least one of the two possible directions, y enters C + (this is always true,regardless of the size of C x , when the circles cross one another at y ; the fact that C x is larger is needed when they are tangent at y ), so it enters the interior of B . Now weare in one of the cases 2 , (cid:50) We iterate over the points of S A ∪ T A . For each such point v let C v be the great circleof vectors perpendicular to v , and let C denote the collection of these O ( n ) great circles.We face the problem of determining whether any great circle in C crosses B . This is thesame as determining whether any great circle in C crosses an arc of ∂B . This is a variantof the batched range searching paradigm, and we present next a detailed solution for thiscase. We apply a fully symmetric procedure to the collection of great circles orthogonal tothe points of S B ∪ T B and to A . If we find a valid intersection it gives us a valid orthogonalpair. Otherwise, such a pair does not exist. Detecting an intersection between the great circles of C and the boundary arcs of B . We apply a central projection (from the center of S ) onto some plane, say a horizontalplane h lying below S (with a generic choice of the coordinate frame, we may assume thatnone of the points in S A ∪ T A ∪ S B ∪ T B are on the great circle that is parallel to h ). Thisis a bijection of the open lower hemisphere onto h , in which (the lower portions of) greatcircles are mapped to lines, and (the lower portions of) circular arcs are mapped to arcsof conic sections (ellipses, parabolas, hyperbolas, or straight lines). This transforms theproblem into a batched range searching problem, in which we have a set L of M = O ( n )lines (which arise from the great circles orthogonal to the points of S A ∪ T A ) and a set E of N = O ( n ) pairwise disjoint arcs of conic sections (which are the projections of the arcsforming the boundary of B ), and the goal is to determine whether any line in L crossesany arc in E . We note that the halfspaces from which we obtain B come in pairs that aresymmetric to each other about the origin, so restricting the problem to the lower hemisphereincurs no loss of generality. We also note that there might be situations in which one of thegreat circles is fully contained in B , but these cases are easy to detect, e.g., by picking anarbitrary point on each great circle and checking whether it belongs to B , using a suitablepoint-location data structure on B .To simplify the presentation, we assume that the arcs of E are elliptic arcs; handlingthe cases of parabolic or hyperbolic arcs is done in essentially the same manner.14rient all the lines of L from left to right. We may assume that all the arcs in E are x -monotone (otherwise we break each arc that is not x -monotone at its leftmost andrightmost points, into at most three x -monotone subarcs). We orient all these (sub)arcs alsofrom left to right. We also treat separately convex arcs, namely arcs for which the tangentdirections turn counterclockwise as we traverse them from left to right, and concave arcs,for which the tangent directions turn clockwise. The treatments of these two subfamiliesare fully symmetric, so we only consider the case of convex arcs.A line (cid:96) intersects a convex x -monotone arc γ of some ellipse e , both oriented as above,if and only if one of the following conditions holds. (i) The two endpoints of γ lie on different sides of (cid:96) . See Figure 10(i). (ii) The two endpoints of γ lie to the left of (cid:96) and (cid:96) intersects e . For this to happen, γ must have a tangent that is parallel to (cid:96) . That is, the slope of (cid:96) must lie between theslopes of the tangents to γ at its endpoints. When all these conditions hold, it sufficesto require that (cid:96) lies to the left of the right tangent to e with the same slope of (cid:96) . SeeFigure 10(ii,iii).Figure 10: A line (cid:96) intersecting a convex x -monotone elliptic arc γ : (i) The two endpoints of γ lie on different sides of (cid:96) . (ii) The two endpoints lie to the left of (cid:96) and (cid:96) lies to the left ofthe parallel tangent to the arc. (iii) The two endpoints lie to the right of (cid:96) (and then there isno intersection). (iv) The two endpoints lie to the left of (cid:96) but γ has no tangent parallel to (cid:96) (and then there is no intersection). To test for intersections of type (i), we use a two-level data structure, where each levelis a standard tree-like range searching structure for points and halfplanes (see [1, 2]). Thefirst level collects the arcs that have one endpoint to the right of (cid:96) , and the second leveltests whether any of these arcs has its other endpoint to the left of (cid:96) . Using the standard15achinery for point-halfplane range searching (see, e.g., [1, Theorem 6.1], and also [2]), thistakes time O ( M / N / polylog( M + N )) = O ( n / polylog( n )).To test for intersections of type (ii), we use a four-level data structure, where, as before,the first two levels are standard range searching structures for points and halfplanes, so thatthe first level collects the arcs that have their left endpoint to the left of (cid:96) , and the secondlevel collects, from among the arcs in the output of the first level, those arcs that have theirright endpoint also to the left of (cid:96) . The third level is a one-dimensional segment tree onthe interval ranges of the slopes of the tangents to the arcs, and it collects those arcs whosetangent-slope range contains the slope of (cid:96) . Finally, the fourth level tests whether any ofthe arcs is such that its tangent that is parallel to (cid:96) passes to the right of (cid:96) .To implement the fourth level, we note that the lines that are tangent to the ellipse e and have slope a can be written as y = ax + ϕ − e ( a ) and y = ax + ϕ + e ( a ), with ϕ − e ( a ) < ϕ + e ( a ),where ϕ − e ( a ) and ϕ + e ( a ) are algebraic functions of constant degree that depend on e . If (cid:96) has the equation y = ax + b then we need to test whether there exists an ellipse e such that b > ϕ − e ( a ). We thus compute the lower envelope of the functions ϕ − e in time nearly linearin the number of arcs, and then, given a line y = ax + b , we test whether the point ( a, b )lies above the envelope, in logarithmic time.It is easy to see that in this case too, the overall cost is O ( n / polylog( n )). In conclusion,we have shown: Theorem 2.5
Given K and W as above, we can determine whether K can slide through W in a collision-free manner, and, if so, find such a sliding motion, in time O ( n / polylog( n )) . We are not aware of any published result that solves the specific problem at hand, of deter-mining whether any great circle in C crosses B , with comparable running time. A differentsolution, with a similar performance bound, was suggested to us by Pankaj Agarwal, andwe thank him deeply for the useful interaction concerning this problem.We end this section with the interesting challenge of improving the algorithm. A concreteway of doing this would be to argue that not all the features of S A ∪ T A and B need to betaken into account in the batched range searching step. We again thank Pankaj Agarwalfor raising this issue. In this section we consider the variant in which W is an infinite slab in the xy -plane,bounded by, say, two vertical lines x = 0 and x = a . We refer to such a window as a gate .We show: Theorem 3.1
Let K be a convex polytope that can be moved by some collision-free rigidmotion through a gate W . Then there exists a sliding collision-free motion of K through W . We can therefore apply the machinery of Theorem 2.5, and conclude that we can determinewhether K can be moved through W by a collision-free motion, in time O ( n / polylog( n )).16 roof. We start by giving a brief sketch of the proof, and then go in to the full details.By projecting the moving polytope K and W onto the xz -plane, W projects to the interval g := [0 , a ] × { } , and K projects to a time-varying convex polygon that starts from aplacement that lies in the upper halfplane z > z <
0. For technical reasons, we approximate K by a smooth convex body,and reduce the problem to the case where K is smooth and convex.At any time t during the motion, the projected planar region π ( K ( t )) (where K ( t ) isthe placement of K at time t ) meets g at some interval I ( t ) (we ignore the prefix and suffixof the motion where K ( t ) does not yet meet, or no longer meets W ). We consider the twotangents to π ( K ( t )) at the endpoints κ − ( t ), κ + ( t ) of I ( t ), and note that, at the beginningof the motion, the wedge that these tangents form and that contains K ( t ) points upwards,and at the end of the motion it points downwards; see Figure 11.Figure 11: Moving the projection of K through g . Left: At the beginning of the crossing of g ,the tangents τ − ( t ) and τ + ( t ) ‘open up’ (with respect to their sides that contain K ( t ) ). Right:At the end of the crossing, they ‘open down’. Since the tangents vary continuously (because K ( t ) is always smooth), there must bea time t at which the two tangents are parallel to each other, and thus span a slab σ (inthe xz -plane) whose width is clearly ≤ a . See Figure 12. The Cartesian product of σ andthe y -axis yields a slab σ ∗ in R , whose cross-section with the xy -plane is contained in W .This in turn implies that K can slide through W , and completes the proof.Figure 12: The critical instance t where the tangents at κ − ( t ) and at κ + ( t ) become(anti-)parallel. In more detail, we proceed as follows. Continue to assume that K is smooth; we willlater use a compactness argument to extend the result to convex polytopes.17s in the short version of the proof, let then K be an arbitrary compact convex bodyin R , let h denote the xz -plane, and let g := h ∩ W , which is the segment 0 ≤ x ≤ a , z = 0 within h . The two complementary rays to g within the x -axis form the only obstacleswithin h . Let π denote the orthogonal projection of 3-space onto h .Assume that K can be moved through W by an arbitrary collision-free rigid motion,which we represent as a continuous map on [0 ,
1] (a ‘time interval’), where, for each t ∈ [0 , K ( t ) denotes the placement of K at time t during the motion. For each t ∈ [0 , ∂π ( K ( t ))is the projection of the silhouette of K ( t ) on h . It is a time-varying convex region within h , whose shape is not rigidly fixed. For a convex polytope K , the projected silhouette ∂π ( K ( t )) is a time-varying convex polygon.We have the following property, whose easy proof is omitted. Lemma 3.2
The motion t (cid:55)→ K ( t ) is collision-free, and moves K through W from a place-ment K (0) in the upper halfspace to a placement K (1) in the lower halfspace, if and onlyif the map t (cid:55)→ π ( K ( t )) is collision-free within h , and moves the (time-varying) projection π ( K ( t )) through g from the placement π ( K (0)) in the upper halfplane z > to the placement π ( K (1)) in the lower halfplane z < . We note that in Lemma 3.2 the body K is not required to be smooth, but this require-ment is needed for the proof of the following theorem. Theorem 3.3
Let K be a smooth compact convex body that can be moved, by a collision-free rigid motion, through W from a placement in the upper halfspace z > to a placementin the lower halfspace z < . Then there exists a sliding collision-free motion of K through W . Proof.
Let K be as in the theorem, and let t (cid:55)→ K ( t ) be a collision-free rigid motion thattakes K through W , as in the theorem statement. For each t , π ( K ( t )) is also smooth (as aplanar convex region). Put κ ( t ) := π ( K ( t )) ∩ g , which is a subsegment of g (by assumption,and by Lemma 3.2, the intersection of π ( K ( t )) with the x -axis is always fully contained in g ). κ ( t ) is empty at the begining and at the end of the motion, namely during some prefixinterval and some suffix interval of [0 ,
1] (if the motion is ‘crazy’ enough, κ ( t ) might alsobe empty during some other inner intervals of [0 , π ( K ( t )) crosses g from side to side, there must exist at least one closed maximal connected interval I = [ t , t ]within [0 ,
1] such that κ ( t ) (cid:54) = ∅ for all t ∈ I , and such that κ ( t ) and κ ( t ) are singletons,so that κ ( t ) (resp., κ ( t )) is the z -lowest (resp., z -highest) point of π ( K ( t )) (resp., of π ( K ( t ))). See Figure 11 for an illustration.Denote, for t ∈ I , the left and right endpoints of κ ( t ) by κ − ( t ) and κ + ( t ), respectively,and let τ − ( t ) (resp., τ + ( t )) denote the tangent to π ( K ( t )) at κ − ( t ) (resp., at κ + ( t )), wherewe orient both tangents so that π ( K ( t )) lies to their right.Since π ( K ( t )) is smooth, the two tangents are well defined and unique. Moreover, sincethe motion of K ( t ) is continuous, so is the ‘motion’ of π ( K ( t )), and this is easily seen toimply that the directions µ − ( t ) of τ − ( t ), and µ + ( t ) of τ + ( t ) are also continuous functionsof t .Consider the map ϕ ( t ) that maps t ∈ I to the counterclockwise angle between µ − ( t ) and µ + ( t ). The map is undefined at t and at t , but we assume that it is defined everywhere18n the interior of I (as would be the typical situation—see the comment made earlier). ϕ ( t )is clearly a continuous function. For t slightly larger than t , ϕ ( t ) has a small positivevalue, and for t slightly smaller than t , ϕ ( t ) is close to 2 π . It follows, by continuity, thatthere exists t ∈ I for which ϕ ( t ) = π , that is, the two tangents at κ − ( t ) and at κ + ( t )are parallel to each other. This means that π ( K ( t )) is contained in the slab σ , within h , bounded by the two tangent lines. This in turn implies that K ( t ) is contained in thethree-dimensional slab S which is the Cartesian product of σ and the y -axis. Moreover, theintersection of S with the xy -plane is a y -vertical slab that is contained in W (see Figure 12for an illustration). This in turn means that, if we fix the orientation of K to be that of K ( t ), we can slide K within S through W (note that there are infinitely many ways to doso, each with its own y -component of the sliding direction). This completes the proof. (cid:50) We now continue with the proof of Theorem 3.1. To extend Theorem 3.3 to the casewhere K is a polytope, we use the following approximation scheme. Let D be some ballfully contained in K , with center c and radius ρ . For each δ >
0, let L δ be the Minkowskisum of K and a ball centered at the origin with radius δ , and define a map f δ on S , sothat, for each (cid:126)v ∈ S , f δ ( (cid:126)v ) = (1 − δ ) g ( (cid:126)v ) + δρ , where g ( (cid:126)v ) is the distance from c to ∂L δ indirection (cid:126)v . Define K δ to be { c + tf δ ( (cid:126)v ) (cid:126)v | (cid:126)v ∈ S , t ∈ [0 , } , scaled down by a factor of 1 + δ . See Figure 13 for an illustration.Figure 13: A two-dimensional illustration of the scheme for approximating a convex polytope bysmooth strongly convex bodies: the convex polygon (blue), Minkowski sum with a small circle(green) and K δ (black). It is easily seen that K δ is a smooth compact strongly convex object that is containedin K , and that K δ → K as δ →
0, in the sense that the Hausdorff distance between K and19 δ tends to zero. Clearly, if K can be moved through W (by an arbitrary collision-freerigid motion), then so can K δ .For each δ >
0, apply Theorem 3.3 to K δ , to obtain a direction (cid:126)v δ and a rotation θ δ orthogonal to (cid:126)v δ so that there is a sliding collision-free motion of K δ in direction (cid:126)v δ from itsview ( (cid:126)v δ , θ δ ) through W . By compactness of S , there exists a sequence δ i ↓ (cid:126)v δ i converges to some direction (cid:126)v in S , and θ δ i converges to some rotation θ . By continuity, itfollows that there exists a sliding collision-free motion of K through W in direction (cid:126)v fromits view ( (cid:126)v, θ ).This completes the proof of Theorem 3.1. (cid:50) We can therefore apply the machinery of Theorem 2.5, and conclude that we can deter-mine whether K can be moved through W by a collision-free motion in time O ( n / polylog( n )).We note that strong convexity of the approximating body is not needed for the analysisin this section, but only in the following Sections 4 and 5. To avoid duplication, we haveused the same scheme for approximating a convex polytope, for the analysis both here andin the subsequent sections. In this section we prove a similar yet different property of a convex polytope passing throughan arbitrary compact planar convex window, not necessarily rectangular.
Theorem 4.1
Let W be an arbitrary compact convex region in the xy -plane. Let K be aconvex polytope that can be moved by some collision-free motion (possibly full rigid motion,with six degrees of freedom) through W , and let d be the diameter of W (the maximumdistance between any pair of points in W ). Let h be an arbitrary plane, and let K h be theorthogonal projection of K on h . Then K h can be rigidly placed between two parallel linesat distance d . That is, for any fixed direction (cid:126)v , K can slide, from its (arbitrary) initialplacement, in direction (cid:126)v through a gate of width d , in a plane perpendicular to (cid:126)v . We provide two different topology-based proofs of Theorem 4.1, both presented in fulldetail at the end of this section. We start by sketching one of these proofs. But first hereis an interesting corollary of the theorem.
Corollary 4.2 If K can be moved through a rectangular window W of dimensions a × b bysome collision-free motion, then K can slide through a rectangle of dimensions min ( a, b ) ×√ a + b . Proof.
Assume without loss of generality that a < b . Since K can move through a rectangleof dimensions a × b , it can also move through the gate, of width a , [0 , a ] × R (in the xy -plane). Now project K on the yz -plane, and apply Theorem 4.1, to conclude that theprojection of K can be placed in a slab in the yz -plane, bounded by two parallel lines l , l at distance √ a + b apart (which is the diameter of W ). Rotate 3-space around the x -axisso as to make l and l vertical (parallel to the z -direction). Now the projected silhouette20f K on the xy -plane is contained in a rectangle of dimensions a × √ a + b , so K can slide(vertically down) through this rectangle. See Figure 14 for an illustration. (cid:50) Figure 14: K can slide through a rectangle of dimensions a × √ a + b . Left: The projectionof K on the xy -plane is contained in a gate of width a (the black lines), and the projection of K on the yz -plane is contained between the lines l , l (orange). Right: After rotating K aroundthe x -axis, l , l are perpendicular to the xy -plane and the projection of K on the xy -plane iscontained in the desired rectangle. Two proofs of Theorem 4.1.
Similar to the previous section, we first prove the theoremfor smooth strongly convex compact bodies, and then extend the result to polytopes thesame way as before. Consider the motion of K , now assumed to be a smooth, stronglyconvex, and compact body, during the time interval [0 , t = 0 (resp., at t = 1), K lies fully above (resp., below) the xy -plane. First proof.
Fix some direction (cid:126)v , and let C = C ( (cid:126)v ) denote the silhouette of K whenviewed in direction (cid:126)v . Let h be some plane orthogonal to (cid:126)v , and let π h denote the orthogonalprojection onto h . Parameterize a point u ∈ C by the orientation θ of the tangent at π h ( u )to K h := π h ( K ) which is well defined since K is smooth, and let γ h be the inverse of π h ;that is, γ h ( θ ) is the unique point u ∈ C such that π h ( u ) = θ . Since K is assumed to bestrongly convex, K h is also strongly convex, and γ is a well-defined and continuous functionon S . We extend γ to a bivariate function γ ∗ : S × [0 , (cid:55)→ R , so that γ ∗ ( θ, t ) is theposition (in the ambient 3-space) of γ ( θ ) at time t during the motion of K .Let δ : S × [0 , (cid:55)→ R be the function δ ( θ, t ) = z ( γ ∗ ( θ, t )), namely, the z -coordinate ofthe corresponding point γ ( θ ) of C at time t . Note that at time t = 0 (resp., at time t = 1), δ is positive (resp., negative) at each θ , since K lies fully above (resp., below) the xy -planeat that time. Put M := max θ ∈ S δ ( θ,
0) and m := min θ ∈ S δ ( θ, M > m < δ ( θ ) = δ ( θ,
0) and δ ( θ ) = δ ( θ,
1) are defined and continuous on S , andwe extend each of them to the closed unit disk B bounded by S , in polar coordinates,which, for technical reasons, we write in reverse order as ( θ, r ), by δ ∗ ( θ, r ) = rδ ( θ ) + (1 − r ) Mδ ∗ ( θ, r ) = rδ ( θ ) + (1 − r ) m. It is easily checked that these extensions are well defined and continuous over B . Moreover, δ ∗ ( θ, r ) > δ ∗ ( θ, r ) < θ .We now take our function δ , which is so far defined on the side surface S of the cylinder S × [0 , S ∗ := S ∪ B ∪ B of the cylinder, so that21 coincides with δ ∗ on the base B of the cylinder at t = 0, and with δ ∗ on the base B at t = 1. Clearly, the extended δ is well defined and continuous over S ∗ .To simplify the forthcoming analysis, we identify S ∗ with the unit sphere S , which weparameterize by ( θ, z ), where θ ∈ S is the horizontal orientation of the point on S and z is its z -coordinate (so θ is not well defined at the north and south poles of S ). We use thesimple homeomorphism f that maps a point ( θ, t ) ∈ S to ( θ, t − / ∈ S , maps a point( θ, r ) ∈ B to ( θ, − r/ ∈ S , and maps a point ( θ, r ) ∈ B to ( θ, − r/ ∈ S . SeeFigure 15 for an illustration. In what follows, we will mostly use S to represent S ∗ , exceptfor a few technical observations.Figure 15: Identifying S ∗ with the unit sphere S . B is shown in green, B in orange, and S in light blue. In (i) S ∗ is depicted, in (ii) an intermediate snapshot of the deformation is shown,for visual convenience, and in (iii) the final unit ball is shown, divided into the three parts thatcorrespond to B , S and B . Define a function G from S to R by G ( θ, t ) = ( δ ( θ, z ) , δ ( θ + π, z )) , for ( δ, z ) ∈ S . Our goal is to show that G ( S ) contains the origin. Note that, by construction, G ( f ( B ))is fully contained in the positive quadrant Q := { ( x, y ) | x, y > } , and G ( f ( B )) is fullycontained in the negative quadrant Q := { ( x, y ) | x, y < } . Thus, if G ( S ) contains theorigin then so does G ( f ( S )). Once this property is established, it provides us with a pair( θ, z ) such that δ ( θ, z ) = δ ( θ + π, z ) = 0, which means that there are two antipodal points u, v ∈ C that pass through W simultaneously. Therefore their distance must be at mostthe diameter of W , and hence also the distance between the parallel tangent planes throughthem, which is a slab parallel to (cid:126)v of width at most d that contains K , as asserted.Assume to the contrary that G ( S ) does not contain the origin. Then we can normalize G to the function H ( θ, z ) := G ( θ, z ) (cid:107) G ( θ, z ) (cid:107) , for ( θ, z ) ∈ S , which maps S continuously to the unit circle S . The function G , and thus also the function H , are symmetric with respect to the line y = x in R , meaning that G ( θ + π, z ) = Σ( G ( θ, z )) , for ( θ, z ) ∈ S , and thus also H ( θ + π, z ) = Σ( H ( θ, z )) , for ( θ, z ) ∈ S , where Σ is the reflection about y = x , that is, Σ( x, y ) = ( y, x ).22e now use the property that the real line is a covering space of S , in the specific (andeasily verified) sense that the continuous map p : R (cid:55)→ S , given by p ( x ) = e πix , for x ∈ R ,is surjective, and, for each ζ ∈ S , there exists an open neighborhood U of ζ such that p − ( U ) is the disjoint union of open sets in R , each of which is mapped homeomorphicallyto U by p . The map p is called the covering map .A well known property of covering spaces is the lifting property (reviewed, e.g., in [17];see also [16]), a special case of which asserts, in the specific context used here, that, if ϕ is any continuous map from S to S then ϕ can be lifted to a map ψ : S (cid:55)→ R , so that p ◦ ψ = ϕ . (Technically, this property holds when the domain of ϕ (and ψ ), which is S inour case, is path connected, locally path connected, and simply connected, conditions thatare trivially satsfied by S . Hence the lifting ψ does indeed exist.)Applying the lifting property to the function H , we get a continuous mapping T : S (cid:55)→ R , such that p ◦ T = H , so we have the property that p ( T ( θ + π, z )) = Σ( p ( T ( θ, z ))) , for ( θ, z ) ∈ S . As is easily checked, we have Σ (cid:0) e iy (cid:1) = e i ( π/ − y ) , and therefore, for a point x ∈ R , we haveΣ( p ( x )) = Σ (cid:0) e πix (cid:1) = e πi/ − πix = p (1 / − x ) , so p ( T ( θ + π, z )) = p (1 / − T ( θ, z )) , for ( θ, z ) ∈ S . This in turn implies, by the definition of p , that T ( θ + π, z ) = 1 / k θ,z − T ( θ, z ) , for some integer k θ,z . However, since T is continuous, there must be a single integer k suchthat k θ,z ≡ k for all θ and z . That is, we have T ( θ + π, z ) + T ( θ, z ) = 1 / k, for all ( θ, z ) ∈ S . (2)By an easy application of the mean-value theorem (which is also a special case of theBorsuk-Ulam theorem in dimension 1), there exist θ and θ such that, recalling that thevalue z = − / z = 1 /
2) corresponds to points on the lower (resp., upper) circlebounding S , T ( θ + π, − /
2) = T ( θ , − / T ( θ + π, /
2) = T ( θ , / . Substituting in (2), we get T ( θ , − /
2) = T ( θ , /
2) = 1 / k/ . However, by construction, H ( θ , − /
2) lies in the first quadrant Q , and H ( θ , /
2) liesin the third quadrant Q . Hence we have T ( θ , − / ∈ (0 , /
4) + Z and T ( θ , / ∈ (1 / , /
4) + Z , but 1 / k/ k is even or odd). This contradiction shows that G ( S ), and thus also G ( f ( S )), contains theorigin, as asserted.So far the proof was for smooth strongly convex compact bodies. The extension to thecase of a convex polytope K is done exactly as in the proof of Theorem 3.1. (cid:50) econd proof. We provide an alternative proof of Theorem 4.1, and we are grateful toBoris Aronov for providing to us its main ingredients.We use the same notations as in the first proof. Similar to that proof, the following,slightly more generally stated proposition is the main technical tool that we need.
Proposition 4.3
Let G : S → R be a continuous map, interpreted as the homotopy ofthe closed curve δ : S → Q ⊂ R , given by θ (cid:55)→ G ( θ, , to the closed curve δ : S → Q ⊂ R , given by θ (cid:55)→ G ( θ, . In addition, suppose that G is symmetric, in the sense that G ( θ + π, t ) = Σ( G ( θ, t )) , for all θ ∈ S and t ∈ [0 , . Then there exist θ ∈ S , t ∈ R thatsatisfy G ( θ, t ) = O , that is, G cannot miss the origin. Proof.
Clearly, if G ( θ, t ) = O then we also have G ( θ + π, t ) = O . Hence it suffices to showthat there exists ( θ, t ) in D := [0 , π ] × [0 ,
1] (half the side surface of the cylinder) such that G ( θ, t ) = O . Let Π be the image of D under G .Consider the curve γ : [0 , → S defined by t (cid:55)→ (0 , t ), and its image Γ under G ,i.e., Γ ( t ) = G (0 , t ) ∈ R . Let γ and Γ be defined similarly by γ ( t ) := ( π, t ), so thatΓ ( t ) = G ( π, t ). Let γ (cid:48) and Γ (cid:48) be the reverses of γ and Γ , respectively — the same curvestraversed in reverse direction.Additionally, let ζ , ζ : [0 , π ] → S be the “half-circles” defined by θ (cid:55)→ ( θ,
0) and θ (cid:55)→ ( θ, Z i := G ◦ ζ i , for i = 0 ,
1. Let ζ (cid:48) and Z (cid:48) be the reverses of ζ and Z , respectively. See Figure 16 for an illustration.Figure 16: The boundary of half the cylinder is mapped to a closed loop with a nonzero windingnumber around the origin. Note that γ and γ are symmetric about the axis of the cylinder,and therefore Γ = Σ(Γ ) . Concatenating γ , ζ , γ (cid:48) , and ζ (cid:48) in this order, we obtain a closed loop (cid:96) in S , which isthe boundary of D , and its corresponding image L := G ( (cid:96) ) in the plane. By construction, (cid:96) bounds the topological disk [0 , π ] × [0 ,
1] in S . and L is a closed loop in R . We prove belowthat, if O / ∈ L , then L has a non-zero winding number around O . Given this property, weclaim that O must lie in Π = G ([0 , π ] × [0 , O / ∈ Π then Π is contained inthe punctured plane at the origin. Since L has a nonzero winding number around O , it ishomotopic, within Π, to a curve obtained by looping around the origin a nonzero numberof times. This curve is not homotopy-trivial—it is not homotopic to a point (within Π). On24he other hand, (cid:96) is clearly homotopy-trivial within D , and therefore L = G ( (cid:96) ) is homotopicto a single point within G ( D ) = Π, a contradiction that establishes the proposition. (cid:50) To complete the proof, we thus show:
Claim 4.4
In the notation of the above proof, if L misses O , then the winding number of L around O is non-zero. Proof.
Let arg( x, y ) be the clockwise angle that the vector ( x, y ) makes with the positive x -axis and let, for a section λ of L , ∆ λ be the integral of the change in arg λ ( t ) as t tracesout λ from start to finish.We will compute the winding number of L around the origin by breaking L into sections λ , computing the angle change ∆ λ for each section, and adding up the numbers.Let α := arg G (0 , ∈ (0 , π/ G ( π,
0) = π/ − α . Similarly,put β := arg G (0 , ∈ ( π, π/ G ( π,
1) = 5 π/ − β ∈ ( π, π/ Z ⊂ Q (so Z cannot wind around O ), ∆ Z = arg G ( π, − arg G (0 ,
0) = ( π/ − α ) − α = π/ − α and ∆ Z (cid:48) = − ∆ Z = 2 α − π/
2. Similarly, since Z ⊂ Q , ∆ Z = arg G ( π, − arg G (0 ,
1) =(5 π/ − β ) − β = 5 π/ − β .Γ connects G (0 ,
0) to G (0 , = arg G (0 , − arg G (0 ,
0) + 2 πk = β − α + 2 πk ,for some integer k , over which we have no control as we do not know how many times Γ winds around the origin (we use here the assumption that Γ avoids the origin). Becauseof Σ-symmetry, we must have ∆Γ = − ∆Γ and therefore ∆Γ (cid:48) = − ∆Γ = ∆Γ .To summarize, the total change of the angle around L is equal to∆Γ + ∆ Z + ∆Γ (cid:48) + ∆ Z (cid:48) = 2∆Γ + ∆ Z + ∆ Z (cid:48) = 2( β − α + 2 πk ) + (5 π/ − β ) + (2 α − π/ π (2 k + 1) . In particular, the total angle is not zero, no matter what the value of the integer k is,thereby completing the proof.The remainder of the argument, namely that Proposition 4.3 implies the theorem, andthe extension to the case of convex polytopes, is done exactly as in the first proof, therebycompleting this second proof of the theorem. (cid:50) In this section we study the case of translational motion. We show in Section 5.1 that purelytranslational motions of K through a rectangular window W are not more powerful thansliding, in the sense that if a translational motion exists then a sliding motion exists as well,with the same orientation as that of the translational motion. In Section 5.2 we considerthe case where the orientation of K is prescribed and we wish to find a sliding motionwhile maintaining the prescribed orientation. We also give a near-linear time algorithmfor planning a purely translational motion of K through an arbitrary flat (not necessarilyconvex) polygonal window with a constant number of edges.25 .1 Translational motion implies sliding We prove the following theorem, which is, in a sense, a strengthening of Lemma 2.1.
Theorem 5.1 If K can be moved through a rectangular window W by a purely translationalcollision-free motion in some fixed orientation Θ , then K can be moved through W , possiblyfrom some other starting position, by sliding while keeping the same orientation Θ . Proof.
Again, we first carry out the proof for the case where K is a smooth compactstrongly convex body in three dimensions, and then extend the proof to the case where K is a convex polytope. When K translates through W , its projection on the xz -plane isa fixed convex region that translates through the interval g on the x -axis, which is the x -projection of W . Recall that we denote the projection on the xz -plane by π . By the analysisin Section 3, there is a time t during the motion at which the tangents to π ( K ( t )) at theendpoints of g ∩ π ( K ( t )) become parallel, and form, when extended in the y -direction, a(possibly slanted) slab S that is orthogonal to the xz -plane, and that contains the placementof K at time t , so that the intersection of S with the xy -plane is a y -vertical strip of width atmost a , whose x -projection is contained in that of W . Applying the same argument to the yz -plane (swapping the x - and y -directions), we get another time t (cid:48) at which K is containedin another slab S (cid:48) , orthogonal to the yz -plane, whose intersection with the xy -plane is an x -horizontal strip of width at most b , whose y -projection is contained in that of W (seeFigure 17).Hence, the intersection τ = S ∩ S (cid:48) is a (slanted) prism, whose cross-section with the xy -plane is a rectangle contained in W . Moreover, as is easily verified, τ contains sometranslated copy K of K . Hence, K can slide through W from its placement K in theunbounded direction of τ .The case where K is a convex polytope can be handled by the same limiting argumentgiven in the proof of Theorem 3.1. (cid:50) We remark that, by Lemma 2.1, the above lemma also implies that K can also slidethrough W in the z -direction, from a different initial placement, possibly in a differentorientation.Theorem 5.1 together with Lemma 2.1 imply the following Corollary 5.2 If K can be moved through a rectangular window W by a purely translationalcollision-free motion, then K can be moved through W , possibly from some other (translatedand rotated) starting position, by sliding in the z -direction. This leads to an efficient algorithm, with running time O ( n / polylog( n )) (Section 2.4), forfinding a translational motion for K through W , if one exists, in the form of sliding in the z direction, possibly at a different orientation. If that algorithm notifies that no such slidingmotion exists, then it follows from Corollary 5.2 that there is no translational motion for K through W , at any orientation. 26igure 17: Some translated copy of K is contained within a slab S perpendicular to the xz -plane, and some other translated copy of K is contained in a slab S (cid:48) perpendicular to the yz -plane, so that the x -projection of the intersection of S with the xy -plane is contained in thatof W , and the y -projection of the intersection of S and the xy -plane is contained in that of W .We can thus translate K to a placement contained in the prism S ∩ S (cid:48) , from which K can slidethrough the intersection of S ∩ S (cid:48) and the xy -plane (the black rectangle, which is contained in W ). We now address a more restricted case where we are given a prescribed orientation Θ andwe wish to find a purely translational motion for K with this orientation. We denote thepolytope K at orientation Θ (ignoring translations) by K Θ .Notice that the algorithms of Section 2 are not immediately useful for answering theprescribed-orientation question. The algorithm of Section 2.3 gives us all the orientationsof K in which it can vertically slide through the window, while the algorithm of Section 2.4gives us some orientations with a valid vertical sliding. But in either case these do not nec-essarily include the desired orientation Θ, which may require sliding in a different direction.We designate an arbitrary vertex v of K Θ as a reference point. Since the existence ofa purely translational motion implies a sliding motion, we may require the output of theprescribed-orientation motion-planning algorithm to be a sliding motion, expressed as a line L in space such that K Θ slides through W while v moves along L , or an indication that notranslational motion for K Θ exists. Theorem 5.3
Given an orientation Θ , we can determine whether a translational motionfor K Θ through the rectangular W exists, and if so find a sliding line for K Θ through W in O ( n ) time. Proof.
Let π ( K Θ ) denote the orthogonal projection of K Θ onto the xz -plane. We compute π ( K Θ ) by traversing K Θ from the topmost vertex to the bottommost vertx, in O ( n ) time.As before, let g denote the projection of W onto the x -axis. The proof of Theorem 5.1(based on the analysis in Section 3) shows that if there is a translational motion for K Θ through W then there is a horizontal chord γ of π ( K Θ ) with endpoints p (cid:96) and p r such thatthe length of the chord is not greater than a (the length of g ) and such that there exist27angents to π ( K Θ ) at p (cid:96) and p r that are parallel. Such a chord, if exists, can be found in O ( n ) time, and it will give us the slab S of the proof of Theorem 5.1. By an analogousprocedure for the projection of K Θ onto the yz -plane, we obtain the slab S (cid:48) of the theorem.If one of the two chords does not exist, then we conclude that there is no translationalmotion for K Θ through W . Otherwise, we consider the intersection τ = S ∩ S (cid:48) , which is a(slanted) prism. We then place a copy of K Θ inside τ , and let L be the line through thereference vertex v that is parallel to the unbounded direction of τ . The theorem follows. (cid:50) Finally, we observe that, for an arbitrary polygonal window W with a constant numberof edges, we can find a translational motion for K Θ through W (or determine that no suchmotion exists) in O ( n log n ) time. More generally, we have: Theorem 5.4
Let W be an arbitrary (not necessarily convex) polygonal window with k edges, lying in the xy -plane. Given a prescribed orientation Θ of K , we can determinewhether a translational motion for K Θ through W exists, and, if so, find such a motion, in O ( nk log k log kn ) randomized expected time. Proof.
We triangulate the complement of W within the xy -plane into s = O ( k ) triangles A , . . . , A s with pairwise disjoint relative interiors. We then construct the three-dimensionalfree configuration space F for the translational motion of K Θ through W , using the tech-nique of Aronov and Sharir [3]. This technique asserts that the combinatorial complexityof F is O ( N k log k ), where N is the overall complexity of the individual Minkowski sums A i ⊕ ( − K Θ ), and that F can be constructed by a randomized algorithm in O ( N k log k log N )expected time. As the complexity of each Minkowski sum A i ⊕ ( − K Θ ) is O ( n ), with anabsolute constant of proportionality, we have N = O ( kn ), implying that the complexity of F is O ( nk log k ), and that F can be computed in O ( nk log k log nk ) expected time. Wenow take an arbitrary point p + (resp., p − ) in F that represents a configuration where K Θ is fully contained in the positive halfspace z > z < p + and p − lie in the same connected component of F . If indeed they liein the same connected component of F , we use the vertical decomposition of F constructedby the algorithm to extract a motion path for K through W within the same time bound. (cid:50) So far we have considered versions of the problem in which we were able to show that theexistence of an arbitrary collision-free motion of K through W implies that K can also slidethrough W (or, in one instance, through another window related to W ). However, perhapsnot very surprisingly, this is not the case in general. We show in this and the followingsection that in general rotations are needed to obtain a collision-free motion of the polytopethrough the window. Lemma 6.1
Let W be a square window with side length √ . Let A = (0 , , , B =(1 , , , C = (1 , , h ) , D = (0 , , h ) be four points, where h (cid:29) is a sufficiently largeparameter, and let K be the tetrahedron ABCD (see Figure 18). Then . K cannot pass through W by any purely translational collision-free motion (for suffi-ciently large h (cid:29) ).2. K can pass through W by a collision-free motion with only two degrees of freedom:translating in the z -direction combined with rotation around a z -vertical axis (for anyvalue of h > ). Figure 18:
The tetrahedron K = ABCD . Proof. (1)
Assume to the contrary that there exists a purely translational motion of K through W . By Theorem 5.1, there exists some placement K of K from which K can slidethrough W in the negative z -direction. Let π ( K ) denote the vertical projection of K ontothe xy -plane. By the theorem, π ( K ) can be rigidly placed inside W . Since we assume h tobe very large, it follows that, when transforming K to K , the z -vertical direction turns byonly a very small angle, for otherwise π ( K ) would be very long and would not fit into sucha square. More formally, for every ε > h such that for every h > h the angleby which the z -axis turns from K to K is at most ε . As ε decreases to zero, the lengthsof the projections of the segments AB, CD grow to √
10, which is their original length, andthe angle between them converges to some 0 < φ < π (the exact angle is the angle obtainedwhen the z -axis remains the same, which is then φ = 2 sin − √ ). Therefore, the projection π ( K ) is the convex hull of two segments of length sufficiently close to √
10, which is thediagonal of W , where the angle between them is sufficiently far from 0, π/
2. Hence π ( K )cannot be placed inside a square with side length √
5. This contradiction establishes thefirst part of the theorem. (2)
We move W instead of K , allowing it only to translate in the z -direction (so it alwaysremains horizontal), and simultaneously rotate around its center (so the motion of W hasonly two degrees of freedom). More concretely, the center of W moves up along the line x = 1 / y = 3 /
2. We parameterize the motion by a parameter c ∈ [0 , , W lies on the plane z = ch and its center is at (1 / , / , ch ). See Figure 19(left) for aschematic top view of K .Figure 19: Placing the cross section of K inside W . Left: A schematic top view of K . Right:The cross section of K at time c (green), and a copy of W that contains it. The cross section K c of K at time c is shown (in green) in Figure 19(right). It is aquadrilateral P QRS , with P = ( c, Q = (1 , − c )), R = (1 − c,
3) and S = (0 , c ).We place W around K c so that P R lies at the middle of one diagonal of W (so W keepsrotating to align with this rotating segment). It is clear that the motion of W is continuous,and it remains to show that K c always lies in (the placement at height ch , with the aligneddiagonals, of) W .It suffices to show that, at any time c during the motion, ∆ P RS is contained in theisosceles right triangle with hypotenuse
P R (this triangle is half of W , and the argumentfor the complementary half and for ∆ P QR is fully symmetric). For this, it suffices to showthat each of the angles (cid:94)
SP R , (cid:94) SRP is smaller than π/
4. Note that the edges of
P QRS have fixed slopes, namely 3 and −
3, as they are parallel to the xy -projections of AB and CD . This implies that tan (cid:94) SP Q = tan (cid:94)
SRQ = <
1, so (cid:94)
SP Q = (cid:94) SRQ < π/ K can move through W by (the dual version of) this motion, oftranslation in the z -direction combined with horizontal rotation. (cid:50) In this section we study the case where W is a circular window. There are (at least) threepossible types of motion of K through W : sliding, purely translational motion, and generalmotion with all six degrees of freedom. In this section we show that these types are notequivalent, as spelled out in the following theorem. Theorem 7.1
Let K be the regular tetrahedron of side length . Then there exist twothreshold parameters > δ ≈ . > δ ≈ . , so that, denoting by d thediameter of W , we have: (i) K can slide through W if d ≥ . ii) K cannot slide through W , but can pass through W by a purely translational motion,if δ ≤ d < . (iii) K cannot pass through W by a purely translational motion, but can pass through W by a general motion, if δ ≤ d < δ . (iv) K cannot pass through W at all if d < δ . Proof. K can slide through W if d ≥ . (i) In this case K can slide through W , because K can be enclosed in a cylinder of diameter 1, whose axis is orthogonal to two opposite edgesof K . No sliding of K is possible when d < . This claim follows by showing that anycircular cylinder that contains K must have diameter at least 1. The analysis below istaken from [18], and is given here for the sake of completeness.For any four vectors (cid:126)v , (cid:126)v , (cid:126)v , (cid:126)v the following identity holds:12 (cid:88) i =1 4 (cid:88) j =1 | (cid:126)v i − (cid:126)v j | = 3 (cid:88) i =1 | (cid:126)v i | − (cid:88) ≤ i 24 (0 , , , (cid:126)v = 1 √ 24 ( √ , , − ,(cid:126)v = 1 √ 24 ( −√ , √ , − , (cid:126)v = 1 √ 24 ( −√ , −√ , − . It is indeed a regular tetrahedron of side length 1: | (cid:126)v − (cid:126)v | = 124 (8 + 16) = 1 , | (cid:126)v − (cid:126)v | = 124 (2 + 6 + 16) = 1 , | (cid:126)v − (cid:126)v | = 124 (2 + 6 + 16) = 1 , | (cid:126)v − (cid:126)v | = 124 (18 + 6) = 1 , | (cid:126)v − (cid:126)v | = 124 (18 + 6) = 1 , | (cid:126)v − (cid:126)v | = 124 (24) = 1 . Represent vectors in our 3-dimensional space as 3 × (cid:88) i =1 (cid:126)v i (cid:126)v iT =124 + −√ 80 0 0 −√ ++ 124 −√ √ −√ 12 6 −√ √ −√ + √ √ √ 12 6 √ √ √ =3124 12 0 00 12 00 0 12 = 12 I . Therefore, for any unit vector (cid:126)n the following equation is satisfied: (cid:88) i =1 (cid:104) (cid:126)v i , (cid:126)n (cid:105) = (cid:88) i =1 | (cid:126)v iT (cid:126)n | = (cid:88) i =1 T r (cid:16) ( (cid:126)v i (cid:126)v iT ) · ( (cid:126)n(cid:126)n T ) (cid:17) = 12 T r ( (cid:126)n(cid:126)n T ) = 12 . Note that (cid:80) i =1 v i = 0, and hence: (cid:88) ≤ i 4, and put (cid:126)l ij = (cid:126)u i − (cid:126)u j . It is easy to see that | (cid:126)l ij | = | (cid:126)u i − (cid:126)u j | = (cid:104) (cid:126)n , (cid:126)u i − (cid:126)u j (cid:105) + (cid:104) (cid:126)n , (cid:126)u i − (cid:126)u j (cid:105) = (cid:104) (cid:126)n , (cid:126)v i − (cid:126)v j (cid:105) + (cid:104) (cid:126)n , (cid:126)v i − (cid:126)v j (cid:105) . We thus have (cid:80) ≤ i 1, but in our case the diameter of W isstrictly smaller than 1. We therefore conclude that K cannot slide through W . Purely translational motion through a circular window. We next show that apurely translational motion of K through a circular window exists if and only if d ≥ δ ≈ . K is fixed. We claim that K can move through W at this fixed orientation, by a purely translational motion, if and only if every horizontalcross section of K can be enclosed in a disc of diameter d ; that is, the smallest enclosingdisc of each cross section has diameter at most d . We refer to this property as the smalldiameter property . The ‘only if’ part of this claim is obvious. We briefly explain the ‘if’part. Let K ( z ) be the cross section of K at height h . For every x ∈ ∂K ( z ) let c x be ahorizontal circle of diameter d centered at x . That is, all the points within the plane of thecross section whose distance from x is at most d . Clearly, the intersection R ( z ) = (cid:84) x ∈ ∂K ( z ) c x denotes the set of all available positions for the center of W within that plane, such that it32ontains the cross section K ( z ). K ( z ) is a continuous function of z in the Hausdorff metricof sets, and hence so is R ( z ). This is easily seen to imply that we can choose the positionof the center of W for every cross section in a way that is continuous in z .Assume without loss of generality that the initial placement of K is with its lowest vertexat z = 0, and let h denote the z -coordinate of the highest vertex. As above, denote by K ( z )the cross section of K at height z , for z ∈ [0 , h ]. Assume without loss of generality that allfour vertices have distinct z -coordinates, and that the order of increasing z -coordinates ofthe vertices is A , B , C , D ; that is, z A < z B < z C < z D .We claim that the small diameter property holds if and only if it holds for K ( z B ) and K ( z C ). Indeed, observing that these two cross sections are triangles, assume without lossof generality that the radius ρ of the smallest enclosing disc D B of K ( z B ) is larger thanor equal to that of K ( z C ). Enclose K ( z C ) by some disc D C of radius ρ , and let E bethe convex hull of D B ∪ D C , which is a possibly slanted elliptic cylinder, each of whosehorizontal cross sections is a congruent copy of the disc D B . Since K has no vertices in theopen slab z B < z < z C , it follows that the portion of K within the closed slab z B ≤ z ≤ z C is the convex hull of K ( z B ) ∪ K ( z C ), and is therefore fully contained in E . Hence, for every z B < z < z C , K ( z ) is contained in a disc of radius ρ . The cases of the slabs z A < z < z B and z C < z < z D are argued in the same manner. This establishes our claim.In other words, we want to find orientations of K for which the (triangular) horizontalcross sections at the two middle vertices of K (in the z -direction) have smallest enclosingdiscs of diameters smaller than 1.Denote the cross section K ( z B ) through B by BU V , where U is the point AC ∩ K ( z B )and V is the point AD ∩ K ( z B ). Put x = | AU | and y = | AV | , so 0 ≤ x, y ≤ 1. Similarly,we write the triangular cross section K ( z C ) through C as CST , where S is the point AD ∩ K ( z C ) and T is the point BD ∩ K ( z C ), and put z = | SD | and w = | T D | , so again0 ≤ z, w ≤ 1. See Figure 20 for an illustration. Note that we must have x > y and w > z ,for otherwise A and D would not have been the two z -extreme vertices of K .The requirement that these two cross sections be parallel imposes the following relationsbetween x , y , z , and w . z = x − yx (3) w = x − yx (1 − y ) . Indeed, since the two cross sections are parallel, they intersect any plane (not parallelto them) at parallel lines. In particular, we have U V (cid:107) CS and T S (cid:107) BV , so the triangles AU V and ACS are similar, and so are the triangles DST and DV B . The first similarityimplies that x = AUAC = AVAS = yAS , so AS = y/x , and then z = AD − AS = 1 − AS = x − yx . The horizontal cross sections of a regular tetrahedron through its two middle vertices. The second similarity implies that w = DTDB = DSDV = z − y = x − yx (1 − y ) , thus establishing (3).Note that, once we enforce x > y , the second inequality w > z trivially holds.The goal is then to search for orientations of K and for suitable choices of x and y (and thus of z and w too) for which the two cross sections have smallest enclosing discs ofdiameters smaller than 1. This is done as follows.For a triangle ∆ of side lengths a, b, c , the circumradius r (∆) of ∆ is given by the formula r (∆) = abc · Area(∆) . The area can be expressed by Heron’s formula asArea(∆) = π ( π − a )( π − b )( π − c ) , where π = ( a + b + c ) / = 116 ( a + b + c )( b + c − a )( a + c − b )( a + b − c )= 116 (( a + b ) − c )( c − ( a − b ) )= 116 (2 a b + 2 a c + 2 b c − a − b − c ) . r (∆) = a b c a b + 2 a c + 2 b c − a − b − c . (4)Assume that the triangles BU V and CST are both acute, so their smallest enclosing discscoincide with their circumscribing discs. Apply this formula to each of the triangles BU V and CST . An easy application of the Law of Cosines yields | BU | = 1 − x + x | BV | = 1 − y + y | U V | = x − xy + y | CS | = 1 − z + z | CT | = 1 − w + w | ST | = z − zw + w . Substituting these values in (4), once with a = | BU | , b = | BV | , c = | U V | , and oncewith a = | CS | , b = | CT | , c = | ST | , we get the values of the circumradii of the twotriangles. If any of these triangles is obtuse, the radius of its smallest enclosing disc is halfthe longest edge.The goal is, as said above, to find values of the parameters x, y that minimize the largerof these two radii (note that the choice of x and y determines the orientation of K , up torotation about the z -axis, because they determine a slice of K (namely, BU V ) that has tobe horizontal). By numerically testing a dense grid of values for x, y and running methodsfor finding the minimum of a function (computing the radius of the smallest enclosing discusing (4) for acute triangles, and half the longest edge for obtuse triangles), the optimizingparameters turned out to be x ≈ . y ≈ . ≈ . δ to this value completes the argument. General motion of K . We now complete the proof of Theorem 7.1 by showing that K can move through W , by an arbitrary collision-free motion, if and only if d ≥ δ ≈ . δ ≤ d < δ , the only way to move K through W is via amotion that also involves rotations, and for diameters d < δ , no motion of K through W is possible.We first construct the desired motion for d ≥ δ , which consists of five steps—sliding,rotation, sliding, rotation, and a final sliding. We use the setup and notations introducedin the analysis of the preceding step in the proof, as depicted in Figure 20. As earlier, it ismore convenient to consider K as fixed, and W as moving around K .Assume that the lowest vertex A lies on the xy -plane and inside W (see Figure 21(i)).Start by sliding W up, possibly in a slanted direction, ensuring that it keeps containingthe cross section of K with the plane supporting W , until W comes to contain B ; seeFigure 21(ii). We want to choose the initial orientation of K so that the smallest enclosingdisc of the horizontal (triangular) cross section of K through B , namely the triangle BU V ,is of diameter at most d . As already noted, the orientation of K is determined by x and y ,up to a possible rotation around the z -axis, as they determine the vertical direction of K (the one orthogonal to the triangle BU V ). 35igure 21: Moving W around K . (i) The initial configuration. (ii) W contains the triangle BU V . (iii) W contains the rectangle U V V (cid:48) U (cid:48) . (iv) W contains the symmetric rectangle, withedge lengths swapped. The remainder of the motion is a fully symmetric reversal of the firsttwo steps. We ran our numerical approximation scheme, and the smallest diameter of the smallestenclosing disc of BU V that we obtained was 0 . x = y = 0 . δ . Note, incidentally, that this choice of parametersimplies that the edge CD of K is horizontal. It also implies that | U V | = x = y = 0 . W about the line U V , in the direction that keeps A and B on one sideof it. The cross section of K by the rotating plane is an isosceles trapezoid, and we keeprotating the plane until it becomes a rectangle U V V (cid:48) U (cid:48) . As is easily checked, we have | U U (cid:48) | = | V V (cid:48) | = 1 − x = 0 . U V V (cid:48) U (cid:48) , which is its diagonal, is ≈ . δ . An easy adaptationof an argument used earlier shows that, during this rotation of W about U V , every crosssection is contained in the corresponding rotated copy of the disc of diameter δ whosebounding circle passes through U and V . See Figure 21(iii).We then slide W in the direction perpendicular to U V V (cid:48) U (cid:48) . During this sliding the crosssection of K remains rectangular, so that U V keeps increasing and U U (cid:48) keeps decreasing,while the sum of their lengths remains 1. We stop when we reach a ‘symmetric’ rectanglewhere the side parallel to U V (resp., U U (cid:48) ) is of length 1 − x (resp., x ). See Figure 21(iv).The situation that we have reached is fully symmetric to the one after the first twosteps, and we can now complete the motion by a symmetric reversal of the first two steps. No motion is possible when d < δ . To complete the proof, for the case where d < δ ,we observe that in this case W cannot pass through any vertex of K , because then, bydefinition of δ , the smallest enclosing disc of any cross section through any vertex wouldhave diameter larger than d . (cid:50) Finally we deal with the general case, in which the motion of K has all six degrees of freedom.By standard (and general) arguments in algorithmic motion planning the free configuration36pace for this problem has complexity O ( n ), and it can be computed in O ( n ε ) time [14],from which we can easily extract a solution path, when one exists, within the same timebound. We show here that we can exploit the special structure of the problem at hand tofind a solution, or detect and notify that none exists, in time close to O ( n ). We sketchbelow the main ideas; and then provide the full details.If there is a solution path for K to move through W with all six degrees of freedom,then there is also a canonical solution path where at all times at which K intersects theplane of W (namely the xy -plane), K touches the bottom and left edges of W with twoedges e b and e (cid:96) (possibly with the closure of these edges, namely with vertices of K , andpossibly with more than one edge touching a side of W ). During this motion, for everypoint on the path define e t to be the edge of K whose intersection with the xy -plane hasthe largest y -coordinate, and e r to be the edge of K whose intersection with the xy -planehas the largest x -coordinate.We now split the canonical solution path into maximal open segments, along which theopen edges e b , e (cid:96) , e t , and e r are fixed. We construct a collection of four-dimensional sub-spaces of the full-dimensional configuration space, one for each such quadruple e b , e (cid:96) , e t , e r of four edges, consisting of those free placements that have those four edges as the extremeedges in the x - and y -directions within the xy -plane. This can be done in total O ( n ) timesince each of these subspaces has constant descriptive complexity.The major remaining problem is to efficiently detect the free connections among these O ( n ) subspaces. The efficiency of our approach relies on the following lemma, which assertsthat the total number of certain quintuplets of edges of K that encode these connections isonly O ( n ), rather than O ( n ), and that they can be computed efficiently: Lemma 8.1 The maximum number of quintuplets ( e r , e t , e (cid:96) , e b , e ξ ) , where e r , e t , e (cid:96) , e b areas defined above, and e ξ is another edge of K whose intersection with the xy -plane h xy hasthe same x - (respectively, y -) coordinate as the intersection with h xy of e (cid:96) or e r (respectively, e b or e t ), is O ( n ) . All these quintuplets can be computed in O ( n λ q ( n ) log n ) time , forsome small constant q . This in turn leads to the following summary result. Theorem 8.2 Given a convex polytope K with n edges and a rectangular window W , wecan construct a collision-free motion of K through W , if one exists, or determine that nosuch motion exists, in time O ( n λ q ( n ) log n ) , for some small constant q . The algorithmrequires O ( n ) storage. We now provide the full proofs and the algorithm. If there is a solution path for K to move through W , then there is also a canonical solutionpath π where at all times at which K intersects the plane of W (namely the xy -plane), K touches the bottom and left edges of W with two edges e b and e (cid:96) (possibly with the closure λ q ( n ) is a near-linear function related to Davenport-Schinzel sequences [27]. 37f these edges, namely with vertices of K —we discuss this issue in detail below). Duringthis motion, for every point on the path define e t to be the edge of K whose intersectionwith the xy -plane has the largest y -coordinate and e r to be the edge of K whose intersectionwith the xy -plane has the largest x -coordinate. In what follows we denote the xy -plane as h xy . See Figure 22 for an illustration. Notice that the notation of the bottom (or top) edgeof W is with respect to the y -coordinate. e (cid:96) e t e b e r W Figure 22: A cross section of K in W during a canonical motion. We now split the canonical solution path into maximal open segments, whose union wedenote by π Q , along which the open edges e b , e (cid:96) , e t , and e r are fixed, and these edges areunique, namely we exclude path points where two edges of K simultaneously touch oneedge of W , or simultaneously attain the largest x - or y -coordinate of the intersection with h xy . In-between those segments of π there are points (or segments) along the path, wherea vertex of K touches the left edge or the bottom edge of W , or a vertex of K that lies in h xy has the largest y -coordinate or x -coordinate within this cross-section, or a face of K touches the left edge or the bottom edge of W , or the maximum in y or x of the intersectionof K with h xy is attained along a segment, which is the intersection of a face of K with h xy .The maximal connected segments of π Q , each falls into one of (cid:0) n (cid:1) categories accordingto the choice of the four edges e b , e (cid:96) , e t , and e r .The efficient planning scheme is as follows. Our problem induces a six-dimensional con-figuration space (C-space for short) for the motion of K . However, for efficiency, we willfirst construct a collection of four-dimensional sub-spaces of the full-dimensional configura-tion space—each of them will be represented explicitly, and together they will contain thepath segments in π Q (so that each path segment is contained in one of these subspaces).Then we will add connections between these four-dimensional C-spaces that will cover themotion along π \ π Q . We will then construct a discretization of the free space, called the connectivity graph [15], which will capture the connectivity of the free space in which π lies,and will enable planning canonical motions for K through W . For each pair e (cid:96) , e b of edges of K , let C ( e (cid:96) , e b ) denote the four-dimensional configuration(sub-)space of our full six-dimensional C-space, consisting of those placements of K at which(i) e (cid:96) and e b intersect the xy -plane h xy , (ii) e (cid:96) ∩ h xy lies on the left edge of W (a portion ofthe y -axis) and is the leftmost point of K ∩ h xy , and (iii) e b ∩ h xy lies on the bottom edgeof W (a portion of the x -axis) and is the bottommost point of K ∩ h xy . (Top and bottom38re with respect to the y -direction.) Note that C ( e (cid:96) , e b ) is indeed four-dimensional.For each additional pair e r , e t of edges of K , let C e r ,e t ( e (cid:96) , e b ) denote the portion of C ( e (cid:96) , e b ) in which (in addition to (i)–(iii)), we have (iv) e r and e t intersect h xy , (v) e r ∩ h xy is the rightmost point of K ∩ h xy , and (vi) e t ∩ h xy is the topmost point of K ∩ h xy . SeeFigure 22. Properties (i)–(vi) ensure that the C-space C e r ,e t ( e (cid:96) , e b ) has constant complexity;see Lemma 8.3 below.Note that not all configurations in C e r ,e t ( e (cid:96) , e b ) are necessarily free, as this space maycontain configurations in which the intersection of K with h xy is not contained in W (because e r ∩ h xy or e t ∩ h xy lies outside W ). We denote by F e r ,e t ( e (cid:96) , e b ) the portion of C e r ,e t ( e (cid:96) , e b ) thatrepresents free (or valid ) configurations, namely configurations in which the intersection of K with h xy is fully within the closure of the rectangle W . (As just discussed, this will bethe case if and only if both e r ∩ h xy and e t ∩ h xy lie inside W .) We call F e r ,e t ( e (cid:96) , e b ) the freespace of C e r ,e t ( e (cid:96) , e b ). Lemma 8.3 The combinatorial complexity of the free space F e r ,e t ( e (cid:96) , e b ) is bounded by aconstant (independent of the complexity of K ). Proof. Consider a fixed quadruplet q = { e r , e t , e (cid:96) , e b } of edges of K . Let Φ q be the set ofat most eight facets of K that are incident to the edges in q . For each such facet, say afacet g incident to e r , we sweep a line parallel to e r on g away from e r till it touches anothervertex of g , where its intersection with g is the line segment (or a point) s . Let g (cid:48) be thetrapezoid (or triangle) contained in g and comprising the area swept by the line between e r and s . Let Φ (cid:48) q be the collection of these eight trapezoids. Let K q be the convex hull of thetrapezoids in Φ (cid:48) q . We claim that F e r ,e t ( e (cid:96) , e b ) for K and for K q are identical. Indeed, weonly need to show that if, at some placement, K q ∩ h xy ⊂ W then K ∩ h xy is also containedin W . Since K q ∩ h xy ⊂ W , the two edges of K q incident to e (cid:96) ∩ h xy (resp., to e b ∩ h xy , e r ∩ h xy , e t ∩ h xy ) define a wedge that contains K q ∩ h xy and lies fully to the right of e (cid:96) (resp.,above e b , to the left of e r , below e t ). The intersection of these wedges is therefore containedin W . But this intersection also contains K ∩ h xy , which implies our claim. Since each of K q and W has constant descriptive complexity, then by standard arguments in algorithmicmotion planning, the complexity of F e r ,e t ( e (cid:96) , e b ) for K q is bounded by a constant. Hencethe complexity of F e r ,e t ( e (cid:96) , e b ) for K is also bounded by a constant, as asserted. (cid:50) By the same arguments as in the proof of Lemma 8.3, the decomposition of the C-space C e r ,e t ( e (cid:96) , e b ) into free and forbidden cells is induced by a constant number of surfacepatches, each of constant descriptive complexity [14]. Being of constant complexity, we canuse standard tools, such as vertical decomposition [14] or the Collins decomposition [26]to construct the arrangement of surfaces defining C e r ,e t ( e (cid:96) , e b ) in time O (1). It is easy todetect and maintain only the free portion F e r ,e t ( e (cid:96) , e b ) of this arrangement, in O (1) time aswell.We thus obtain O ( n ) constant-size arrangements. It remains to connect between theboundaries of their free cells.Let F be the collection of these four-dimensional free spaces, for all quadruplets ( e (cid:96) , e b , e r , e t )of edges of K that can simultaneously be intersected by a plane.We wish to use F to plan a valid motion for K from a configuration where K is fullyabove the window (contained in the halfspace z > 0) to a configuration in which it is fully39elow the window (contained in the halfspace z < K intersects h xy for the first (resp. last) time to the sequel, and focusfirst on transitions between free spaces where there is a three-dimensional volume of K bothbelow and above h xy .Our description here assumes general position . For example we preclude polytopes K that have two coplanar, or two parallel facets, or polytopes for which four vertices not allincident to the same face lie on a single plane, and so on. We do allow the polytope K tobe non-simple, namely have many edges incident to a vertex, and non-simplicial, namelyhave many edges and vertices on the boundary of a facet.The free space F e r ,e t ( e (cid:96) , e b ) may comprise several connected four-dimensional cells. Weapply the Collins decomposition [26] to these cells and construct a connectivity graph G ,whose nodes represent cells of the decomposition over all free spaces in F , and two nodes areconnected by an arc in G if the corresponding cells belong to the Collins decomposition ofthe same space F e r ,e t ( e (cid:96) , e b ) and share an artificial boundary added by the decomposition (sothey are both part of the same connected component of F ). This process creates a (large)number of (at most O ( n )) connected components of G , which we still need to connect.The next subsection is devoted to making these connections. Thus we turn to describing the provision in our data structure for the portions of the path π that are not contained in the interior of the free spaces F , namely the path portions π \ π Q .Recall that these portions comprise configurations where one of the following situationsoccurs. Case (a) Exactly one vertex of K lies in h xy , and it is extreme in either the x - or the y -direction. Case (b) Two or three vertices of K lie in h xy , and each one of them is extreme in eitherthe x - or the y -direction. Case (c) Exactly one facet of K that intersects h xy is parallel to the x - or to the y -axis,and no vertex of K lies in h xy . Case (d) Either exactly one facet of K that intersects h xy is parallel to the x - or the y -axisand one or more vertices of K lie in h xy , or two facets intersect h xy , one parallel tothe x -axis and one parallel to the y -axis; some vertices of K may also appear on h xy and replace some of the four extreme edges.We next consider such configurations of π \ π Q in relation to the boundary of free cells in F . Notice that Cases (a) and (c) correspond to three-dimensional surface patches boundingthe four-dimensional cells in F . The two other cases, (b) and (d), correspond to lower-dimensional boundaries of these three-dimensional patches. Cases where only connectionsof types (b) or (d) are possible are degenerate and we ignore them. We focus on Cases (a)and (c).The free space F e r ,e t ( e (cid:96) , e b ) is bounded by three-dimensional surface patches of thefollowing types, based on the type of the configurations that they comprise.40 ype (i) K is placed such that an endpoint of one of the four edges e (cid:96) , e b , e r , e t is in h xy .This type corresponds to configurations of Case (a) above. Type (ii) A facet of K incident to e (cid:96) touches the left edge of W (namely they overlap in asegment rather than a single point) or a facet of K incident to e b touches the bottomedge of W . This type corresponds to configurations of Case (c) above. Type (iii) A facet of K incident to e r becomes parallel to the right edge of W or a facet of K incident to e t becomes parallel to the top edge of W (while lying inside W ). Thistype also corresponds to configurations of Case (c) above. Type (iv) The intersection of e r with h xy lies on the right edge of W or the intersectionof e t with h xy lies on the top edge of W . This type is special in that it inducesa constraint in the standard sense of the study of motion planning: it is a three-dimensional surface patch such that on one side (locally, ignoring other K - W contacts)it has valid configurations and on the other side it has forbidden configurations sincefor example e r penetrates (beyond) the frame of the window W .Surface patches of Types (i) through (iii) induce connections between free four-dimensionalcells (cells that are already recorded as nodes in our connectivity graph G ), and will giverise to new nodes and arcs in G . Type (iv) surface patches bound free four-dimensionalcells but they are impassable, and hence they will not introduce new features in G .Given a pair of edge quadruplets e (cid:96) , e b , e r , e t and e (cid:96) , e b , e r , e t , if their respective 4D freeC-spaces, F = F e r ,e t ( e (cid:96) , e b ) and F = F e r ,e t ( e (cid:96) , e b ) are candidates to be neighbors in thefree space, then we need to determine the overlap of their respective boundaries. Since eachof F and F has constant complexity, this operation as well takes constant time. The maingoal of the remainder of this section is to show that the overall number of pairs ( F , F ) thatneed to bo considered, out of the potential O ( n ) such pairs, is only O ( n ). Furthermore,we will show that we can find all these neighboring pairs in near-quartic time. We start withType (ii) surfaces since (a) they are simpler to handle, and (b) we will use the analysis ofthis case as part of the analysis of Type (i) surfaces. The arguments for Type (iii) surfacesare analogous to those for Type (ii) surfaces. As mentioned above Type (iv) surfaces induceno connections.We also add new nodes and arcs to the connectivity graph for boundary surfaces thatconnect between cells in F and configurations where K is fully contained in z > z < 0. These will be needed to complete the motion path in its two endpoints. SeeSection 8.4 for more details. We demonstrate these connections for the facet f of K incident to e b and to e b (cid:48) , where e b (cid:48) is the other edge of f that touches the bottom edge of W at this critical event during themotion of K . The other Type (ii) surfaces, where a facet of K touches the left edge of W ,can be handled similarly.We connect the nodes in G representing the boundary of the four-dimensional cell τ ∈ F e r ,e t ( e (cid:96) , e b ) to the nodes representing the boundary of the four-dimensional cell41 ∈ F e r ,e t ( e (cid:96) , e b (cid:48) ). On the face of it, it may seem that over all of F this could lead to O ( n ) connections. However, we show next that there are at most O ( n ) such connections. Lemma 8.1 The maximum number of quintuplets ( e r , e t , e (cid:96) , e b , e ξ ) , where e r , e t , e (cid:96) , e b areas defined above, and e ξ is another edge of K whose intersection with the xy -plane h xy hasthe same x - (respectively, y -) coordinate as the intersection with h xy of e (cid:96) or e r (respectively, e b or e t ), is O ( n ) . All these quintuplets can be computed in O ( n λ q ( n ) log n ) time for somesmall constant q . Proof. We prove the lemma for the quintuplets of the form ( e r , e t , e (cid:96) , e b , e b (cid:48) ), where e b (cid:48) touches, together with e b , the bottom edge of W (in particular e b and e b (cid:48) lie on the boundaryof a common face of K ). The proof for the other types is analogous. Let f be a facet of K and let e b be an edge of f . We place K so that (i) both f and e b intersect h xy , (ii) e b ∩ h xy is the origin, and (iii) the segment f xy := f ∩ h xy lies on the positive x -axis (and its leftendpoint is at the origin). Then K has three degrees of freedom of motion: the dihedralangle between the plane h f that contains f and h xy , and two degrees of rotating f aboutthe origin and of sliding f with e b touching the origin. We denote this configuration spaceby C x ( f ; e b ). Notice that this is an artificial C-space, which is not a subspace of any ofour C-spaces; we only use it here to bound the number of (and later on to find the) validcombinations of edges for which a configuration of Type (ii) is possible.We decompose C x ( f ; e b ) by O ( n ) surfaces, one surface for each vertex of K , and twosurfaces for each face of K other than f . An edge of the quintuplet changes in one of thefollowing cases:(i) A vertex of K passes from one side of h xy to the other. To account for this change,for each vertex v of K (including the vertices of f that are not incident to e b ) we add asurface within C x ( f ) comprising all the configurations in which v lies on h xy . Notice thatwe account here for more changes than are necessary, as sometimes the vertex that crosses h xy is not extreme in the x - nor in the y -direction. However, this excess consideration hasno effect on the asymptotic upper bound that we derive here.(ii) A face g of K incident to the edge e t becomes parallel to the x -axis. Immediately afterthis occurrence, another edge on the boundary of g may become the new e t . To accountfor such changes, we consider the line L f,g of intersection between the planes supporting f and g . By the general position assumption this line is well defined. We now add a surfacefor all the configurations in which L f,g is parallel to x -axis. We add such a surface for eachface of K other than f .(iii) Similar to the change described in (ii), e (cid:96) or e r may change when a face incident to thembecomes parallel to the y -axis. To account for these changes we add a surface comprising ofconfigurations where f and g contain a pair of orthogonal lines that lie both on h xy . Again,we generate one surface for each face of K other than f .An important property of these surfaces is that they are patches of algebraic surfacesof constant description complexity. This follows from the fact that the left endpoint of f xy always lies on the fixed edge e b . Hence, these surfaces decompose C x ( f ; e b ) into O ( n ) cells,where in each cell the three edges of K whose intersection with h xy determine the leftmost,rightmost, and topmost vertices of the intersection of K with h xy , as well as the two edges of42 on the boundary of f that touch the x -axis (the left of which is e b ), are all fixed. Hence,the number of pairs of adjacent cells is also O ( n ). We repeat this argument for each pair( f ; e b ) of a facet f of K and the incident edge e b , note that the number of these pairs is O ( n ) (this number is just twice the number of edges of K ), and conclude that we have atotal of O ( n ) quintuplets, where each quintuplet, say ( e r , e t , e (cid:96) , e b , e b (cid:48) ), translates into apair of neighboring four-dimensional spaces F e r ,e t ( e (cid:96) , e b ) and F e r ,e t ( e (cid:96) , e (cid:48) b ) (both abutting onthe same Type (ii) surface).The argument for quintuplets where the fifth edge e ξ = e t (cid:48) and e t , e t (cid:48) are such that theirintersection with h xy simultaneously attain the largest y -coordinate among all edges of K issimilar. Up till now, we took a solution path for K through W and turned it into a canonicalpath π , where at all times K touches the bottom and left edges of W . Let us now consideranother canonical path π (cid:48) , where at all times K touches the top and left edges of W . Thequadruplets along the paths remain the same quadruplets. We only worry about whichpairs of quadruplets are such that their subspaces need to be connected to one another.The arguments about the current type of quintuplets are analogous to those handled above,where e ξ = e b (cid:48) , and the same bound can be derived. Analogous arguments apply when thefifth edge e ξ = e r (cid:48) and e r , e r (cid:48) are such that their intersection with h xy simultaneously attainthe largest x -coordinate among all edges of K .As for the computation of these quintuplets, we construct the three-dimensional arrange-ment, as described in the proof above, for every pair ( f ; e b ) of a facet and an incident edgeof K , from which we obtain the quintuplets. It takes O ( n λ q ( n ) log n ) per such facet-edgepair [4], where q is a constant parameter that is determined by these surfaces, for total time O ( n λ q ( n ) log n ). (cid:50) To facilitate these connections, we introduce additional four-dimensional subspaces, whichrepresent placements of K at which a vertex of K lies on h xy . Specifically, we demonstratethese connections when an endpoint p of e (cid:96) (namely p is a vertex of K ) lies in h xy . Allother Type (i) surfaces can be handled similarly.Let E p denote the set of edges of K incident to p . Our goal here is to make the rightconnections between the free spaces of the quadruplets { ( e, e b , e r , e t ) | e ∈ E p } . We cannotafford to make connections between all possible pairs of edges of E p , as this might increasethe overall number of connections to be O ( n ) (which will be the case when the vertices p have large degree). Therefore we apply an infinitesimal transformation to K , which willallow us to use the analysis of Section 8.3.1 and apply it to this case.We truncate K into the still convex polytope K ε , for arbitrarily small ε > 0, as follows.We take a plane Ω p supporting K at p (but not parallel to any facet of K ), and move itparallel to itself, by distance ε , into K , such that p is on one side of the shifted Ω p and allthe other vertices of K are on the other side. The intersection of K and Ω p is a tiny convexpolygon, which we denote by ω p , with a vertex for each edge of E p . We represent each edge e of ω p by the face of K whose intersection with Ω p is e . (The choice of the orientation ofΩ p is arbitrary, but it will have an artificial, non-essential effect on the concrete connectionsaround p that we will construct.) See Figure 23 for an illustration.We repeat this process for every vertex of K , thereby obtaining K ε , which formally is43 p ef Figure 23: The polygon ω p . the intersection of K with all the halfspaces bounded by the shifted planes Ω p and notcontaining the respective vertices p Notice that the polytope K ε has O ( n ) edges, which weclassify either as real edges , if they are truncated versions of the edges of K , or as virtualedges , if they are edges of the tiny new facets ω p . Let F ε denote the collection of the four-dimensional free C-spaces F e r ,e t ( e (cid:96) , e b ) for K ε . Each quadruplet ( e r , e t , e (cid:96) , e b ) of edges of K ε may involve any combination of real and virtual edges, as long as there exists a plane thatmeets all four edges.We apply Lemma 8.1 to K ε , to ascertain that there are only O ( n ) possible pairs of edgequadruplets for K ε that encode connections between pairs of subspaces in F ε . As before,we focus for concreteness on quintuplets ( e r , e t , e (cid:96) , e b , e b (cid:48) ) that encode connections in which e b is replaced by e b (cid:48) . The new situations that we need to consider are when one or bothedges e b , e b (cid:48) belong to a virtual facet ω p , for some vertex p of K .Note that while F e r ,e t ( e (cid:96) , e b ) is four-dimensional for K ε , it may shrink to a lower-dimensional space for K itself, as we let ε tend to zero, when some of these four edgesare virtual.We claim that if K ε has a valid path π ε through W for every ε > 0, then K has a similarvalid path π , which is a limit path of the set { π ε } ε> , in (a suitably defined compact subspaceof) the space of paths in the configuration space of K , equipped with the Hausdorff metric.By passing to a subsequence if needed, we may assume that the sequence of quadruplets ofedges of K ε that is assigned to π ε is fixed as ε converges to 0. Denote this sequence as σ .For each quadruplet ( e r , e t , e (cid:96) , e b ) in σ , some of its edges are real edges of K , and some arevirtual edges of the polygons ω p . Assume first that just one of these edges, say e b , is virtual,bounding some virtual facet ω p , for some vertex p of K . In the limit, as ε → 0, the freefour-dimensional space F e r ,e t ( e (cid:96) , e b ) becomes three-dimensional, and consists of placementsof K at which p lies on the bottom edge of W . Similarly, the space becomes two-dimensional(resp., one-dimensional, zero-dimensional) when the number of virtual edges is two (resp.,three, four).Our strategy is as follows. We use symbolic computation, taking ε to be infinitesimal(see, e.g., [30]). We construct the closures of the virtual subspaces F e r ,e t ( e (cid:96) , e b ) (namelythose for which at least one edge is virtual) and their Collins decompositions in constanttime per subspace, for a total cost of O ( n ). The resulting subcells of the decompositions areadded as new vertices of our connectivity graph. We then compute all the O ( n ) connectingquintuplets, such as ( e r , e t , e (cid:96) , e b , e b (cid:48) ), as provided by Lemma 8.1, in O ( n λ q ( n ) log n ) time,44ocusing only on quintuplets where at least one of the edges is virtual. For each suchquintuplet we determine, in constant time, whether there is a free connection between F e r ,e t ( e (cid:96) , e b ) and F e r ,e t ( e (cid:96) , e b (cid:48) ), and if so add the corresponding edge to the connectivitygraph.All these computations are performed symbolically (on ε ). If we think of ε as infinites-imal but still nonzero then the machinery developed here is not significantly different fromthat developed in Section 8.3.1. Nevertheless, the connections formed by this procedurecan also be given concise geometric interpretation in terms of the limit (original) polytope K . For example, assume that e b is a real edge with endpoint p and e b (cid:48) is a virtual edge of ω p . Connecting F e r ,e t ( e (cid:96) , e b ) and F e r ,e t ( e (cid:96) , e b (cid:48) ) means that K moves with e b touching thebottom edge of W until the contact point reaches p . We then switch to placements at whichthe virtual edge e b (cid:48) contacts the bottom edge of W . The meaning of this latter scenario isthat p touches the bottom edge of W , and its two incident edges that bound the incidentface corresponding to e b (cid:48) (one of which is e b ) are such that one of them lies in the positivehalfspace z > z < F e r ,e t ( e (cid:96) , e b ) and F e r ,e t ( e (cid:96) , e b (cid:48) ), where both e b and e b (cid:48) arevirtual edges of the same virtual facet ω p means that K is positioned so that ω p overlaps the x -axis. (Such placements depend on the artificial choice of the orientation of the supportingplane Ω p at p .) The fact that e b and e b (cid:48) are the edges of ω p that touch the x -axis simplymeans that the pencil of edges incident to p is split into two contiguous subsequences,where the edges in one subsequence lie in the positive halfspace z > z < 0, and the split occurs at the real facetsof K adjacent to (and representing) e b and e b (cid:48) .Omitting further details about these virtual free subspaces, we obtain the desired con-nectivity graph G , and can then use it to plan a collision-free motion of K through W in astandard fashion. Typically, the path in G will have subpaths that start at a real subspace F in , continue along a sequence of virtual subspaces, and end at another real subspace F out .This means that the motion reaches a placement at which p lies on the, say, bottom edgeof W , and then K rotates around p (with p possibly sliding along the x -axis), switchingbetween virtual edges of ω p in the manner explained above, until p leaves the x -axis andanother edge incident to p starts touching the axis. In the notations introduced earlier, theportions of the path π that traverse real free subspaces comprise π Q and those that traversevirtual free subspaces comprise π \ π Q . The connections are similar to those for Type (ii). The number of such connectionsamong all decomposition cells in F can be bounded by O ( n ) (and can be computed in O ( n λ q ( n ) log n ) time), arguing as in the analysis of Type (ii) connections. We construct the closure of F e r ,e t ( e (cid:96) , e b ) and its Collins decomposition in constant time. Thisdecomposition induces a subgraph of G , with a node for each cell in the decomposition andarcs connecting nodes that represent cells of the decomposition that are adjacent through45n artificial wall added by the decomposition. This subgraph has constant complexity andeach cell contains the full list of constraints (polynomials) defining it. Notice that thisdecomposition contains lower-dimensional cells as well.We store these subgraphs at an n × n × n × n matrix M , indexed by quadruplets ofedges of K . (It is n for the number of original edges of K , by definition, but will increaseto cn , for some constant c , for K ε .)When we check for a possible connection (out of the O ( n ) possible connections com-puted by the preceding algorithms) between, say, the free space F e r ,e t ( e (cid:96) , e b ) and the freespace F e r ,e t ( e (cid:96) , e (cid:48) b ), we consider the two relevant entries in M , and apply a constant-timeprocedure to find all the overlapping elements (namely, cells in the Collins decomposition ofthe free space) of the boundaries of both free spaces. We connect the corresponding nodesin the two graphs, one for each of the free spaces, by adding an edge to G .We also add two special nodes to the connectivity graph G : v above and v below , whichrepresent the free space where K is strictly above (respectively below) the xy -plane. Weconnect v above to every node in G representing (free) configurations in which K is fullycontained in the closed half-space z ≥ 0: We traverse the Collins decomposition cells of theboundaries of the closure of all the free spaces F and exhaustively look for cells that containconfigurations of this type. If we find such a configuration c inside a cell η , we mark theedge e in the connectivity graph between the node of η and v above with the configuration c —it means that motion along e is a simple rigid collision-free motion that will bring K from an arbitrary placement in z > c . Similarly, we connect v below to every node in G representing configurations in which K is fully contained in the closedhalf-space z ≤ G between v above and v below . If such a path in G existsit can be easily transformed into a path π that will take K through the window. If such apath in G does not exist, we can safely notify that K cannot pass through W by any rigidmotion.Adding all the connections between the four-dimensional free spaces F e r ,e t ( e (cid:96) , e b ) takes O ( n ) time. This is subsumed by the time required to compute all the quintuplets as inLemma 8.1. In summary, we have: Theorem 8.2 Given a convex polytope K with n edges and a rectangular window W , wecan find a collision-free righd motion of K through W , with all six degrees of freedom, ordetermine that no such path exists, in time O ( n λ q ( n ) log n ) , for some small constant q .The algorithm requires O ( n ) storage. In this paper we have studied a variety of problems concerning collision-free motion of aconvex polytope through a planar window, under several kinds of allowed motion — sliding(translating in a fixed direction), purely translational motion, and general motion. We havepresented several structural properties and characterizations of such motions, and obtainedefficient algorithms for several special cases, as well as for the general case.There are several open problems and directions for further research. One such direction46s to show that the near-quartic upper bound, established in Section 8, on the cost of thegeneral motion planning problem for K and a rectangular window W is almost tight inthe worst case, in the specific sense of establishing a lower bound Ω( n ) on the worst-casecomplexity of the resulting free configuration space, a property that we conjecture to hold,and have in fact an initial plan for establishing this bound.In addition, in Section 6, we presented an example in which a rotation is needed topass a polytope through a rectangular window. However, in this construction we only usedrotation about the line perpendicular to the plane that contains the window. This suggeststhe conjecture that every convex polytope that can pass through a rectangular window W can also pass through W by a motion consisting of arbitrary translations and rotations onlyabout the line perpendicular to the plane of W . The results of Section 7 show that forcircular windows this claim is false in general, but the status of the conjecture is still openfor a rectangular window.It is also not clear what can be said about the motion of a general non-convex polytopethrough a rectangular, general convex, or even non-convex window. There are severalvariants of this question, depending on the type of motion that we allow, both in terms ofstructural properties of the motion, and of the efficiency of algorithms for performing it. Acknowledgements. We deeply thank Pankaj Agarwal and Boris Aronov for useful in-teractions concerning this work. In particular, Boris has suggested an alternative proof ofthe key topological property in the analysis in Section 4, and Pankaj has been instrumentalin discussions concerning the range searching problem in Section 2. We are also grateful toLior Hadassi for interaction involving the topological property presented in Section 4, andto Eytan Tirosh for help with the alternative proof of Lemma 2.1. References [1] P. K. Agarwal, Simplex range searching, in Journey Through Discrete Mathematics (M.Loebl, J. Neˇsetˇril and R. Thomas, eds.), Springer, Heidelberg 2017, pp. 1–30.[2] P. K. Agarwal and J. Erickson, Geometric range searching and its relatives, in Advancesin Discrete and Computational Geometry, Contemp. Math. 223 (B. Chazelle, J. E. Good-man, and R. Pollack, eds.), AMS Press, Providence, RI, 1999, pp. 1–56.[3] B. Aronov and M. Sharir, On translational motion planning of a convex polyhedron in3-space, SIAM J. Comput. 26 (1997), 1785–1803.[4] M. de Berg, L. J. Guibas and D. Halperin, Vertical decompositions for triangles in3-space, Discrete Comput. Geom. (2017),61–66.[6] B. Chazelle, H. Edelsbrunner, L. J. Guibas and M. Sharir, A singly exponential stratifi-cation scheme for real semi-algebraic varieties and its applications, Theor. Comput. Sci. Principles of Robot Motion: Theory, Algorithms, and Implementation, MITPress, 2005.[8] H. T. Croft, K. J. Falconer and R. K. Guy, Unsolved Problems in Geometry , ProblemBooks in Mathematics, Springer Verlag, Heidelberg, 1991.[9] H. E. Debrunner and P. Mani-Levitska, Can you cover your shadows? Discrete Comput.Geom. CGAL Arrangements and their Applications - AStep-by-Step Guide, Geometry and Computing, 7, Springer, 2012.[11] P. Gibbs, A computational study of sofas and cars, Computer Science Algorithmica Handbook of Discreteand Computational Geometry, Chapman & Hall/CRC, 3rd edition, 2018, 1343–1376.[14] D. Halperin and M. Sharir, Arrangements, Chapter 28 in Handbook of Discrete andComputational Geometry, Chapman & Hall/CRC, 3rd edition, 2018, 723–762.[15] D. Halperin, O. Salzman and M. Sharir, Algorithmic Motion Planning, Chapter 50 in Handbook of Discrete and Computational Geometry, Chapman & Hall/CRC, 3rd edition,2018, 1311–1342.[16] A. Hatcher, Algebraic Topology , Cambridge University Press, Cambridge, 2002, pages61–62.[17] https://en.wikipedia.org/wiki/Covering space [18] https://math.stackexchange.com/questions/1364880/smallest-cylinder-into-which-a-regular-tetrahedron-can-fit [19] L. E. Kavraki, P. ˇSestka, J.-C. Latombe and M. H. Overmars, Probabilistic roadmapsfor path planning in high dimensional configuration spaces, IEEE Transactions onRobotics IEEE International Conference on Robotics and Automation (ICRA) (2000), 995–1001.[21] J.-C. Latombe, Robot Motion Planning, The Kluwer international series in engineeringand computer science, Kluwer, volume 124, 1991.[22] S. M. LaValle, Planning Algorithms, Cambridge University Press, 2006[23] W. H. Plantinga and C. R. Dyer, Visibility, occlusion, and the aspect graph, Int. J.Computer Vision IEEE Trans Autom.Sci. Eng. Algorithmica, Adv. Appl. Math. , 4 (1983),298–351.[27] M. Sharir and P. K. Agarwal, Davenport–Schinzel Sequences and Their GeometricApplications , Cambridge University Press, New York, 1995.[28] J. Snoeyink and J. Stolfi, Objects that cannot be taken apart with two hands, DiscreteComput. Geom. 12 (1994), 367–384.[29] G. Toussaint, Movable separability of Sets, Comput. Geom.