/
19thCanadianConferenceonComputationalGeometry,2007 19thCanadianConferenceonComputationalGeometry,2007

19thCanadianConferenceonComputationalGeometry,2007 - PDF document

olivia-moreira
olivia-moreira . @olivia-moreira
Follow
354 views
Uploaded On 2015-08-02

19thCanadianConferenceonComputationalGeometry,2007 - PPT Presentation

Figure1RoomanditsVdiagramfrom100representingdthexrespycoordinaterepresentsthedistancealongtheborderofPfromthedoorintheclockwiserespcounterclockwisedirectionThenwecanassociateanypointx ID: 98803

Figure1:RoomanditsV-diagramfrom[1](0;0)representingd thex(resp.y)coordinaterepre-sentsthedistancealongtheborderofPfromthedoorintheclockwise(resp.counterclockwise)direction.Thenwecanassociateanypoint(x

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "19thCanadianConferenceonComputationalGeo..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

19thCanadianConferenceonComputationalGeometry,2007 Figure1:RoomanditsV-diagramfrom[1](0;0)representingd,thex(resp.y)coordinaterepre-sentsthedistancealongtheborderofPfromthedoorintheclockwise(resp.counterclockwise)direction.Thenwecanassociateanypoint(x;y)inthediagramwithpositionsofthetwoguardsontheborderofP.Torepresentthemutualvisibilityofpairsofpoints,anypoint(x;y)intheV-diagramisshadedi thecorre-spondingpositionsarenotmutuallyvisibleinthepoly-gon.Figure1showsanexampleofthis,where0isthedoorpoint.Anypointonthediagonalcorrespondstoameetingpointofthetwoguards.ThenanypathintheV-diagramfromthetop-leftcorner(thedoor)tothediagonal(thegoal)thatdoesnotcrossanyshadedareas(obstacles)correspondstoavalidsearchschedulesofP;wesaythats=S().Wewillassumethateachguardcantravelindepen-dentlyatvaryingspeedsintherange[0,1]bothfor-wardsandbackwards(withoutcrossingthedoorpoint).Foranysearchschedules,letD(s)denotethedistancetravelledbytheguardsdurings,andletT(s)denotethetimerequiredfors.Itshouldbenotedthatminimiz-ingeachofthesemayresultindi erentsearchsched-ules.Figure2showsanexampleofaroom,withadoorat0,wherethetwonotionsofoptimalschedulegivetwodi erentsearchschedules.Theshortestdistanceisachievedifoneguardtravelsfrom0to2,whiletheotherguardwaitsat5,resultinginatotaldistancetrav-elledequalto24(theperimeterofthepolygon).Thisscheduletakesover19timeunits.Thequickestsearchscheduleinvolvesoneguardtravellingalong0,5,4,3,and2whiletheotherguardmustgofrom0tobandbacktoatomaintainmutualvisibility.Thisrequiresbacktrackingfrombtoa,whichresultsinatotaldis-tancetravelledthatisgreaterthan24,butittakeslessthan15timeunitstocompletetheentiresearch. Figure2:Optimalschedulesaredi erent3CorrespondenceBetweenPathsintheV-diagramandSearchSchedulesTheV-diagramcanbeusedtoconstructoptimalsched-ulesforsearchingtheroom.We rstdescribearela-tionshipbetweenthelengthofapathintheV-diagramandthedistance/timeofthecorrespondingroomsearchschedule.Lemma1LetbeapathintheV-diagramforaroomands=S()bethecorrespondingsearchscheduleoftheroom.Thenjj1=D(s)andjj1=T(s).Inordertoprovethislemmawemustde neD(s)andT(s)moreprecisely.Letus rstrecallhowthelengthofacurveisde ned.Adistancemetricd(a;b)de nesthedistancebetweenapairofpointsaandb.Thisisthelengthofthelinesegmentfromatob.Thelengthofageneralcurve=(t);t2[0;T]isde nedtobesup(Pki=1d((ti);(ti�1)))wherethesupistakenoverpartitionst0;:::;tkof[0;T].Weonlyconsiderrecti -ablecurves,whicharede nedascurveswherethesupexists.Wede neT(s)andD(s)inasimilarfashion, rstforstraightlinesegmentsandthenusingasup.Proof.[ProofofLemma1]Bytheaboveclari cationofthede nitionofD(s)andT(s)itsucestoprovetheresultforapaththatisastraightlinesegment.IntheL1metricjj1=ja�bj1=j(a�b)xj+j(a�b)yj.Thisrepresentsthesumofthedistancestravelledbythetwoguards,so1=D(s).IntheL1metricjj1=ja�bj1=max(j(a�b)xj;j(a�b)yj).Sincebothguardshavethesamemax-imumspeedof1,assumethattheguardtravellingthegreatestdistancetravelsatspeed1tominimizethetimespent,whichisthenthatguard'sdistance.Wethenhavejj1=T(s).Corollary2Thesearchschedulerequiringtheshort-estamountofdistancetotravelalongtheroombound-arycorrespondstotheshortestpathintheL1metricfromthedoortothegoalintheV-diagram.Thequick-estsearchscheduleforaroom(P;d)correspondstotheshortestpathintheL1metricfromthedoortothegoalintheV-diagram. CCCG2007,Ottawa,Ontario,August20{22,2007 4V-diagramConstructionWenowdiscussthenatureoftheV-diagramandhowitiscreated.Theorem3TheborderofeachobstacleintheV-diagramispiecewisehyperbolic.Proof.Theproofisincludedasanappendix.ToconstructtheV-diagramweneedtoaccuratelydescribealloftheobstacles.Todothis,wemust,foreachofthere exvertices:1.Findthetwopointsatwhichtheprojectionsoftheadjacentedgesthroughthevertex rstintersectthepolygonagain.ThistakesO(n)time.2.Startingatoneofthesepointsandworkingalongthepolygontowardsthere exvertex,foreachedgeofthepolygonthatisencountered, ndthecurveoftheV-diagramrepresentingthepairsofpointsonthepolygonthathavealineofvisibilitythroughthere exvertex.ThistakesO(n)time.Therefore,withO(n)re exvertices,theexactvisibil-itydiagramcanbedescribedinO(n2)time.5FindingShortestPathsinV-diagramWehavenowreducedtheproblemof ndingoptimalsearchscheduleswithrespecttodistanceandtimetotheproblemof ndingshortestpathsintheL1andL1metricsamongcurvedobstaclesintheplanethatarepiecewisehyperbolic.WenotethefollowingtwopropertiesofL1andL1shortestpaths:1.BetweenanytwopointsthereisashortestL1paththatisrectilinear.Thisremainstrueinthepres-enceofcurvedobstacles,exceptinthesituation{thatdoesn'tariseforus{wheretheshortestpathtravelsbetweentwoabuttingcurvedobjects.2.TheL1andL1normsarerelatedbyalinearmap-ping;inparticularwecan ndshortestL1pathsbyrotatingtheplaneanditsobstaclesby45andscaling,andthen ndingshortestL1paths.Thisisjusti edin[9].Thusitsucesto ndshortestL1paths,eitheramongtheoriginalobstacles,oramongtheobstaclesrotatedby45.Thereisconsiderableworkon ndingshortestL1pathsamongpolygonalobstaclesintheplane[2,12].Thereisalsoworkon\curvilinear"computationalge-ometry[4]whichhasledtoshortestpathalgorithmsamong\splinegons"[11].However,thereappearstobenosolutionintheliteratureto ndingshortestL1pathsamongcurvedobstacles.Therearetwobasicap-proachestosolvingthisproblem.ThecontinuousDi-jkstraapproachisusedbyMitchell[12]forpolygonalobstacles.Alternatively,theproblemmaybemodelledasagraphshortestpathproblem[3].Theformerap-proachwilllikelyleadtoamoreecientsolution,butwewillsimplyclaimapolynomialtimealgorithmviamodellingtheproblemonagraph.Lemma4Betweenanytwopointsthereexistsashort-estpathamongobstaclesintheL1metricsuchthatthepathintersectsobstacleboundariesonlyatlocalxoryextremepointsoftheobstacles,andsuchthatthepor-tionofthepathbetweentwoconsecutivesuchpointsismonotoneinxandy.Proof.Theproofisincludedasanappendix.Thislemmajusti escreatingagraphwhoseverticesaretheextremepointsofobstaclesandwhoseedgescor-respondtomonotonepathsbetweenpairsofpoints.Wewillinfactuseasubsetoftheseedges,notbecauseitreducesthequadraticnumberofedges,butbecauseitsimpli es ndingtheedges.Ifthereisamonotonepathbetweentwopointsthenthereisalowestmonotonepath,thelowerenvelopeofallmonotonepaths.Alow-estmonotonepathisminimalifitdoesnotgothroughanextremepointofanobstacleexceptatitsendpoints.Observethatanon-minimalpathisaconcatenationofminimalpaths.Thisjusti esrestrictingtheedgesofthegraphtomin-imallowestmonotonepathsbetweenpairsofpoints.TheweightofanedgeistheL1distancebetweentheendpoints.WeaddanadditionalvertexgtorepresentthegoallineintheV-diagram,andtheedgesandedgeweightsarede nedsimilarlywithrespecttoanypointonthegoalline.LetNbethenumberofvertices.SincethereareO(n)barrierseachwithO(n)extremepoints,thusNisO(n2).Inthecasewheretheobstaclesarenotrotatedby45(theoriginalL1case)weobtainatighterboundofN2O(n)(seetheappendix).ThegraphhasO(N2)edges.Wenowshowhowtoconstructthegraph.Findtheextremepointsoftheobstacles,andthepiecesofobsta-cleboundariesbetweenextremepoints.Notethatthesepiecesaremonotone.Foreachextremepointshootraysdownwardandtotheleftandtherightuntilwehitthe rstobstacleboundarypieceencountered.WeclaimthatthiscanallbedoneinO(NlogN)timeusingplanesweepsinthexandydirections.Considertwoextremepointsand ,withhigher.Suppose istotherightof. CCCG2007,Ottawa,Ontario,August20{22,2007 Figure3:Re exvertexAProofofTheorem3Webeginwithanintermediateresult.Lemma5Whenasinglere exvertexobstructsvisi-bilitybetweentwoedgesinthepolygon,thecurveonthecorrespondingregionofashadedportionoftheV-diagramishyperbolic.Proof.Withoutlossofgenerality,assumethatoneoftheendpointsofoneoftheedgesis(0;0),andthedirec-tionalongthatsideisrepresentedbythevector(0;1).ThenletR=(r1;r2)bethere exvertex,let(a1;a2)beoneendpointoftheotheredge,andlet(v1;v2)bethenormalizedvectorrepresentingthedirectionalongtheotheredge.LetC=(0;0)+s(0;1)beanypointalongthe rstedgeandletD=(a1;a2)+t(v1;v2)beanypointalongthesecondedge.ThebarrieroftheshadedregionhasacurvecorrespondingtothepointsalongtheedgeswherethevisibilitylinealongtheedgesgoesthroughP(thatis,whenCRandDRareparallel).Thenbytreat-ingthepointsaspointsinthreedimensions,wecanusethevectorcrossproducttodecidethattwopointsalongtheedgesgiveapointonthiscurvewheneverCRDR=0()(((0;0)+s(0;1))�(r1;r2))((a1;a2)+t(v1;v2)�(r1;r2))=0()(�r1;s�r2)(a1+tv1�r1;a2+tv2�r2)=0()�r1a2�r1tv2+sa1+stv1�sr1+r2a1+r2tv1=0()�s(a2+tv2�r2)=�r1a2�r1tv2+r2a1+r2tv1()s=r1a2+r1tv2�r2a1�r2tv1 a1+tv1�r1Thustherelationshipbetweenthemovementalongoneedgeandthemovementoftheprojectionofthelineofsightalonganotheredgeofthepolygonisgivenbytheequationofahyperboliccurve. Figure4:IntersectionofpathandobstacleWenowproveTheorem3.Proof.EachobstacleintheV-diagramisaunionofbarriers,whereabarrierrepresentstheguardpositionsblockedbyonere exvertex.Abarrierhasahorizontalandverticalsidedeterminedbythetwoedgesadjacenttothere exvertex[15].Theremainderofthebarrierboundaryisde nedbythepairsofpointsonthepoly-gonthatareconnectedbyalinethatalsogoesthroughthere exvertex.Forexample,obstacleAinFigure1iscomposedoftwobarriers,associatedwithre exvertices9and10.Theboxinthe gureshowstheportionofthebarrierwherevertex9wouldobstructtheviewbetweenguardsonedges(6,7)and(0,13).Fromtheabovelemma,weknowthatasinglere- exvertexobstructingvisibilitybetweentwoedgesofthepolygoncorrespondstoahyperbolicportionofabarrierintheV-diagram.Whentheendpointofoneedgeisreached,anewedgeisreached,soanewhyper-bolicportionofthebarrierisbegun.Soeachobstacleispiecewisehyperbolic.BProofofLemma4Bynote(1)atthebeginningofsection5,thereisashortestpaththatisrectilinear.Supposeisashort-estrectilinearpaththatcontainsobstacleintersectionpointsthatarenotlocalextremepoints.Letq=(t)bethe rstsuchpointon.Ifdoesnotchangedirectionatqthenqisalocalextremepoint.Otherwisemakesarightangleturnatq,andwecanalterthepathasshowninFigure4.Therevisedpathhasthesamelength,andifthedetourissmallenough,therevisedpathintersectsnoobstacles.Applyingthisinductivelyyieldsthedesiredpath.Nowsupposethatthepathisnotmonotonebetweentwoconsecutiveextremepoints.Then,assumingthepathdoesnotbacktrackonitself,somewhereonthepaththereare3consecutivesegmentssuchthatthe rst 19thCanadianConferenceonComputationalGeometry,2007 Figure5:ShortestL1subpathsbetweenextremepointsandthirdgoinoppositedirections(wwouldbethesec-ondofthesesegmentsinFigure5).Sincetherearenoextremepointsonthesecondsegment,itcanbetrans-latedsoastoshortenthelengthsofthe rstandthirdsegmentswithoutintersectinganyobstacles(wcanbeshifteddownwithouthittinganyobstacles).Thusthepathcanbeshorteneduntilanobstacleishit,whichhappensatanextremepoint.SoanysubpathbetweenconsecutiveextremepointsthatisnotdirectintheL1sensecanbeshortened.Therefore,thelemmaisproven.CJusti cationofN2O(n)fortheL1CaseWeshowthateachbarrierintheV-diagramofasim-plepolygoncontainsnomorethan3extremepoints.Withtwoadjacentstraightedgesontheborderofthebarrier,3extremepointsarede ned.Theremainderofthebarrierborderisde nedbypairsofpointsonthepolygonboundarythatarecollinearwiththere exver-tex,wherethelinesegmentbetweenthepairofpointsdoesnotintersectthepolygonanywhereelse.Wewillshowthatnomoreextremepointsliealongthispartofthebarrier.Supposetherewasanextremepoint(i.e.,alocalmax-imumorminimum)onthispartoftheborder.Thiswouldimplythatforsomepointontheborderofthebarrier,thereismorethanonecorrespondingpointonthebarriersuchthatthepointsarecollinearwiththere- exvertexandthelinesegmentbetweenthetwopointsintersectsthebordernowhereelse.Clearlythisisnotpossible,sincetheexistenceofmorethanonesuchpointimpliesthatoneofthelinesegmentsintersectsthebor-dermorethanonce.Thusnoextremepointslieonthecurvedportionofthebarrier.Therefore,thereareatmost3extremepointsperbarrier.Sinceeachobsta-cleiscomposedofbarriers,andthereareatmostO(n)barriers,thereforethereareO(n)extremepoints. Figure6:RightturnrestrictionsondesiredpathDProofofClaim1Proof.(()Iftheraydownfrommeetstherayleftfrom ,thentheseraysde neaminimallowestmono-tonepathbetweenthetwopoints.Ifthetworaysdonotmeeteachother,buttheymeetthesamepieceofobstacleboundary,thentheseraysandthepieceofobstacleboundary(withnoextremepointsonit)de neaminimallowestmonotonepathbetweenthepoints.())Supposethereisaminimallowestmonotonepathbetweenand butthatthetworaysmeetdi erentpiecesofobstacleboundary(thetworaysdonotmeeteachother).Sinceisalowestmonotonepath,itismadeupofsegmentsthatgostraightdown,straightright,oralongtheborderofanobstacle.Nowsupposefurtherthatatsomepoint,containsadirectturntotherightthatdoesnotleaddirectlyto (thatis,thehorizontalsegmentfollowingtheturndoesnothave asanendpoint).Thenmustchangedi-rection(atleastslightlydownward)atsomelaterpoint;considerthesubpathofuptothispoint.Sinceisminimal,thissubpathdoesnotmeetanobstacleex-tremepoint.Butthentherightturncouldhavehap-penedlateronsincethehorizontalsegmentcouldbeshifteddown,asin gure6.Thusisnotlowest.Sotheonlyrightturnthatmayhavemustleaddirectlyto .Thenallotherpartsofthepatharedownwardsegmentsandsegmentsthatfollowobstacleboundaries.Notethatthereisasegmentofstartingdirectlybelowthatfollowsanobstacleboundarysincetheraysfromand donotmeeteachother.Afterthissegment,mustturnrightandgodirectlyto orturndown.Ifturnsright(towards ),thenitmusthavemetanextremepoint(andthusisnotminimal)sincetheraysdonotmeetthesamepieceofobstacleboundary.Ifturnsdown,thenitmustdosoatanex-tremepointinorderforthepathtobemonotone,thusitisnotminimal.Thereforedoesnotexist,provingtheclaim.