Kinetic Collision Detection Between Two Simple Polygons



Similar documents
EQUATIONS OF LINES AND PLANES

Reasoning to Solve Equations and Inequalities

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Regular Sets and Expressions

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

Homework 3 Solutions

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Section 5-4 Trigonometric Functions

Graphs on Logarithmic and Semilogarithmic Paper

Basic Research in Computer Science BRICS RS Brodal et al.: Solving the String Statistics Problem in Time O(n log n)

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

6.2 Volumes of Revolution: The Disk Method

Pentominoes. Pentominoes. Bruce Baguley Cascade Math Systems, LLC. The pentominoes are a simple-looking set of objects through which some powerful

Math 314, Homework Assignment Prove that two nonvertical lines are perpendicular if and only if the product of their slopes is 1.

All pay auctions with certain and uncertain prizes a comment

A.7.1 Trigonometric interpretation of dot product A.7.2 Geometric interpretation of dot product

Solving the String Statistics Problem in Time O(n log n)

Drawing Diagrams From Labelled Graphs

Experiment 6: Friction

Section 7-4 Translation of Axes

Lecture 5. Inner Product

Or more simply put, when adding or subtracting quantities, their uncertainties add.

The Velocity Factor of an Insulated Two-Wire Transmission Line

4.11 Inner Product Spaces

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2

FAULT TREES AND RELIABILITY BLOCK DIAGRAMS. Harry G. Kwatny. Department of Mechanical Engineering & Mechanics Drexel University

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Section 5.2, Commands for Configuring ISDN Protocols. Section 5.3, Configuring ISDN Signaling. Section 5.4, Configuring ISDN LAPD and Call Control

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

Helicopter Theme and Variations

Integration by Substitution

DAGmaps: Space Filling Visualization of Directed Acyclic Graphs

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Vector differentiation. Chapters 6, 7

GENERALIZED QUATERNIONS SERRET-FRENET AND BISHOP FRAMES SERRET-FRENET VE BISHOP ÇATILARI

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

VoIP for the Small Business

Integration. 148 Chapter 7 Integration

Vectors Recap of vectors

Modular Generic Verification of LTL Properties for Aspects

PHY 140A: Solid State Physics. Solution to Homework #2

Econ 4721 Money and Banking Problem Set 2 Answer Key

Protocol Analysis / Analysis of Software Artifacts Kevin Bierhoff

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

2 DIODE CLIPPING and CLAMPING CIRCUITS

Concept Formation Using Graph Grammars

AntiSpyware Enterprise Module 8.5

Basic Analysis of Autarky and Free Trade Models

Factoring Polynomials

Distributions. (corresponding to the cumulative distribution function for the discrete case).

Quick Reference Guide: One-time Account Update

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur

Answer, Key Homework 10 David McIntyre 1

New Internet Radio Feature

T H E S E C U R E T R A N S M I S S I O N P R O T O C O L O F S E N S O R A D H O C N E T W O R K

ClearPeaks Customer Care Guide. Business as Usual (BaU) Services Peace of mind for your BI Investment

DlNBVRGH + Sickness Absence Monitoring Report. Executive of the Council. Purpose of report

Small Businesses Decisions to Offer Health Insurance to Employees

Physics 43 Homework Set 9 Chapter 40 Key

Pure C4. Revision Notes

5 a LAN 6 a gateway 7 a modem

Online Multicommodity Routing with Time Windows

COMPONENTS: COMBINED LOADING

Small Business Networking

SPECIAL PRODUCTS AND FACTORIZATION

Math 135 Circles and Completing the Square Examples

How To Network A Smll Business

Physics 6010, Fall 2010 Symmetries and Conservation Laws: Energy, Momentum and Angular Momentum Relevant Sections in Text: 2.6, 2.

Week 11 - Inductance

VoIP for the Small Business

Review guide for the final exam in Math 233

Small Business Networking

Euler Euler Everywhere Using the Euler-Lagrange Equation to Solve Calculus of Variation Problems

Small Business Networking

Treatment Spring Late Summer Fall Mean = 1.33 Mean = 4.88 Mean = 3.

Vectors. The magnitude of a vector is its length, which can be determined by Pythagoras Theorem. The magnitude of a is written as a.

Lecture 3 Gaussian Probability Distribution

VoIP for the Small Business

piecewise Liner SLAs and Performance Timetagment

Introducing Kashef for Application Monitoring

VoIP for the Small Business

Enterprise Risk Management Software Buyer s Guide

Brillouin Zones. Physics 3P41 Chris Wiebe

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

9 CONTINUOUS DISTRIBUTIONS

Small Business Networking

VoIP for the Small Business

Applications to Physics and Engineering

How To Reduce Telecommunictions Costs

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

A Network Management System for Power-Line Communications and its Verification by Simulation

How To Make A Network More Efficient

VoIP for the Small Business

How fast can we sort? Sorting. Decision-tree model. Decision-tree for insertion sort Sort a 1, a 2, a 3. CS Spring 2009

One Minute To Learn Programming: Finite Automata

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

In addition, the following elements form an integral part of the Agency strike prevention plan:

CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001

Transcription:

