Professional Documents
Culture Documents
Ian Parberry
University of North Texas
Chapter 12 +otes
Wor# Clou#
Chapter 11 +otes
!ection 12(1:
+e&ton s , La&s
Chapter 12 +otes
Chapter 12 +otes
4)ery bo#y persists in its state o$ bein' at rest or o$ mo)in' uni$ormly strai'ht $or&ar#% e*cept inso$ar as it is compelle# to chan'e its state by $orce impresse#(
Chapter 12 +otes
Chapter 12 +otes
"he Force
Force is a )ector( It has units li-e -'(m6sec2% also calle# a Newton( 7Duct tape is li-e the $orce( It has a li'ht si#e% a #ar- si#e% an# it hol#s the uni)erse to'ether(8 2Carl 9&an:i'3
Chapter 12 +otes
Di$$erential 4Auations
When sol)in' problems analytically% this means sol)in' #i$$erential eAuations( We #on?t use any #i$$erential eAuations in this boo- because there are only a $e& simple cases that &e &ill loo- at analytically( +umerical metho#s o$ inte'ration must be use#( Later% &e e*amine 4uler inte'ration% &hich is the most simple metho# ima'inable% but also the one use# by most realBtime ri'i# bo#y simulators(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) 1C
Chapter 12 +otes
11
"o a passin' alien &ho is not acceleratin'% +e&ton s la&s &or- =ust $ine% an# there is no nee# to in)ent a $ictional $orce(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) 12
"o e)ery action there is al&ays an eAual an# opposite reaction( Fr% the $orces o$ t&o bo#ies on each other are al&ays eAual an# are #irecte# in opposite #irections(
Chapter 12 +otes
1,
Chapter 12 +otes
1.
4*ample
"here are $our $orces here( 1( Moe pushin' the bo*( 2( "he bo* pushin' Moe( ,( Moe pushin' the 4arth( .( "he 4arth pushin' Moe( +ote that an# cancel out(
Chapter 12 +otes
1/
Chapter 12 +otes
10
!ection 12(2:
Chapter 12 +otes
15
Chapter 12 +otes
1;
"his is not physically accurate% but then a'ain% neither is bein' able to =ump t&o or three times your o&n hei'ht% steer in mi#air% or #ouble =ump( When it comes to =umpin' in )i#eo 'ames% reality is not =ust o)errate#% it?s completely i'nore#( It =ust #oesn?t $eel ri'ht(
Chapter 12 +otes
1@
Chapter 12 +otes
2C
When realB&orl# 'ra)ity is use# to attain these hei'hts% the player is in the air too lon'% an# it $eels 7$loaty8( Many arca#e racin' 'ames increase 'ra)ity to 'et the car bac- on the 'roun# Auic-ly( "he player &ants to be in $ull control a'ain as Auic-ly as possible% an# &aitin' $or realB&orl# 'ra)ity to 'et them bac- #o&n usually ta-es too lon'( "here are other racin' 'ames that use a )alue o$ 'ra)ity that is less than the real &orl# )alue% to $acilitate unrealistic =umps at realistic )ehicle spee#s(
Chapter 12 +otes
21
Chapter 12 +otes
22
Chapter 12 +otes
2,
Friction
"he stan#ar# #ry $riction mo#el is sometimes calle# "o#lom! friction( CharlesBDu'ustin #e Coulomb 215,0B1;C03( 2Ima'e $rom Wi-ime#ia Commons(3
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) 2.
!tatic Friction
When an ob=ect is at rest on top o$ another ob=ect% a certain amount o$ $orce is reAuire# to 'et it unstuc- an# set it in motion( I$ any less $orce is applie#% the $orce o$ $riction &ill push bac- &ith a counteractin' $orce up to some ma*imum amount( "his is calle# static friction(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) 2/
!tatic Friction
"he $ollo&in' eAuation is a 'oo# appro*imation $or the ma*imum ma'nitu#e o$ static $riction: (
is a constant calle# the coefficient of static friction that #epen#s on the type o$ sur$aces rubbin' to'ether( Iust loo- it up in a table( is the ma'nitu#e o$ the normal $orce(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) 20
Chapter 12 +otes
25
Chapter 12 +otes
2;
Chapter 12 +otes
2@
+ot !li#in'
Fn the <rin-
!li#in'
Chapter 12 +otes
,C
Jinetic Friction
Fnce static $riction is o)ercome an# the ob=ect is mo)in'% $riction continues to push a'ainst the relati)e motion o$ the t&o sur$aces( "his is calle# $inetic friction( "he ma'nitu#e -inetic $riction is 'enerally less than that o$ static $riction( It s compute# the same &ay o$ static $riction: (
Chapter 12 +otes
,1
Chapter 12 +otes
,2
Chapter 12 +otes
,,
!prin' Forces
4)en i$ you #on?t see )ery many actual sprin's in a )i#eo 'ame% there are li-ely )ery many )irtual sprin's at &or-( !prin's e*hibit a 'eneral beha)ior that is )ery use$ul $or en$orcin' constraints% $or e*ample% pre)entin' ob=ects $rom o)erlappin'% cloth ren#erin'% an# ra'B #oll character animation(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) ,.
Control !ystems
"here are t&o types o$ sprin' motion% ampe oscillation an# #n ampe oscillation( D )irtual sprin' 2o$ten in the $orm o$ a sprin'B#amper system3 is a type o$ control system( "here are certain a#)anta'es to be ha# &hen the physical nature o$ the problem is #roppe# an# &e thin- o$ it purely in mathematical terms( In#ee#% many times the problem &as ne)er really physical to be'in &ith% an# &as only recast in physical terms so that the sprin'B#amper apparatus coul# be applie#(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) ,/
Chapter 12 +otes
,0
Chapter 12 +otes
,5
Eoo-e s La&
Robert Eoo-e 210,/ K15C,3( 2Ima'e $rom Wi-ime#ia Commons(3 "he ma'nitu#e o$ the restorati)e $orce is proportional to the #istance $rom the rest len'th 2pro)i#e# the $orce #oes not e*cee# the elastic limit o$ the material use# to construct the sprin'3(
Chapter 12 +otes
,;
Eoo-e s La&
Where is the spring constant that #escribes ho& sti$$ the sprin' is% is the sprin' s rest len'th% an# is the len'th that the sprin' has been stretche# or compresse# to(
Chapter 12 +otes
,@
Chapter 12 +otes
.1
Chapter 12 +otes
.2
Does MatterM
"o un#erstan# &here shoul# appear in % consi#er &hat happens to the 'raph o$ &hen &e chan'e the )alue o$ ( In other &or#s% &e repeat our physical e*periment an# )ary the sti$$ness o$ the sprin'( "he result is that lar'er )alues o$ 2sti$$er sprin's3 result in a 'raph that is hori:ontally compresse#: the $reAuency o$ oscillation is increase#( Li-e&ise% smaller )alues o$ J cause the sprin' to oscillate more slo&ly% an# the 'raph is e*pan#e#(
Chapter 12 +otes
..
Chapter 12 +otes
./
Dn'ular FreAuency
"he Auantity is calle# the ang#lar fre&#ency an# comes up o$ten enou'h that &e $in# it help$ul to intro#uce the notation L an# &e can &rite the solution as
Chapter 12 +otes
.0
Chapter 12 +otes
.5
Ds it turns out% the three )ariables &e ha)e =ust #iscusse# 2the amplitu#e% initial position% an# initial )elocity3 are interrelate#( I$ &e pic- any t&o% the )alue $or the thir# is $i*e#( We?ll -eep as is% but &e?ll replace an# &ith the phase offset % &hich #escribes &here in the cycle the sprin' is at ( D#=ustments to the phase o$$set ha)e the simple e$$ect o$ shi$tin' the 'raph hori:ontally on the time a*is(
Chapter 12 +otes
.;
Chapter 12 +otes
.@
Dampin' Forces
!o $ar% &e ha)e been stu#yin' a physically none*istent situation in &hich the sprin' &ill oscillate $ore)er( In reality% there are usually at least t&o more interestin' $orces% riving force an# friction( "he riving force is an e*ternal $orce% that acts as the input to the system an# causes the motion to be'in( 'riction &e ha)e alrea#y met( "he 'eneral term use# to #escribe any e$$ect that ten#s to re#uce the amplitu#e o$ an oscillatory system is amping% an# &e call oscillation &here the amplitu#e #ecays o)er time ampe oscillation( Dampin' $orces are use$ul in )i#eo 'ames% so let?s #iscuss them in more #etail(
Chapter 12 +otes
/C
Dampin' Force
"he #ampin' $orce is simply % &here in#icates the instantaneous ma'nitu#e an# #irection o$ the #ampin' $orce% is the instantaneous )elocity% an# is a constant that #escribes physical con#itions such as the )iscosity% rou'hness% etc(
Chapter 12 +otes
/1
Nualitati)e Fbser)ations
"he #ampin' $orce has an e*tremely simple $orm% but thin's 'et interestin' &hen &e stu#y motion o)er time( Nualitati)ely% &e can ma-e some basic pre#ictions about ho& #ampe# oscillation o$ a sprin' &oul# #i$$er $rom un#ampe# oscillation o$ the same sprin'( "he more ob)ious pre#iction is that &e &oul# e*pect the amplitu#e o$ oscillation to #ecay o)er time( Li-e the $orce o$ $riction% #ampin' remo)es ener'y $rom the system( "he secon# obser)ation is only sli'htly less ob)ious: !ince #ampin' in 'eneral slo&s the )elocity o$ the mass on the en# o$ the sprin'% &e &oul# e*pect the $reAuency o$ oscillation to be re#uce# compare# to un#ampe# oscillation( "hose t&o intuiti)e pre#ictions turn out to be correct% althou'h% o$ course% to be more speci$ic &e &ill nee# to analy:e the math(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) /2
Chapter 12 +otes
/.
Chapter 12 +otes
//
+o Ier-s Dllo&e#
For many control systems% the actual position an# set point are not use#O rather% only the error is nee#e#( F$ course% an ob)ious Auestion is% i$ &e -no& the #esire# )alue% &hy #on?t &e =ust use that #irectlyM <ecause it?s too =er-y( In the same &ay that the shoc-s an# sprin's on a car #on?t =ust pass alon' the ele)ation o$ the roa# #irectly to the car% a control system in a )i#eo 'ame is o$ten #esi'ne# to smooth out the bumps cause# by su##en state chan'es that mi'ht ma-e the camera snap to a ne& position or the player =er- into motion(
Chapter 12 +otes
/5
PD Controllers
"he camera or screenBspace hi'hli'ht are nonphysical e*amples in &hich the Auantity o$ mass is not really appropriate an# is #roppe#( <ut the #i$$erential eAuations are still the same% an# they ha)e the same solution( !trippe# o$ the sprin' metaphor% &e are le$t &ith &hat is -no&n as a PD controller( "he P stan#s $or proportional% an# this is the sprin' part o$ the controller% since it is proportional to the current error( "he #amper is the D part% &hich stan#s $or #eri)ati)e% because the action o$ the #amper at any 'i)en instant is proportional to the #eri)ati)e 2the )elocity3(
Chapter 12 +otes ,D Math Primer $or 1raphics & 1ame De) /;
Chapter 12 +otes
/@
Chapter 12 +otes
0C
"unin'
Di$$erent cars ha)e suspensions that are tune# #i$$erentlyO sports cars are ti'hter an# the cars retirees li-e to #ri)e are smoother( In the same &ay% &e tune our control systems to 'et the response &e li-e(
+otice that the co#e uses the an# $rom our earlier eAuations( Eo&e)er% most people #on?t $in# those to be the most intuiti)e #ials to ha)e $or t&ea-in'( Instea#% the #ampin' ratio an# $reAuency o$ oscillation are use# $or the #esi'ner inter$ace% &hile an# are compute# as #eri)e# Auantities( "o tune the $reAuency% &e mi'ht a#=ust either the #ampe# or un#ampe# )ersion% usin' either an'ular $reAuency or simply Eert:O the units an# absolute )alue are o$ten not important because the )alue that $eels 'oo# &ill be #etermine# e*perimentally any&ay(
Chapter 12 +otes
01
Dnother commonly use# control system is a simple $irst or#er la'% % un#er &hich the error #ecays e*ponentially( "his is similar to a critically #ampe# secon#Bor#er system% but &ith a bit =er-ier response to a su##en chan'e in the set point( Dnother common techniAue is to chase the set point at a $i*e# )elocity( D $ilter is another broa# class o$ control system in &hich the output is compute# by ta-in' some linear combination o$ set points or )alues on pre)ious $rames(
Chapter 12 +otes
02
!ection 12(,:
Momentum
Chapter 12 +otes
0,
Moe s <o*
!uppose Moe?s bo* has mass % an# at a certain instant &e obser)e it mo)in' &ith a )elocity (
Comin' in late to the story% &e cannot tell &hat ma'nitu#e o$ $orces &ere use# to achie)e that motion% or ho& lon' the $orces &ere applie#% or &hat the history o$ the bo*?s )elocity &as(
Chapter 12 +otes
0.
!ection 12(.:
Chapter 12 +otes
0/
!ection 12(/:
Rotational Dynamics
Chapter 12 +otes
00
!ection 12(0:
Chapter 12 +otes
05
Cur)es in ,D
Chapter 12 +otes
0;