2D Collision

文章推薦指數: 80 %
投票人數:10人

The normal force is the rate of change of momentum (in the direction between two centers) when two disks collide. ... The torque due to the friction will change ... NTNUJAVAVirtualPhysicsLaboratory Welcome,Guest.Pleaseloginorregister.Didyoumissyouractivationemail? 1Hour 1Day 1Week 1Month Forever Loginwithusername,passwordandsessionlength   News: WelcomedtoNTNUJAVA(Morethan400physicssimulationsinjava)!Googlechromebrowser:(installCheerpJAppletRunner)toviewjavasimulations!installFlashPlayerforWeb2021toviewFlash.IhopeyoucanunderstandphysicswithsimulationsfromthiswebsiteandenjoythefunofphysicsasmuchasIdo! Home Help Search Login Register NTNUJAVAVirtualPhysicsLaboratory» JDK1.0.2simulations(1996-2001)» Dynamics» 2DCollision «previousnext» Print Pages:[1]23...12 Author Topic:2DCollision (Read520252times) Fu-KwunHwang Administrator HeroMember Posts:3062 2DCollision «on:January29,2004,05:08:42pm» Registedusercangetfilesrelatedtothisappletforofflineaccess.Problemviewingjava?Addhttp://www.phy.ntnu.edu.tw/toexceptionsitelistIfjavaprogramdidnotshowup,pleasedownloadandinstalllatestJavaRUNTIME Duetosomanyrequestsfromtheusers,sourcecodeforthisappletisdistributedwiththeZIPfilesyouwillreceiveifyouclickgetfileforofflineusebutton.Pleasedonotaskmetosendyouthesourcecodeagain!YouarewelcomedtocheckoutanotherCollision2DcreatedwithEJS. Pleasecheckoutlatest2DcollisioncreatedwithEJSLet'sconsidercollisionsintwodimension:PressStarttobegintheanimation.Twocircularobjectswillmovewithpre-definedvelocity(yellowarrow).Clickleftmousebuttontosuspendtheanimation.Now,youcanClicknearthetipofthevelocityvectoranddragthemousebutton left/righttochangeitsvalue(theinitialvelocityofthatobject).Clicknearthecircularboundaryanddragthemousebuttontochangeitsradius.RightClickneartheboundaryofthecircletochangeit'ssize(alsochangeit'smass,atthesametime).Clicknearthecenterofthecircleanddragthemousetochangeitslocation.Clickthemousebuttonagaintoresumetheanimation.Whenthetwoobjectscollide,theanimationwillbesuspend.Pressthemousebutton(Donotreleaseit)toseethevelocityvectorsjustafterthecollision.PressResetbuttontoresetparameterstodefaultvalues.etaisthecoefficientofrestitutioneatVf/ViVf=relativevelocityjustaftercollision Vi=relativevelocityjustbeforecollision forelasticcollisioneta=1. forperfectlyinelasticcollisioneta=0.Youcanselectdifferentframeofreferencetoviewtherelativemotionofalltheobjects.labisalaboratoryinertialframe.m1,m2andCMareframeofreferencewithrespecttoleftcircularobjectm1,rightcircularobjectm2andcenterofmassform1andm2.Viewcollisionin1dimension.Atthemomentwhentheycollide,theforcebetweenthetwocircleobjectsisalongthelinewhichconnectthecenterofthetwoobjects.Nowwehave1-Dcollisionproblem:twoobjectmoveinthedirectionalongthelineconnectbetweentheircenter,withvelocitysalongthisdirections.(Redvectors)Thevectorperpendiculartotheabovecomponents(greenvectors)willnotchangedaftercollision.(Ifthereisnofrictionforcebetweenthetwoobjects)PleasecheckoutRigidBodyCollisionsfor2Dcollisionbetweenrectangleshapeobjects.Registedusercangetfilesrelatedtothisappletforofflineaccess.Problemviewingjava?Addhttp://www.phy.ntnu.edu.tw/toexceptionsitelistIfjavaprogramdidnotshowup,pleasedownloadandinstalllatestJavaRUNTIME Logged Fu-KwunHwang Administrator HeroMember Posts:3062 Howtoconvert2Dcollisioninto1D «Reply#1on:October28,2004,03:19:44pm» [img:53443ef2ad]http://www.phy.ntnu.edu.tw/demolab/phpBB/pics/2_2_collision2d.png[/img:53443ef2ad]1.Findthetimewhentwoballcollide:D=R1+R2 whereD=Distancebetweencenteroftwoballs,andR1/R2isradiusofeachballs2.Findthelineconnectcenteroftwoballs.andcalculatethecomponentofthevelocitryforeachballalonethelineconnectthosetwoballs. Forexample:VelocityforeachballisVaandVb(beforecollision) CalculateVapandVbp.(andanothernormalcomponentVan,Vbn)3.Itisbecomea1Dcollisionproblem:ballAwithvelocityVapcollidewithballBwithvelocityVbp.Youshouldbeabletocalculatevelocityaftercollisionforeachball. forexample: Vap2=((m1-m2)/(m1+m2))vap+(2m2/(m1+m2))Vbpand Vbp2=(2m1/(m1+m2))Vap+((m2-m1)/(m2+m1))Vbp ThetangentialcomponentisnotchangedVan2=Van,andVbn2=Vbn4.Calculatethevectorsumforvelocityofeachballaftercollision Va2=Vap2+Van2andVb2=Vb2p+Vbn2(vectorsummation) Logged siput_tiung Newbie Posts:3 topic4 «Reply#2on:March12,2005,12:41:59pm» hi,isthereanydifferencebetweenballsorhumanswhencollisionoccur?iamtryingtowriteahumanmodelforcollisioncases...andstilltryingvery2hardtomakeitinrealisticway.yourappletseemslikegoodformeandi'mimpressedwithit...perhapsitwouldbegoodtobeappliedtomyproject..canuexplainitindetailhow'sthecalculationforit?dividingitinto3condition,(1.before,2.during..,3.after..)wouldbereally2great...thanks..ref:http://www.phy.ntnu.edu.tw/ntnujava/viewtopic.php?t=19Regards,[email protected] Logged Fu-KwunHwang Administrator HeroMember Posts:3062 topic4 «Reply#3on:March12,2005,03:20:41pm» Theabovecalculationassumeitisanelasticcollisionbetweentwoballs.i.e.Noenergyislossduringthecollision.Andtheballwouldnotchangeshape.Forcollisionbetwentwohuman,wewillchangeourbodymovment.Wouldyouexplaininmoredetailwhyyouneedtocalculatecollisionbetweenhuman?Whiletwopersonsarewalkingor...? Logged siput_tiung Newbie Posts:3 topic4 «Reply#4on:March14,2005,11:07:58am» let'ssee...herei'mtryingtodocollisionavoidanceamonghuman...forexample...humanAistryingtogotopoint1...andifthereisanotherhumanblockinghisway...then..thehumanAmustavoidit..bychangingtootherdirectionandthen,gotopoint1..here...icandetectthecollisionifthereishumanblockinganotherhuman..but,ihaveproblemwithchangingdirection...tomakeitrealistic.. Logged Fu-KwunHwang Administrator HeroMember Posts:3062 topic4 «Reply#5on:March14,2005,03:33:38pm» Becauseyouwanttoavoidcollisionamonghuman.Sothereisnocollisionamonghuman.Youcancheckthevelocityvector,ifitispointingtoanotherperson.Thensomeoneisblockinghisway.Providethehorizontaldisplayment,youcancalculatetheleastchangeofthevelocity.Thepersoncanchangedirectionrightatthatpointorchangevelocitygradually. Logged siput_tiung Newbie Posts:3 topic4 «Reply#6on:March16,2005,03:41:52pm» thanks..igottheideanow.. Logged Fu-KwunHwang Administrator HeroMember Posts:3062 JavaCodeforcollisionin2D «Reply#7on:May11,2005,08:03:51am» Duetosomanyemailquestionsaskingforhelp.Ire-wrotethisposttoincludemoredetailcalculationsteps:Assumetheradiusfortwoballarer1andr2,andthecoordinatesare(x1,y1)and(x2,y2).Usually,wecalculatethedistancebetweentwoballsd=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));Thecollisionshouldhaveoccurredifdequalr1+r2;//if(d==r1+r2)However,thereisafinitetimestepdtinthesimulationcalculation,somostoftenwewouldnotbeabletofindtheabovecondition(exacttimewhentwoballrealoccurred).Sowecheckifd<=r1+r2;Thenweknowthecollisionshouldhaveoccurred.Therealcollisionshouldhaveoccurredbeforeyoudetectedthatthedistancebetweentwocenteroftheballsdislessthanthesumofthosetwoballsr1+r2.(d



請為這篇文章評分?