Kinetic Collision Detection Between Two Simple Polygons Julien Bsch Jeff Erickson Leonids J. Guis John Hersherger Li Zhng Astrct We design kinetic dt structure for detecting collisions etween two simple polygons in motion. In order to do so, we crete plnr sudivision of the free spce etween the two polygons, clled the externl reltive geodesic tringultion, which certifies their disjointness. We show how this sudivision cn e mintined s kinetic dt structure when the polygons re moving, nd nlyze its performnce in the kinetic setting. 1 Introduction The prolem of collision detection etween moving ojects is fundmentl to simultions of the physicl world. It hs een studied in numer of different communities, including rootics, computer grphics, computerided design, nd computtionl geometry. Methods hve een developed for the cse of rigid odies moving freely in two nd three dimensions. Mny extnt techniues for collision checking on ojects of complex geometry rely on hierrchies of simple ounding volumes surrounding ech of the ojects. For given plcement of two non-intersecting ojects, their respective hierrchies re refined only to the corsest level t which the primitive shpes in the two hierrchies cn e shown to e pirwise disjoint. This nd severl other optimiztions hve improved considerly the cost of colli- Computer Science Deprtment, Stnford University, Stnford, CA 94305, nd Center for Geometric Computing, Deprtment of Computer Science, Duke University, Durhm, NC 27708-0129; jsch@cs.stnford.edu; http://grphics.stnford.edu/ jsch/. Center for Geometric Computing, Deprtment of Computer Science, Duke University, Durhm, NC 27708-0129, nd Deprtment of Computer Science, University of Illinois, Urn, IL 61801-2987; jeffe@cs.uiuc.edu; http://www.uiuc.edu/ph/www/ jeffe/. Portions of this reserch were done t the Interntionl Computer Science Institute, Berkeley, CA. Reserchsupported y Ntionl Science Foundtion grnt DMS-9627683 nd y U.S. Army ReserchOffice MURI grnt DAAH04-96-1-0013. Computer Science Deprtment, Stnford University, Stnford, CA 94305; guis@cs.stnford.edu; http: //grphics.stnford.edu/ guis/. Reserchprtilly supported y Ntionl Science Foundtion grnt CCR-9623851 nd y U.S. Army ReserchOffice MURI grnt DAAH04-96-1-0007. Mentor Grphics Corp., 8005 SW Boeckmn Rod, Wilsonville, OR 97070, USA; john hersherger@mentorg.com. Computer Science Deprtment, Stnford University, Stnford, CA 94305; lizhng@cs.stnford.edu; http://grphics.stnford.edu/ lizhng/. sion detection. Though physicl simultion involves severl other computtionl tsks, such s motion dynmics integrtion, grphics rendering, nd collision response, collision detection remins still one of the most time consuming in such system. Motion in the physicl world is in generl continuous over time, nd mny systems ttempt to speed up collision checking y exploiting this temporl coherence, insted of repeting full collision check initio t ech time step [10]. Swept volumes in spce or spce-time hve lso een used towrds this gol [2, 8]. Though time-stepping t eul increments is customry for motion integrtion, collisions tend to e very irregulrly spced over time. If we know the motion lws of the ojects, then it mkes sense to try to predict exctly when collisions will hppen. There hve een few theoreticl ppers in computtionl geometry long these lines [4, 7, 11], ut their results re not so useful in prctice ecuse they use complex dt structures nd re only pplicle for limited types of motion. In this pper we focus on prolem tht, while simple, still deutely ddresses numer of the fundmentl issues tht rise s we try to move wy from the limittions of these erlier methods. Our prolem is tht of detecting collisions etween two simple polygons moving rigidly in the plne. Wht mkes this prolem chllenging is tht the two polygons cn e uite intertwined nd thus in close proximity in mny plces t once. We dopt the point of view of kinetic dt structures [1, 6], s it is very nturl for the collision detection prolem. A kinetic dt structure, or KDS for short, is uilt on the ide of mintining discrete ttriute of ojects in motion y nimting proof of its correctness through time. The proof consists of set of elementry conditions, or certifictes, sed on the kinds of tests performed y ordinry geometric lgorithms (CCW tests in our cse). Those of the certifictes tht cn fil s result of the rigid motion of the polygons re plced in n event ueue, ordered ccording to their erliest filure time. When certificte fils, the proof needs to e updted. Unless collision hs occurred, we perform this updte nd continue the simultion. In contrst to fixed time step methods, for which the fstest moving oject determines the time step for the entire system, kinetic method is sed on events (the certificte filures)

2 tht hve nturl significnce in terms of the prolem eing ddressed (collision detection in this cse). The kinetic model llows us to perform rigorous comintoril time-cost nlysis nd otin prcticl solutions t the sme time. Unlike erlier collision detection methods tht hve focused on ounding volume hierrchies for complex ojects, we focus on the free spce etween the moving ojects. We tile this free spce into cells of certin type. Some cells of this tiling deform continuously s the ojects move. As long s ll the cells in the tiling remin non-self-intersecting, the tiling itself functions s the KDS proof of seprtion, or non-collision, etween the ojects. At certin times, of course, cells will ecome invlid nd comintoril chnge to the tiling will ecome necessry. In designing good tiling we seekto stisfy three somewht opposing desidert: select deformle cell shpe whose self-collisions re esy to detect, select tiling tht cn conform or djust to the motion of the polygons, so tht its comintoril structure remins vlid for s long s possile, nd mke it esy to updte the tiling when cell selfcollisions do occur. These desidert re directly relted to the compctness, efficiency, nd responsiveness of our KDS. We otin such tiling y mintining moving polygonl line seprting the two polygons. More specificlly, we mintin structure contining the reltive convex hull [14] of the two polygons. This structure is wht we cll the externl reltive geodesic tringultion (ERGT), plnr sudivision comining the ide of the reltive convex hull nd of the geodesic tringultion of simple polygon [3]. (This ltter structure ws lso used y Mount [9] for the sttic prolem of intersection detection.) The ERGT effectively defines set of flexile shells surrounding ech of the polygons. The spce etween these shells consists of pseudotringles, which re the sic shpes used in our tiling. The ERGT cn e uickly updted upon certificte filures (it is responsive, s descried in [6]) nd hs mny other nice properties. For exmple, s we will see, the numer of certifictes of our seprtion proof is relted to the size of the minimum link seprtor for the two polygons [13]. Thus our seprtion proof utomticlly dpts to the complexity of the reltive plcement of the two polygons from single seprting line when the polygons re fr prt to s complex s necessry when they hve mny points of ner contct. This feture is importnt in the kinetic model, in which ojects re llowed to chnge their motion pln unpredictly. π(,) C(,)R(,) Figure 1. The geodesic from to for two plcements of the smll polygon. A shortest pth endpoint is indicted y str. TheulityofKDSismesuredinprtythenumerofeventsithstoprocessintheworstcse(itsefficiency). Oviously, this numer depends on the type of motions llowed. We derive the surprising result tht when the moving polygons re trnslting long lgeric trjectories of ounded degree, the reltive convex hull of the two polygons chnges only O(n) times,where n is the complexity of the polygons. A vrition on this rgument shows tht under such motion our KDS will process O(n log n) events. If the polygons re lso llowed to rotte y constnt numer of full turns, we show tht the numer of events is ner udrtic in the worst cse (the ovious ound is cuic). These ounds re nerly optiml for structures incorporting the reltive convex hull. Section 2 presents the exterior reltive geodesic tringultion for two non-intersecting simple polygons nd the ssocited seprtion proof derived from it. It lso shows how this proof cn e mintined under continuous motion. Section 3 presents the event ounds for the two models of motion considered. Section 4 concludes with plns for further work. 2 Certifiction nd Mintennce We denote the oundry of simple polygon P y P, nd tke the convention tht simple polygon is n open set. For two vertices, P, wedenotey C(, ) the reltively open polygonl chin long P from to going counter-clockwise. The complement of P is clled the free spce of P nd denoted F P.The shortest pth from to homotopic to C(, ) inf P is denoted π 0 (, ). In this pper, we consider two non-intersecting polygons P, Q. Define F, thefree spce, toethecomple- ment of P Q. Wedenoteyπ(, ) the shortest pth from to tht is homotopic to C(, ) inf. It is n oriented polygonl chin clled the geodesic from to. If n edge connects two vertices of P (resp. Q), it is clled PP edge (resp. QQ edge). If it connects vertex from P nd vertex from Q, it is clled PQ edge. An oriented edge tht connects two vertices u, v of P in F P is denoted uv. Finlly, we denote y R(, ) the open region delimited y C(, ) ndπ(, ) (Figure 1).

3 Figure 2. Plnr mps induced y the ERGT of two polygons, with the PQ edges in old. The right polygon is dreming out its first four pinned geodesic cycles. Proposition 2.1. Let (, ) nd (c, d) e two pirs of vertices, with ech pir either on P or Q. If(, ) nd (c, d) re on different polygons, then R(, ) nd R(c, d) do not intersect. If (, ) nd (c, d) re on the sme polygon nd C(, ) nd C(c, d) do not overlp, then R(, ) nd R(c, d) do not intersect. If C(, ) C(c, d), then R(, ) R(c, d). Given suseuence S of vertices of P,thepinned geodesic cycle of P sed on S is the seuence of geodesics in F joining consecutive vertices of S. We sy tht the vertices of S re pinned. 2.1 Externl Reltive Geodesic Tringultion Proposition 2.1 llows us to define plnr mp. Let T P (resp. T Q ) e inry tree whose leves re the edges of P (resp. Q) in counter-clockwise order, nd let T e the inry tree whose root hs T P nd T Q s its two children. Ech sutree of T (except T itself) is ssocited with polygonl chin on one of the oundries, so T defines hierrchy of polygonl chins. With ech node ν of T, we ssocite the geodesic etween the two extreme vertices of the sutree rooted t ν. We ssocite with the root node geodesic homotopic to Q nd pinned to vertex p of P. We choose p depending on the configurtion so tht, when the convex hulls of P nd Q re disjoint, this geodesic dds n inner common tngent nd n outer common tngent to the edges lredy defined y the geodesics ssocited with the other nodes. By Proposition 2.1, this system of geodesics defines plnrmp(tiling) tht we cll the externl reltive geodesic tringultion (or ERGT) of the pir (P, Q) sed on T (Figure 2). In the rest of this pper, we tke treeofdeptho(log n) to define the ERGT, where n is the totl numer of vertices of the two polygons. Oservtion 2.1. The edges of the ERGT re otined y superimposing O(log n) pinned geodesic cycles for ech polygon, nd possily some inner nd outer common tngents of the polygons. The ERGT hs numer of properties, which re strightforwrd generliztions of those of the geodesic tringultion of [3]. Consider node ν in T P or T Q.It hs n ssocited geodesic, nd its two children define two geodesics otined y pinning n dditionl vertex. The open region etween these three geodesics, if non-empty, is fce of the plnr mp clled pseudotringle (three convex vertices joined y three concve chins). The root node of T defines two fces: the infinite fce (mde of only one concve chin linked to itself y convex vertex) nd pseudo-tringle. For ny line segment in F, the seuence of nodes of T corresponding to the fces whose interior it crosses lie long pth in T. A plnr mp is mde of vertices, edges, nd fces. Additionlly, we will sy tht two djcent edges long fce define corner, which cn e either reflex, convex, or degenerte (i.e., 0 or 180 ) on tht fce. A condition tht sttes tht given corner is reflex or convex is clled corner certificte. Now, suppose tht we move the vertices in complince with the certifictes of ll corners: re we sure tht the mp will remin plnr, i.e., tht no two edges will intersect? For generl plnr mp, this is not the cse, ut the specil structure of the pseudo-tringles llows the ERGT to e certified y its corners, in the following sense: Lemm 2.2. Let P, Q e two simple polygons moving continuously etween time 0 nd time t f,ndletσ t e their ERGT t t. IfnocornerofΣ 0 ecomes degenerte efore t f,thenσ t =Σ 0 for ll t<t f. In prticulr, collision cn occur etween P nd Q only when certificte fils. Thus, we will e le to detect collisions if we cn mintin the ERGT.

4 f f l f r () () (c) Figure 3. The filure of convex certificte (right to left), nd of reflex certificte (left to right). The polygon edges incident to the extreme vertices my lie on either side of the edge involved in the event (right inset). 2.2 Loclity Some certifictes in the geodesic tringultion involve only vertices of P, some involve only vertices of Q, nd some involve oth. In context in which P nd Q oth move rigidly, only the certifictes involving oth polygons cn ever fil. Those re the corner certifictes tht re djcent to PQ edges in the ERGT. This set of certifictes is clled the ctive set. In the kinetic setting, chnge of the motion pln of one of the polygons mkes it necessry to recompute the filure times of the ctive set, nd it is therefore desirle to hve s smll n ctive set s possile. Lemm 2.3. In n ERGT of P nd Q with n vertices in totl, the ctive set hs O(κ log n) certifictes, where κ is the size of minimum link seprtor of P nd Q. Proof: A line segment not contined in P cn cross geodesic etween two vertices of P t most once. Therefore, it cn cross pinned geodesic cycle t most twice. A seprtor hs to cross ll PQ edges, so there re t most twice s mny such edges s there re segments in the seprtor. Finlly, there re t most four certifictes per PQ edge in the ctive set. 2 2.3Mintennce of the ERGT We now ssume tht we hve two moving simple polygons P, Q. We ssume trnsverslity in spce/time, i.e., there re t most three vertices colliner t ny given time. This ssumption lso implies non-degenercy of P nd Q seprtely: no three vertices of P re colliner, nd the sme holds for Q. We further ssume tht, given the knowledge of the motions of P nd Q, wecn compute the filure time of ny certificte in O(1). We mintin the ERGT of P nd Q y tking ll corner certifictes of the ssocited plnr mp, nd putting them in n event ueue ordered y time of filure. As the ERGT remins the sme when no certificte fils, we just need to descrie how to updte it when there is n event. An event, in generl, involves updting the geodesic tringultion, nd descheduling nd rescheduling in the event ueue the corner certifictes tht re ffected y this updte. As we hve seen, there re two types of certifictes (reflex nd convex), nd therefore two types of events, which re pictured in Figure 3. The filure of convex certificte (right to left in Figure 3) is esy to hndle, s there is only one possile resulting mp. However, when reflex certificte fils, we need to choose etween three possile resulting mps. We descrie elow how this cn e done with the help of the tree on which the ERGT is sed. Consider the sitution on the left of Figure 3. Let f e the fce of the reflex certificte, nd let v e its djcent vertex. The fce f hs two djcent fces round v, which we denote f l nd f r. Recll tht our ERGT is sed on inry tree T, nd tht ech fce hs n ssocited node in this tree. Let ν, ν l,ν r e the three nodes ssocited with our fces. Proposition 2.4. The reltive positions of nodes ν, ν l,ν r re different in ech cse of Figure 3. More precisely, if none of them is the root node of T, the cses re: () the three nodes re not on common pth, () the three nodes re on common pth, nd ν r is etween ν nd ν l, (c) the three nodes re on common pth, nd ν l is etween ν nd ν r, Proof: (sketch) As we mentioned erlier, if segment in F P crosses seuence of fces, the ssocited nodes lie long pth in T. In ech cse () (c), we choose pproprite segments round the vertex v to prove the clim. For instnce, in cse (), we cn drw segment tht crosses f,f r,f l in this order. 2 If one of the nodes is the root node, we cn distinguish how the event should e hndled with little extr work. Detils re omitted from this version of the pper. Our kinetic dt structure mintins the ERGT, nd, for ech fce, pointer to its node in T (note tht T

5 p 1 p 2 p 1 p 2 () p 1 p 1 p 2 p 2 () hve non-uniform ngulr velocity nd cn cover only constnt numer of full turns. For oth pure trnsltion nd rigid motion, we show tht the worst-cse numer of chnges to the ERGT is out the sme s the worst-cse numer of chnges to the reltive convex hull. Our results re s follows: Theorem 3.1. If two simple polygons P nd Q with n vertices trnslte long lgeric trjectories of degree k, then the numer of chnges to their ERGT is O(kn log n). Figure 4. () An inner ppernce nd () n outer ppernce of the oriented edge p 1 p 2 long π(, ) sq moves downwrds. In ech cse, the polygon edges incident to the extreme vertices my lie on either side of the connecting edge (inset). is fixed over time: it is not the dul tree of the plnr mp). When reflex certificte fils, we use these pointers s indicted y Proposition 2.4 to decide how to hndle the event. This cn e done in O(log log n) with constnt numer of lest-common-ncestor ueries. In ll cses, the updte of the ERGT involves the destruction nd cretion of constnt numer of edges. Ech corner certificte tht is distured during this process needs to e descheduled or rescheduled in the event ueue, which tkes n dditionl time logrithmic in the size of the ctive set. In other words, our KDS is responsive. The reder is invited to exmine Figure 2, nd to imgine how the structure of the ERGT would chnge if the smll polygon were to move round. 3 Efficiency In this section, we nlyze the numer of comintoril chnges to the ERGT under two models of motion: pure trnsltion nd trnsltion with ounded rottion. In oth cses, we will ssume without loss of generlity tht P is sttionry nd Q is moving. The position nd orienttion of Q is given y moving orthogonl reference frme point (t) nd pir of orthogonl unit vectors x(t),y(t) whose coordintes re continuous functions of time. The vertices of Q hve fixed coordintes reltive to the moving reference frme. In order to compute the filure times of corner certifictes in constnt time, we ssume tht the coordintes of the reference frme, nd thus the coordintes of every vertex, re polynomils of ounded degree. Any rigid motion cn e pproximted y such moving reference frme to ny desired ccurcy, for limited time. However, ounded-degree lgeric rigid motions necessrily Theorem 3.2. If two simple polygons P nd Q with n vertices undergo ounded-degree lgeric rigid motion, then the numer of chnges to their ERGT is O(n 2+ɛ ) for ny ɛ>0, where the hidden constnt depends on the exct prmeters of the motion. Like the ounds for other kinetic dt structures [1, 5, 6], these ounds do not ctully reuire the motion to e lgeric, ut only tht it stisfy certin comintoril conditions. However, it is not sufficient to ssume tht ny individul certificte cn fil only constnt numer of times, s it is for most previous KDSs. Whether our ounds cn e extended to more generl clsses of pseudo-lgeric motion remins n open prolem. An event, i.e., comintoril chnge to the ERGT, lwys involves the ppernce or disppernce of PP or QQ edge. It is cler tht it is sufficient to ound the numer of ppernces. A PP edge my pper for two different resons: if Q suddenly stops intersecting it (we cll this n inner ppernce), or if one of the P vertices strts intersecting PQedge (we cll this n outer ppernce). Figure 4 illustrtes these two events for specific positions of the vertices of P. 3.1 Bounds for Trnsltionl Motion In this section, we consider the cse in which the motion of Q is pure trnsltion. In this cse, the motion of Q cn e descried y the motion of single point. Let us sy tht the position of this point t time t is (t). We sy tht the motion is convex etween t 1 nd t 2 if the projection of (t) on ny line l hs t most one locl extremum in the rnge t 1 t t 2. Thnks to the following lemm, we cn ssume without loss of generlity tht the motion of Q is convex. Lemm 3.3. If the coordintes of (t) re polynomils of degree k, then (t) cn e decomposed into O(k) convex motion frgments. We will not prove ll the cses of Theorem 3.1. Rther, we will consider only the numer of ppernces of PP edges on single pinned geodesic cycle of

6 u v Lemm 3.4. Let P 1 nd P 2 e two finite, disjoint pockets in P whose lids re prllel, with P 1 nd P 2 loclly on the sme sides of their lids. Suppose tht t some time t 1,pocketP 1 is full nd P 2 is empty, nd tht t some lter time t 2,pocketP 1 is empty nd P 2 is full. If P nd Q remin disjoint nd trnslte continuously etween t 1 nd t 2, then there exists time t, with t 1 <t <t 2,twhichothP 1 nd P 2 re empty. u Figure 5. Two instnces of n oriented edge uv. Th e pocket it defines is in gry, nd the neighor pockets re htched. P,whichwecllPGC in the seuel. This cse illustrtes our min rguments, nd symmetry considertions, with creful cse nlysis, tke cre of the other possiilities. Recll tht π 0 (, ) is the shortest pth tht voids only the polygon P for, P.Itisidenticltoπ(, ) when the convex hulls of P nd Q re disjoint. Let R 0 (, ) e the region ounded y π 0 (, ) ndc(, ), just s R(, ) is the region ounded y π(, ) nd C(, ). Let uv e n oriented PP edge. We extend it eyond v until it hits P, nd denote this segment (or ry, or empty set) y uv. Weclluv the extension of uv t v. The extension vu is defined symmetriclly. The union of uv nd its two extensions is denoted uv. ItcutsF P in up to four components (t most four, y non-degenercy). Definition 3.1. The pocket of the oriented edge uv (denoted pocket(uv)) is the component of F P \ uv tht is loclly to the left of uv. If uv is finite segment, the neighor pocket of v is the component with uv on its oundry, nd uv not on its oundry. The neighor pocket of u is defined symmetriclly (Figure 5). If neighor pocket is on the sme side of uv s pocket(uv), it is clled forwrd-fcing, otherwise it is clled ckwrd-fcing. A finite pocket of P is full if it contins t lest one point of Q, ndempty otherwise. The lid of pocket(uv) is the portion of uv on its oundry. If finite pocket contins pinned vertex of PGC in its closure, we sy tht the pocket itself is pinned. A neighor pocket is lso pocket in its own right. The endpoints of the extension segment tht defines it my not e vertices, ut the definition of pocket does not reuire them to e. v Proof: (sketch) Theproofissedonthe depthof penetrtion of full pocket. If P 1 is lredy full when P 2 ecomes full, then P 1 will sty full until fter P 2 ecomes empty gin, ecuse Q sticks frther into P 1 thn into P 2. Hence when P 1 first ecomes empty, P 2 is empty s well. 2 The definitions of the pocket nd neighor pockets llow us to chrcterize the plcements of Q for which PP edge cn e present on PGC. In the following discussion, we will ssume tht nd re consecutive pinned vertices long P. Lemm 3.5. If PP edge e is present on PGC for some position of Q, then for ech unpinned endpoint v of e, the extension of e t v is non-empty segment or ry. If the extension is finite segment, then the neighor pocket of v is either infinite, pinned, or full. Furthermore, pocket(e) is empty nd hs no pinned vertex not colliner with e. Proof: Edge e elongs to π(, ) for some pir of consecutive pinned vertices nd. If vertex v of e is unpinned, π(, ) must end t v, nd P must lie loclly in the interior of the ngle formed y the end. Hence the extension t v is non-empty. If the extension is finite nd the neighor pocket N is finite nd unpinned, then π(, ) crosses the lid of N twice. But if Q does not enter N, π(, ) cn e shortcut using segment of the pocket lid. Hence N must e full. For ech endpoint v of e, either the lid of pocket(e) ends t v, orπ(, ) ends wy from pocket(e) tv. In either cse, π(, ) seprtes from the lid t v. The only intersection of π(, ) with the lid of pocket(e) is exctly the edge e. (If there were two intersections with the lid of neighor pocket, π(, ) could e shortcut.) It follows tht π(, ) does not enter pocket(e). However, if Q entered pocket(e), or if pocket(e) contined pinned vertex not colliner with e, then π(, ) would e forced to enter pocket(e), contrdiction. 2 This chrcteriztion lets us ound the numer of ppernces of ny PP edge, s pocket cn ecome empty t most once during single convex motion.

7 y z x Figure 6. Two restricted PP edges tht cross. Lemm 3.6. An oriented PP edge hs t most one inner ppernce nd one outer ppernce on PGC during single convex motion. Proof: (sketch) At the instnt PP edge e hs n inner ppernce, some point of Q exits pocket(e). Hence the projection of Q s motion on the norml to e is directed wy from pocket(e). Before e cn hve second inner ppernce, Q must re-enter pocket(e), then reverse direction to exit it gin, creting non-convex motion. Likewise, if e hs n outer ppernce, Q crosses one of the extensions of e. This motion my either e towrd pocket(e) or wy from pocket(e), depending on the configurtion of e nd its extensions. Nevertheless, cse nlysis shows tht efore e cn hve second outer ppernce, the projection of Q s motion on the norml to e will hve two locl extrem. 2 To ound the numer of ppernces of PP edges on PGC, we ound the numer of ppernces of ech of three types of edges: (1) edges tht elong to π 0 (, ) for some pir of consecutive pinned vertices nd (the lemm ove sys tht there re linerly mny such ppernces); (2) edges not of type (1) tht hve t lest one ckwrd-fcing neighor pocket (we prove in the full pper tht such edges elong to one of two n- vertex trees, so there re O(n) of them); nd (3) edges not of type (1) tht hve only forwrd-fcing neighor pockets. We now focus our ttention on PP edges of PGC tht do not elong to ny π 0 (, ), nd tht hve only forwrd-fcing neighor pockets. We cll these edges restricted PP edges. Lemm 3.7. If two restricted PP edges of PGC tht pper during the motion of Q cross (i.e., their interiors intersect), then ech hs finite, forwrd-fcing neighor pocket tht is contined in the other edge s pocket. Proof: By non-degenercy, the two edges must cross properly they cnnot e colliner. Let the two edges e ux nd wz, nd without loss of generlity ssume w u v tht x is contined in pocket(wz) ndw is contined in pocket(ux). See Figure 6. We cn show tht π(, ) R 0 (, ) π 0 (, ); we omit the detils from this version of the pper. Hence ux nd wz oth elong to π(, ) for the sme consecutive pir of pinned vertices nd, leit t different times. As noted in the proof of Lemm 3.5, if e is PP edge of PGC, then π(, ) doesnotenterpocket(e). This implies tht pocket(e) is contined in R(, ). By trnsitivity, pocket(e) is lso contined in R 0 (, ). Since pocket(wz) ndpocket(ux) reothcontined in R 0 (, ), neither x nor w is pinned. Hence the extensions t x nd w must exist, y Lemm 3.5. Furthermore, ech extension is contined in the other edge s pocket: for exmple, vw cnnot intersect ux, ecuse vz intersects ux in only one plce, nmely on wz. Therefore, the extensions re finite, nd ound neighor pockets pocket(vw) nd pocket(xy). Becuse ux nd wz re restricted PP edges, these neighor pockets re forwrd-fcing. Ech neighor pocket is therefore finite. It follows tht pocket(vw) pocket(ux) nd pocket(xy) pocket(wz). 2 Lemm 3.8. No two restricted PP edges tht hve outer ppernces on PGC during single convex motion of Q cn cross. Proof: If restricted PP edge e hs n outer ppernce on PGC, it follows from Lemm 3.5 tht pocket(e) is empty, nd some vertex of Q crosses the lid into neighor pocket t the moment of ppernce. The pocket Q enters is finite nd unpinned, nd empty just prior to the ppernce of e (otherwise π(, ) would lredy enter the pocket). Suppose tht the two crossing edges re ux nd wz, sshowninfigure6,ndwz ppers efore ux. When wz ppers, some vertex of Q crosses wz from ove to elow. Just fter wz ppers, pocket(vw) is full nd pocket(wz) isempty. Whenux ppers, pocket(xy) is full nd pocket(ux) is empty, implying tht pocket(vw) is empty nd pocket(wz) is full. By Lemm 3.4, pocket(vw) ecomes empty efore pocket(wz) ecomes full. Hence some vertex of Q crosses wz from elow, nd nother vertex lter crosses wz from ove. The projection of Q s motion on the norml to wz therefore hs two successive locl extrem, nd Q s motion is not convex. 2 The proof of the corresponding lemm for inner ppernces is similr, ut esier. Lemm 3.9. The numer of PP edge ppernces on PGC is O(n) during single convex motion.

8 Q P o Figure 7. When Q rottes round the point o, echtoothcuses the reltive convex hull to chnge n times. Proof: (sketch) The grph of ll outer ppernces of restricted PP edges is plnr (Lemm 3.8), nd hence of liner size; ech edge cn pper t most once (Lemm 3.6). The sme rgument pplies to the inner ppernces. Appernces of non-restricted edges hve een ounded seprtely. 2 This concludes the prt of the proof of Theorem 3.1 tht we re le to present in this proceedings. 3.2 Bounds for Rigid Motion When Q is llowed to rotte s well s trnslte, the key Lemm 3.4 fils. Indeed, we cn construct n exmple of lgeric rigid motion in which the reltive convex hull of P nd Q (nd hence their ERGT) chnges udrticlly mny times, s shown in Figure 7. In the figure, P is fixed, nd Q rottes round the point o. Oncetooth of Q crosses dshed line, which is the extension of n edge on the left convex chin of P, the reltive convex hull of P chnges comintorilly. We cn mke Q hve n regulrly spced teeth, nd the convex chin of P flt enough so tht the teeth of Q cross ll the dshed lines one fter nother. Then, ech tooth of Q cuses the reltive convex hull to chnge n times. In totl, the reltive convex hull chnges udrticlly mny times. Since the reltive convex hull of P is the outermost pinned geodesic cycle if we choose the first pinned vertex on the convex hull of P, the ERGT chnges udrticlly mny times s well. To prove nerly mtching upper ound, we once gin consider seprtely inner nd outer ppernces. In the reminder of this section, Q undergoes lgeric rigid motion, s descried t the eginning of this section, nd s usul, P is sttionry. We first relte the outer ppernces on the ERGT to some visiility chnges in continuously chnging scene. Lemm 3.10. Let P e fixed simple polygon nd p P. If point moves long ounded-degree lgeric pth in F P, then the visiility etween p nd in F P chnges O(1) times. Proof: (sketch) The region where is not visile from p is mde of disjoint pockets whose lids re colliner with p. Ech time disppers nd reppers from view, it hs to enter nd leve pocket, nd the slope of p reches mximum or minimum. Since is moving long n lgeric pth of ounded degree, the slope of p hs only O(1) locl extrem. There is one specil cse in which psses ehind P, ut this cn lso hppen only O(1) times. 2 Lemm 3.11. The visiility etween ny point of P nd ny point of Q chnges O(1) times. Proof: Suppose tht t time t, strts (or ceses) to e visile from p. This hppens only when there is vertex r tht ceses (or strts) to lockthe visiility from to p. Ifr P, then the visiility from to p chnges even if we consider only the visiility with respect to P. If r Q, similrly, the visiility from to p chnges, even considering only the visiility with respect to Q. By Lemm 3.10, there cn e O(1) such events. 2 An interesting oservtion is tht the previous lemm doesn t hold for two points on the sme polygon. In Figure 7, the visiility etween vertex on the left convex chin of P nd the tip vertex on the right side of P chnges n times s Q mkes full rottion. Lemm 3.12. The numer of outer ppernces of PP nd QQ edges on the ERGT is O(n 2 ). Proof: If PP edge p 1 p 2 hs n outer ppernce due to vertex s in Figure 4(), we chrge this outer ppernce to the pir (p 1,). As stops eing visile from p 1 t tht time, such pir cn e chrged t most constnt numer of times y Lemm 3.11. The sme pplies to QQ edges. 2 The ound on the numer of inner ppernces is surprisingly much more involved nd reuires lower envelope rgument. Consider convex vertex Q nd suset P P. For two vertices p 1,p 2 P tht re visile from, consider the cone C spnned y p 1 nd p 2. If this cone contins Q loclly t nd ll the other vertices of P visile from elong to C (resp. don t elong to C), we sy tht p 1 nd p 2 re upper (resp. lower)extreme visile vertices for in P. Informlly, n extreme vertex is the lowest or highest vertex mong set of vertices visile from (Figure 8). We hve the following chrcteriztion of PQ edge.

9 p 1 p 2 () p Figure 8. () p 1 nd p 2 re lower extreme visile vertices of in C(, ). () p 1 nd p 2 re upper extreme visile vertices of in C(, ) π 0 (, ). Lemm 3.13. Suppose tht p is PQ edge on π(, ) where,, p P, Q, ndp / {, }. Then p is either lower extreme vertex for in C(, ), or n upper extreme vertex in C(, ) π 0 (, ). Proof: (sketch) First, note tht for vertex p P to pper on π(, ), it must elong to either C(, ) or C(, ) π 0 (, ). Consider the sitution in which p C(, ) \{, }, ndp is visile from. (If p is not visile from, p cnnot e n edge on π(, ).) If there exist two vertices p 1,p 2 on C(, ) sothtp is outside of the cone ounded y p 1 nd p 2,thenp is inside the region ounded y C(p 1,p 2 ), p 1,ndp 2. Therefore, ny pth from to contining the edge p cnnot e the shortest pth s it cn e shortcut y either p 1 or p 2 (Figure 8()). A similr rgument pplies to the cse when p C(, ) π 0 (, ) (Figure 8()). 2 By Lemm 3.13, we cn ound the numer of inner ppernces. Lemm 3.14. The numer of inner ppernces on single pinned geodesic cycle is O(nλ s (n)), whereλ s (n) is the nerly liner mximum length of Dvenport- Schinzel seuence. The prmeter s is constnt depending on the prmeters of the motion. Proof: (sketch) We focus on PP edges tht pper on specific geodesic π(, ) in the course of the motion. Note tht n inner ppernce of PP edge is due to the disppernce of PQ edge. Consider specific vertex of Q, ndletl e the support line of one of the edges djcent to. Forech vertex p C(, ), plot the ngle etween p nd l s function of time, ut only for those times when p is visile from. Lemm 3.11 gurntees tht ech vertex p defines only constnt numer of rcs in this plot. By Lemm 3.13, n edge p is PQ edge on the pinned geodesic cycle only if p is either on the lower or the upper envelope of these rcs. Moreover, the disppernce of n edge p from π(, ) hppens exctly when p p 1 () p p 2 ceses to e extreme for. Thus, the numer of ppernces is just the numer of vertices on the upper nd lower envelopes of set of O(n) monotone rcs, ny pir of which intersects O(1) times (since ech intersection point corresponds to collinerity etween nd two vertices of P ). The ound now follows from stndrd lower-envelope results [12]. A similr rgument pplies when p C(, ) π 0 (, ), nd, with extr cre, when the ppering PP edge is etween vertex in C(, ) ndoneinc(, ) π 0 (, ). The ound is summed over ll vertices of Q. 2 4 Conclusion We hve presented n efficient nd responsive KDS for the prolem of collision detection etween two moving simple polygons in the plne. This structure hs een implemented nd will e compred with more trditionl methods. We elieve tht the kinetic setting is the frmework of choice to pproch prolems of collision detection, even when the motion plns re not fully known. In two dimensions, we would like to integrte the pproch presented in this pper with the distnce sensitive pproch for convex polygons in the compnion pper [5], nd to generlize the structure to the cse of multiple moving polygons. We still do not know whether these ides cn e successfully dpted to three-dimensionl non-convex odies. The most strighforwrd extension of our ides to three dimensions leds, unfortuntely, to non-polyhedrl tilings of the free spce. Acknowledgments: We wish to thnkjorge Stolfi for fruitful discussions nd John Buer for helping to clrify certin cses of the ERGT mintennce while he ws implementing it. References [1]J.Bsch,L.Guis,ndJ.Hersherger. Dt structures for moile dt. Proc. 8th ACM-SIAM Sympos. Discrete Algorithms, pp. 747 756. 1997. [2] S. Cmeron. Collision detection y fourdimensionl intersection testing. Proc. IEEE Internt. Conf. Root. Autom., pp. 291 302. 1990. [3] B. Chzelle, H. Edelsrunner, M. Grigni, L. Guis, J. Hersherger, M. Shrir, nd J. Snoeyink. Ry shooting in polygons using geodesic tringultions. Algorithmic 12:54 68, 1994.

10 [4] D. Eppstein nd J. Erickson. Rising roofs, crshing cycles, nd plying pool: Applictions of dt structure for finding pirwise interctions. Proc. 14th Annu. ACM Sympos. Comput. Geom., pp. 58 67. 1998. [5] J. Erickson, L. J. Guis, J. Stolfi, nd L. Zhng. Seprtion-sensitive kinetic collision detection for convex ojects. These proceedings, 1998. [6] L. J. Guis. Kinetic dt structures A stte of the rt report. Proc. 3rd Workshop on Algorithmic Foundtions of Rootics, p. to pper. 1998. [7] P. Gupt, R. Jnrdn, nd M. Smid. Fst lgorithms for collision nd proximity prolems involving moving geometric ojects. Comput. Geom. Theory Appl. 6:371 391, 1996. [8] P. M. Hurd. Collision detection for interctive grphics pplictions. IEEE Trns. Visuliztion nd Computer Grphics 1(3):218 230, Sept. 1995. [9] D. M. Mount. Intersection detection nd seprtors for simple polygons. Proc. 8th Annu. ACM Sympos. Comput. Geom., pp. 303 311. 1992. [10] M. K. Ponmgi, D. Mnoch, nd M. C. Lin. Incrementl lgorithms for collision detection etween generl solid models. Proc. ACM Siggrph Sympos. Solid Modeling, pp. 293 304. 1995. [11] E. Schömer nd C. Thiel. Efficient collision detection for moving polyhedr. Proc. 11th Annu. ACM Sympos. Comput. Geom., pp. 51 60. 1995. [12] M. Shrir nd P. K. Agrwl. Dvenport- Schinzel Seuences nd Their Geometric Applictions. Cmridge University Press, New York, 1995. [13] S. Suri. Minimum link pths in polygons nd relted prolems. Ph.D. thesis, Dept. Comput. Sci., Johns Hopkins Univ., Bltimore, MD, 1987. [14] G. T. Toussint. Shortest pth solves trnsltion seprility of polygons. Report SOCS-85.27, School Comput. Sci., McGill Univ., 1985.