%23%20%2F%2F%2F%20script%0A%23%20requires-python%20%3D%20%22%3E%3D3.11%22%0A%23%20dependencies%20%3D%20%5B%22marimo%3E%3D0.23.9%22%2C%20%22numpy%3E%3D2.0%22%2C%20%22matplotlib%3E%3D3.9%22%2C%20%22sympy%3E%3D1.13%22%5D%0A%23%20%2F%2F%2F%0A%0Aimport%20marimo%0A%0A__generated_with%20%3D%20%220.25.2%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20Path%20frame%0A%0A%20%20%20%20%3E%20Renato%20Naville%20Watanabe%2C%20Marcos%20Duarte%3Cbr%3E%0A%20%20%20%20%3E%20%5BLaboratory%20of%20Biomechanics%20and%20Motor%20Control%5D(https%3A%2F%2Fbmclab.pesquisa.ufabc.edu.br%2F)%3Cbr%3E%0A%20%20%20%20%3E%20Federal%20University%20of%20ABC%2C%20Brazil%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20How%20to%20use%20this%20guide%0A%0A%20%20%20%20Every%20notebook%20before%20this%20one%20describes%20motion%20with%20the%20same%20three%20axes%2C%20fixed%20to%20the%20laboratory%20floor.%20That%20is%20a%20fine%20choice%20for%20bookkeeping%20and%20a%20poor%20one%20for%20understanding.%20Fixed%20axes%20do%20not%20care%20where%20the%20body%20is%20going%2C%20so%20they%20report%20%22how%20fast%22%20and%20%22which%20way%22%20mixed%20together%20in%20every%20component.%0A%0A%20%20%20%20This%20notebook%20introduces%20a%20basis%20that%20travels%20*with*%20the%20particle%2C%20with%20its%20first%20axis%20always%20pointing%20where%20the%20particle%20is%20heading.%20In%20that%20basis%20the%20acceleration%20splits%20into%20two%20pieces%2C%20each%20with%20a%20plain%20physical%20meaning.%20One%20changes%20how%20fast%20you%20go.%20The%20other%20changes%20where%20you%20go.%20The%20split%20explains%20why%20a%20sprinter%20running%20the%20bend%20at%20constant%20speed%20is%20still%20accelerating%2C%20and%20it%20tells%20you%20where%20a%20projectile's%20path%20is%20tightest%20without%20drawing%20it.%0A%0A%20%20%20%20Read%20it%20in%20order%20and%20run%20each%20cell%20as%20you%20reach%20it.%20Where%20you%20find%20a%20**Challenge**%20or%20a%20set%20of%20**Guiding%20questions**%2C%20stop%20and%20answer%20on%20a%20scratchpad%20before%20moving%20on.%20Several%20of%20them%20ask%20you%20to%20predict%20a%20number%20*before*%20the%20code%20prints%20it%3B%20the%20prediction%20is%20the%20point%2C%20and%20being%20wrong%20is%20the%20most%20useful%20thing%20that%20can%20happen%20to%20you%20here.%0A%0A%20%20%20%20You%20will%20need%20the%20vector%20operations%20from%20%5BScalar%20and%20vector%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fscalar_vector.py)%2C%20mainly%20the%20norm%20and%20the%20cross%20product%2C%20and%20the%20definitions%20of%20velocity%20and%20acceleration%20from%20%5BKinematics%20of%20a%20particle%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinematics_particle.py).%0A%0A%20%20%20%20**Challenge%200.**%20Before%20you%20begin%2C%20think%20of%20a%20movement%20where%20the%20direction%20changes%20a%20lot%20but%20the%20speed%20hardly%20does%3A%20running%20a%20bend%2C%20cycling%20round%20a%20roundabout%2C%20the%20last%20turns%20of%20a%20hammer%20throw%2C%20a%20skater's%20arc.%20Write%20down%20whether%20you%20think%20the%20body%20is%20accelerating%20and%2C%20if%20so%2C%20in%20which%20direction.%20Keep%20your%20answer%20nearby%3B%20the%20checkpoint%20questions%20ask%20you%20to%20come%20back%20to%20it.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Running%20the%20bend%0A%0A%20%20%20%20In%20the%20200%20m%20the%20athletes%20run%20the%20first%20half%20of%20the%20race%20on%20a%20bend.%20On%20a%20standard%20400%20m%20track%20the%20inner%20edge%20of%20lane%201%20has%20a%20radius%20of%2036.5%20m%20and%20each%20lane%20is%201.22%20m%20wide%2C%20so%20the%20line%20an%20athlete%20runs%20has%20a%20radius%20of%20about%2037%20m%20in%20lane%201%20and%20about%2045%20m%20in%20lane%208.%0A%0A%20%20%20%20Suppose%20an%20athlete%20holds%20a%20perfectly%20steady%2010%20m%2Fs%20all%20the%20way%20round%20the%20bend.%20The%20speedometer%20never%20moves.%0A%0A%20%20%20%20**Is%20the%20athlete%20accelerating%3F**%0A%0A%20%20%20%20The%20speed%20is%20constant%2C%20but%20the%20velocity%20is%20not%3A%20its%20direction%20turns%20through%20%24180%5Eo%24%20in%20about%2011.5%20s.%20And%20in%20the%20laboratory's%20fixed%20axes%20the%20answer%20is%20surprisingly%20hard%20to%20see.%20With%20the%20centre%20of%20the%20bend%20at%20the%20origin%20and%20%24%5Cphi%20%3D%20v%5C%2Ct%2FR%24%20the%20angle%20travelled%2C%20the%20velocity%20is%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Bv%7D%7D(t)%20%3D%20v%5Cleft%5B-%5Csin(%5Cphi)%5C%2C%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%2B%20%5Ccos(%5Cphi)%5C%2C%5Chat%7B%5Cmathbf%7Bj%7D%7D%5Cright%5D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Both%20components%20swing%20up%20and%20down%20continuously.%20Nothing%20in%20either%20curve%20on%20its%20own%20says%20%22constant%20speed%2C%20turning%20at%20a%20steady%20rate%22%3B%20that%20information%20is%20smeared%20across%20the%20two%20of%20them.%20By%20the%20end%20of%20this%20notebook%20the%20same%20velocity%20will%20be%20written%20with%20a%20single%20term%2C%20and%20the%20acceleration%20with%20two%20terms%20that%20each%20say%20one%20thing.%0A%0A%20%20%20%20**Guiding%20questions%200.**%0A%0A%20%20%20%201.%20If%20the%20athlete%20is%20accelerating%2C%20something%20must%20be%20pushing.%20What%20is%20it%2C%20and%20in%20which%20direction%20does%20it%20push%3F%0A%20%20%20%202.%20At%20the%20same%20speed%2C%20who%20needs%20the%20larger%20push%3A%20the%20athlete%20in%20lane%201%20or%20the%20one%20in%20lane%208%3F%0A%20%20%20%203.%20The%20track%20is%20flat.%20Why%20do%20the%20athletes%20lean%20into%20the%20bend%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Python%20setup%0A%0A%20%20%20%20NumPy%20does%20the%20numerical%20work%20and%20Matplotlib%20the%20plots.%20SymPy%20appears%20in%20the%20last%20section%2C%20for%20the%20symbolic%20version%20of%20the%20same%20computation.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20numpy%20as%20np%0A%20%20%20%20import%20matplotlib%0A%20%20%20%20import%20matplotlib.pyplot%20as%20plt%0A%0A%20%20%20%20matplotlib.rc(%22axes%22%2C%20labelsize%3D13%2C%20titlesize%3D14)%0A%20%20%20%20matplotlib.rc(%22xtick%22%2C%20labelsize%3D11)%0A%20%20%20%20matplotlib.rc(%22ytick%22%2C%20labelsize%3D11)%0A%20%20%20%20matplotlib.rc(%22legend%22%2C%20fontsize%3D11)%0A%20%20%20%20return%20np%2C%20plt%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20A%20fixed%20basis%0A%0A%20%20%20%20We%20perceive%20the%20space%20around%20us%20as%20three-dimensional%2C%20and%20the%20usual%20way%20to%20describe%20it%20is%20the%20%5BCartesian%20coordinate%20system%5D(https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCartesian_coordinate_system)%20in%20%5BEuclidean%20space%5D(https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEuclidean_space)%3A%20three%20orthogonal%20axes%2C%20their%20directions%20fixed%20by%20the%20%5Bright-hand%20rule%5D(https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FRight-hand_rule)%20and%20labelled%20X%2C%20Y%20and%20Z.%20Because%20the%20axes%20are%20orthogonal%2C%20motion%20along%20one%20of%20them%20is%20independent%20of%20motion%20along%20the%20others%2C%20which%20is%20what%20makes%20the%20coordinate%20system%20so%20convenient%20in%20classical%20mechanics.%0A%0A%20%20%20%20%3Cfigure%20aria-describedby%3D%22figure-caption-1%22%3E%3Ccenter%3E%3Cimg%20src%3D%22https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2FCCS.png%3Fraw%3D1%22%20width%3D350%20alt%3D%22Cartesian%20coordinate%20system%22%2F%3E%3C%2Fcenter%3E%3C%2Ffigure%3E%0A%0A%20%20%20%20%3Cspan%20id%3D%22figure-caption-1%22%20class%3D%22figure-caption%22%20style%3D%22display%3Ablock%3Btext-align%3Acenter%3Bfont-style%3Aitalic%22%3EFigure.%20Representation%20of%20a%20point%20and%20its%20position%20vector%20in%20a%20Cartesian%20coordinate%20system.%3C%2Fspan%3E%0A%0A%20%20%20%20In%20biomechanics%20we%20use%20several%20coordinate%20systems%20at%20once%2C%20and%20call%20them%20global%2C%20laboratory%2C%20local%2C%20anatomical%20or%20technical%20reference%20frames%2C%20depending%20on%20what%20they%20are%20attached%20to.%20Whatever%20the%20name%2C%20each%20is%20defined%20by%20a%20%3Ca%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBasis_(linear_algebra)%22%3Ebasis%3C%2Fa%3E%3A%20a%20set%20of%20mutually%20orthogonal%20unit%20vectors%20(**versors**)%20from%20which%20any%20vector%20can%20be%20built%20by%20%5Blinear%20combination%5D(https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FLinear_combination).%20Such%20a%20set%20is%20called%20an%20**orthonormal%20basis**.%0A%0A%20%20%20%20%3Cfigure%20aria-describedby%3D%22figure-caption-2%22%3E%3Ccenter%3E%3Cimg%20src%3D%22https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2Fvector3Dijk.png%3Fraw%3D1%22%20width%3D350%20alt%3D%22versors%20of%20the%20Cartesian%20basis%22%2F%3E%3C%2Fcenter%3E%3C%2Ffigure%3E%0A%0A%20%20%20%20%3Cspan%20id%3D%22figure-caption-2%22%20class%3D%22figure-caption%22%20style%3D%22display%3Ablock%3Btext-align%3Acenter%3Bfont-style%3Aitalic%22%3EFigure.%20Representation%20of%20a%20point%20%24%5Cmathbf%7BP%7D%24%20and%20its%20position%20vector%20%24%5Cvec%7B%5Cmathbf%7Br%7D%7D%24%20in%20a%20Cartesian%20coordinate%20system.%20The%20versors%20%24%5Chat%7B%5Cmathbf%7Bi%7D%7D%2C%5C%2C%20%5Chat%7B%5Cmathbf%7Bj%7D%7D%2C%5C%2C%20%5Chat%7B%5Cmathbf%7Bk%7D%7D%24%20form%20a%20basis%20for%20this%20coordinate%20system%20and%20are%20usually%20drawn%20in%20the%20colour%20sequence%20RGB%20(red%2C%20green%2C%20blue).%3C%2Fspan%3E%0A%0A%20%20%20%20In%20the%20Cartesian%20coordinate%20system%20itself%2C%20the%20versors%20of%20this%20basis%20have%20the%20coordinates%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%3D%20%5Cbegin%7Bbmatrix%7D1%5C%5C0%5C%5C0%20%5Cend%7Bbmatrix%7D%2C%20%5Cquad%20%5Chat%7B%5Cmathbf%7Bj%7D%7D%20%3D%20%5Cbegin%7Bbmatrix%7D0%5C%5C1%5C%5C0%20%5Cend%7Bbmatrix%7D%2C%20%5Cquad%20%5Chat%7B%5Cmathbf%7Bk%7D%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%200%20%5C%5C%200%20%5C%5C%201%20%5Cend%7Bbmatrix%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20and%20the%20position%20vector%20of%20the%20point%20is%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Br%7D%7D%20%3D%20x%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%2B%20y%5Chat%7B%5Cmathbf%7Bj%7D%7D%20%2B%20z%5Chat%7B%5Cmathbf%7Bk%7D%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20This%20basis%20is%20fixed%3A%20it%20does%20not%20know%20or%20care%20where%20the%20particle%20is%20going.%20That%20indifference%20is%20exactly%20what%20made%20the%20velocity%20on%20the%20bend%20look%20complicated.%20For%20many%20problems%20a%20fixed%20basis%20leads%20to%20needlessly%20complex%20expressions%2C%20and%20the%20fix%20is%20to%20choose%20a%20basis%20that%20moves.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20The%20path%20basis%0A%0A%20%20%20%20Consider%20a%20particle%20moving%20along%20a%20path%2C%20with%20its%20position%20described%20in%20the%20fixed%20reference%20frame%20by%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Br%7D%7D(t)%20%3D%20x(t)%5C%2C%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%2B%20y(t)%5C%2C%5Chat%7B%5Cmathbf%7Bj%7D%7D%20%2B%20z(t)%5C%2C%5Chat%7B%5Cmathbf%7Bk%7D%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20As%20it%20moves%2C%20the%20particle%20covers%20a%20distance%20%24s(t)%24%20measured%20along%20the%20path%3A%20the%20**arc%20length**.%20The%20rate%20at%20which%20the%20arc%20length%20grows%20is%20the%20speed%2C%20%24ds%2Fdt%20%3D%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%24.%0A%0A%20%20%20%20%3Cfigure%20aria-describedby%3D%22figure-caption-3%22%3E%3Ccenter%3E%3Cimg%20src%3D%22https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2FvelRefFrame.png%3Fraw%3D1%22%20width%3D500%20alt%3D%22position%20vector%20of%20a%20moving%20particle%22%2F%3E%3C%2Fcenter%3E%3C%2Ffigure%3E%0A%0A%20%20%20%20%3Cspan%20id%3D%22figure-caption-3%22%20class%3D%22figure-caption%22%20style%3D%22display%3Ablock%3Btext-align%3Acenter%3Bfont-style%3Aitalic%22%3EFigure.%20Position%20vector%20of%20a%20moving%20particle%20in%20relation%20to%20a%20coordinate%20system.%3C%2Fspan%3E%0A%0A%20%20%20%20Instead%20of%20describing%20every%20kinematic%20variable%20in%20the%20fixed%20frame%2C%20we%20attach%20a%20basis%20to%20the%20particle%20itself%20and%20let%20it%20travel%20along%20the%20path.%20Its%20three%20versors%20are%20built%20one%20at%20a%20time.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Tangential%20versor%0A%0A%20%20%20%20The%20natural%20first%20choice%20is%20a%20unit%20vector%20in%20the%20direction%20of%20the%20velocity%2C%20which%20is%20to%20say%20the%20direction%20the%20particle%20is%20going%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%3D%20%5Cfrac%7B%5Cvec%7B%5Cmathbf%7Bv%7D%7D%7D%7B%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20It%20is%20tangent%20to%20the%20path%20at%20every%20instant.%20Note%20the%20division%3A%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20exists%20only%20while%20the%20particle%20moves.%20At%20an%20instant%20of%20zero%20speed%20it%20is%20undefined.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20**Exercise%201.**%20For%20%24%5Cmathbf%20r(t)%3D(3t%2C4t)%24%20m%2C%20find%20speed%20and%20the%20tangent.%20Can%20you%20define%20a%20principal%20normal%3F%0A%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Worked%20solution%20%E2%80%94%20Exercise%201%0A%0A%20%20%20%20%24%5Cmathbf%20v%3D(3%2C4)%24%20m%2Fs%2C%20so%20%24v%3D5%24%20m%2Fs%20and%20%24%5Cmathbf%20e_t%3D(3%2F5%2C4%2F5)%24.%20The%20tangent%20does%20not%20turn%3B%20curvature%20is%20zero.%20Dividing%20its%20zero%20derivative%20by%20its%20norm%20is%20undefined%2C%20so%20there%20is%20no%20unique%20principal%20normal.%0A%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Normal%20versor%0A%0A%20%20%20%20For%20the%20second%20versor%20we%20first%20define%20the%20**curvature%20vector**%20of%20the%20path%2C%20the%20rate%20at%20which%20the%20tangential%20versor%20changes%20per%20metre%20travelled%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7BC%7D%7D%20%3D%20%5Cfrac%7Bd%5Chat%7B%5Cmathbf%7Be%7D%7D_t%7D%7Bds%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Because%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20depends%20on%20time%20only%20through%20the%20arc%20length%20%24s(t)%24%2C%20the%20chain%20rule%20converts%20this%20into%20something%20we%20can%20compute%20from%20a%20trajectory%20sampled%20in%20time%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cfrac%7Bd%5Chat%7B%5Cmathbf%7Be%7D%7D_t%7D%7Bdt%7D%20%3D%20%5Cfrac%7Bd%5Chat%7B%5Cmathbf%7Be%7D%7D_t%7D%7Bds%7D%5Cfrac%7Bds%7D%7Bdt%7D%0A%20%20%20%20%5Cquad%20%5CLongrightarrow%20%5Cquad%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7BC%7D%7D%20%3D%20%5Cfrac%7Bd%5Chat%7B%5Cmathbf%7Be%7D%7D_t%2Fdt%7D%7Bds%2Fdt%7D%20%3D%20%5Cfrac%7B1%7D%7B%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%7D%5Cfrac%7Bd%5Chat%7B%5Cmathbf%7Be%7D%7D_t%7D%7Bdt%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20The%20curvature%20vector%20has%20two%20properties%20worth%20understanding%20rather%20than%20memorizing.%0A%0A%20%20%20%20-%20**It%20is%20perpendicular%20to%20the%20path.**%20A%20unit%20vector%20can%20change%20its%20direction%20but%20never%20its%20length.%20Differentiating%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%5Ccdot%20%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%3D%201%24%20gives%20%242%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%5Ccdot%20d%5Chat%7B%5Cmathbf%7Be%7D%7D_t%2Fds%20%3D%200%24%2C%20so%20%24%5Cvec%7B%5Cmathbf%7BC%7D%7D%24%20has%20no%20component%20along%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24.%20It%20points%20to%20the%20side%20the%20path%20is%20bending%20towards.%0A%20%20%20%20-%20**Its%20magnitude%20measures%20how%20sharply%20the%20path%20bends.**%20%24%5Ckappa%20%3D%20%5CVert%5Cvec%7B%5Cmathbf%7BC%7D%7D%5CVert%24%20is%20the%20**curvature**%3A%20the%20angle%20the%20direction%20of%20motion%20turns%20through%20per%20metre%20travelled%2C%20in%20rad%2Fm.%20Its%20inverse%2C%20%24%5Crho%20%3D%201%2F%5Ckappa%24%2C%20is%20the%20**radius%20of%20curvature**%2C%20the%20radius%20of%20the%20circle%20that%20best%20fits%20the%20path%20at%20that%20point.%20A%20straight%20line%20has%20%24%5Ckappa%20%3D%200%24%20and%20%24%5Crho%20%3D%20%5Cinfty%24%3B%20a%20circle%20of%20radius%20%24R%24%20has%20%24%5Ckappa%20%3D%201%2FR%24%20everywhere.%0A%0A%20%20%20%20The%20second%20versor%20of%20the%20basis%20is%20the%20direction%20of%20the%20curvature%20vector%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Chat%7B%5Cmathbf%7Be%7D%7D_n%20%3D%20%5Cfrac%7B%5Cvec%7B%5Cmathbf%7BC%7D%7D%7D%7B%5CVert%5Cvec%7B%5Cmathbf%7BC%7D%7D%5CVert%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Like%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%2C%20it%20comes%20with%20a%20condition.%20Where%20the%20path%20is%20straight%2C%20%24%5Cvec%7B%5Cmathbf%7BC%7D%7D%20%3D%200%24%20and%20there%20is%20no%20direction%20to%20normalize%3A%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20is%20undefined.%0A%0A%20%20%20%20%3Cfigure%20aria-describedby%3D%22figure-caption-4%22%3E%3Ccenter%3E%3Cimg%20src%3D%22https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2FvelRefFrameeten.png%3Fraw%3D1%22%20width%3D500%20alt%3D%22path%20basis%20of%20a%20moving%20particle%22%2F%3E%3C%2Fcenter%3E%3C%2Ffigure%3E%0A%0A%20%20%20%20%3Cspan%20id%3D%22figure-caption-4%22%20class%3D%22figure-caption%22%20style%3D%22display%3Ablock%3Btext-align%3Acenter%3Bfont-style%3Aitalic%22%3EFigure.%20A%20moving%20particle%20and%20a%20corresponding%20path%20basis.%3C%2Fspan%3E%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Binormal%20versor%0A%0A%20%20%20%20The%20third%20versor%20completes%20a%20right-handed%20basis.%20It%20is%20the%20cross%20product%20of%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%2C%20in%20that%20order%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Chat%7B%5Cmathbf%7Be%7D%7D_b%20%3D%20%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%5Ctimes%20%5Chat%7B%5Cmathbf%7Be%7D%7D_n%0A%20%20%20%20%24%24%0A%0A%20%20%20%20The%20three%20versors%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%2C%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_b%24%20travel%20and%20turn%20together%20with%20the%20particle.%20The%20basis%20is%20known%20as%20the%20**Frenet%E2%80%93Serret%20frame**.%0A%0A%20%20%20%20For%20a%20path%20that%20stays%20in%20one%20plane%2C%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20both%20lie%20in%20that%20plane%2C%20so%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_b%24%20is%20perpendicular%20to%20it%20and%20can%20only%20be%20%24%2B%5Chat%7B%5Cmathbf%7Bk%7D%7D%24%20or%20%24-%5Chat%7B%5Cmathbf%7Bk%7D%7D%24.%20Its%20sign%20tells%20you%20which%20way%20the%20path%20turns%3A%20counterclockwise%20for%20%24%2B%5Chat%7B%5Cmathbf%7Bk%7D%7D%24%2C%20clockwise%20for%20%24-%5Chat%7B%5Cmathbf%7Bk%7D%7D%24.%0A%0A%20%20%20%20**Challenge%201.**%20A%20particle%20moves%20along%20a%20straight%20line%2C%20%24%5Cvec%7B%5Cmathbf%7Br%7D%7D(t)%20%3D%2010t%5C%2C%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%2B%205t%5C%2C%5Chat%7B%5Cmathbf%7Bj%7D%7D%24.%20Work%20out%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%2C%20%24%5Cvec%7B%5Cmathbf%7BC%7D%7D%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20by%20hand.%20Which%20of%20the%20three%20versors%20exists%3F%20Then%20predict%20what%20the%20numerical%20code%20later%20in%20this%20notebook%20will%20print%20when%20you%20feed%20it%20this%20path%2C%20and%20try%20it.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Velocity%20and%20acceleration%20in%20the%20path%20frame%0A%0A%20%20%20%20%23%23%23%20Velocity%0A%0A%20%20%20%20In%20the%20fixed%20frame%2C%20the%20velocity%20is%20the%20time%20derivative%20of%20each%20coordinate%20(see%20%5BKinematics%20of%20a%20particle%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinematics_particle.py))%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Bv%7D%7D(t)%20%3D%20%5Cdot%7Bx%7D%5C%2C%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%2B%20%5Cdot%7By%7D%5C%2C%5Chat%7B%5Cmathbf%7Bj%7D%7D%20%2B%20%5Cdot%7Bz%7D%5C%2C%5Chat%7B%5Cmathbf%7Bk%7D%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20In%20the%20path%20frame%20it%20takes%20one%20term.%20By%20the%20definition%20of%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%2C%20all%20of%20the%20velocity%20lies%20along%20it%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Bv%7D%7D%20%3D%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%0A%20%20%20%20%24%24%0A%0A%20%20%20%20This%20is%20not%20a%20result%3B%20it%20is%20the%20definition%20of%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20read%20backwards.%20The%20payoff%20comes%20when%20we%20differentiate%20it.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Acceleration%0A%0A%20%20%20%20In%20the%20fixed%20frame%2C%20the%20acceleration%20is%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Ba%7D%7D(t)%20%3D%20%5Cddot%7Bx%7D%5C%2C%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%2B%20%5Cddot%7By%7D%5C%2C%5Chat%7B%5Cmathbf%7Bj%7D%7D%20%2B%20%5Cddot%7Bz%7D%5C%2C%5Chat%7B%5Cmathbf%7Bk%7D%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20In%20the%20path%20frame%2C%20differentiate%20%24%5Cvec%7B%5Cmathbf%7Bv%7D%7D%20%3D%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20with%20the%20product%20rule.%20The%20versor%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20is%20not%20constant%2C%20so%20it%20gets%20differentiated%20too%2C%20and%20the%20chain%20rule%20turns%20its%20derivative%20into%20the%20curvature%20vector%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cbegin%7Baligned%7D%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Ba%7D%7D%20%26%3D%20%5Cfrac%7Bd%5Cvec%7B%5Cmathbf%7Bv%7D%7D%7D%7Bdt%7D%20%3D%20%5Cfrac%7Bd%5Cleft(%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%5Cright)%7D%7Bdt%7D%20%5C%5C%0A%20%20%20%20%26%3D%20%5Cfrac%7Bd%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%7D%7Bdt%7D%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%2B%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5C%2C%5Cfrac%7Bd%5Chat%7B%5Cmathbf%7Be%7D%7D_t%7D%7Bdt%7D%20%5C%5C%0A%20%20%20%20%26%3D%20%5Cfrac%7Bd%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%7D%7Bdt%7D%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%2B%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5C%2C%5Cfrac%7Bd%5Chat%7B%5Cmathbf%7Be%7D%7D_t%7D%7Bds%7D%5Cfrac%7Bds%7D%7Bdt%7D%20%5C%5C%0A%20%20%20%20%26%3D%20%5Cfrac%7Bd%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%7D%7Bdt%7D%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%2B%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5E2%5C%2C%5CVert%5Cvec%7B%5Cmathbf%7BC%7D%7D%5CVert%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_n%0A%20%20%20%20%5Cend%7Baligned%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Replacing%20%24%5CVert%5Cvec%7B%5Cmathbf%7BC%7D%7D%5CVert%24%20by%20the%20radius%20of%20curvature%2C%20%24%5Crho%20%3D%201%2F%5CVert%5Cvec%7B%5Cmathbf%7BC%7D%7D%5CVert%24%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Ba%7D%7D%20%3D%20%5Cunderbrace%7B%5Cfrac%7Bd%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%7D%7Bdt%7D%7D_%7Ba_t%7D%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%2B%20%5Cunderbrace%7B%5Cfrac%7B%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5E2%7D%7B%5Crho%7D%7D_%7Ba_n%7D%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_n%0A%20%20%20%20%24%24%0A%0A%20%20%20%20This%20is%20the%20equation%20the%20notebook%20has%20been%20building%20to%2C%20and%20each%20term%20says%20exactly%20one%20thing%3A%0A%0A%20%20%20%20-%20The%20**tangential%20acceleration**%2C%20%24a_t%24%2C%20is%20the%20rate%20of%20change%20of%20the%20speed.%20It%20makes%20the%20particle%20go%20faster%20or%20slower%20and%20has%20no%20effect%20on%20the%20direction.%0A%20%20%20%20-%20The%20**normal**%20(or%20centripetal)%20**acceleration**%2C%20%24a_n%24%2C%20turns%20the%20velocity.%20It%20changes%20the%20direction%20and%20has%20no%20effect%20on%20the%20speed.%20It%20always%20points%20to%20the%20inside%20of%20the%20curve%2C%20and%20it%20grows%20with%20the%20*square*%20of%20the%20speed.%0A%20%20%20%20-%20There%20is%20no%20third%20term.%20The%20acceleration%20always%20lies%20in%20the%20plane%20of%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%3B%20its%20component%20along%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_b%24%20is%20zero%20by%20construction.%0A%0A%20%20%20%20Back%20to%20the%20bend.%20The%20speed%20is%20constant%2C%20so%20%24a_t%20%3D%200%24.%20The%20radius%20is%20about%2037%20m%2C%20so%0A%0A%20%20%20%20%24%24%0A%20%20%20%20a_n%20%3D%20%5Cfrac%7B(10%5C%3B%5Cmathrm%7Bm%2Fs%7D)%5E2%7D%7B37%5C%3B%5Cmathrm%7Bm%7D%7D%20%5Capprox%202.7%5C%3B%5Cmathrm%7Bm%2Fs%5E2%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20pointing%20to%20the%20centre%20of%20the%20bend.%20That%20is%20more%20than%20a%20quarter%20of%20the%20gravitational%20acceleration%2C%20sustained%20for%20the%20whole%20bend%2C%20and%20the%20only%20thing%20that%20can%20supply%20the%20force%20behind%20it%20is%20the%20ground%2C%20through%20the%20athlete's%20feet.%0A%0A%20%20%20%20For%20motion%20on%20a%20circle%20of%20radius%20%24r%24%2C%20%24%5Crho%20%3D%20r%24%20and%20the%20speed%20is%20%24%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%20%3D%20r%5Comega%24%2C%20so%20%24a_n%20%3D%20%5Comega%5E2%20r%24%3A%20the%20centripetal%20acceleration%20of%20circular%20motion%2C%20which%20reappears%20in%20%5BAngular%20kinematics%20in%20a%20plane%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinematics_angular_2d.py).%0A%0A%20%20%20%20**Guiding%20questions%201.**%0A%0A%20%20%20%201.%20A%20cyclist%20brakes%20while%20riding%20round%20a%20roundabout.%20Sketch%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%2C%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20and%20the%20acceleration%20vector.%20Is%20the%20acceleration%20pointing%20to%20the%20centre%20of%20the%20roundabout%3F%0A%20%20%20%202.%20At%20the%20top%20of%20a%20projectile's%20flight%20the%20speed%20is%20momentarily%20not%20changing.%20Which%20of%20the%20two%20terms%20is%20zero%20there%2C%20and%20which%20one%20carries%20all%20of%20%24g%24%3F%0A%20%20%20%203.%20A%20ball%20thrown%20straight%20up%20stops%20for%20an%20instant%20at%20the%20top.%20What%20happens%20to%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20at%20that%20instant%3F%20Is%20the%20acceleration%20zero%3F%0A%20%20%20%204.%20Double%20the%20speed%20on%20the%20same%20bend.%20By%20what%20factor%20does%20the%20normal%20acceleration%20change%3F%20And%20the%20force%20the%20athlete's%20legs%20must%20supply%20sideways%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20**Exercise%202.**%20A%20runner%20moves%20at%206%20m%2Fs%20around%20a%2012%20m%20radius%20bend%20while%20increasing%20speed%20at%202%20m%2Fs%C2%B2.%20Find%20both%20acceleration%20components%20and%20the%20magnitude.%0A%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Worked%20solution%20%E2%80%94%20Exercise%202%0A%0A%20%20%20%20%24a_t%3Ddv%2Fdt%3D2%24%20m%2Fs%C2%B2%20and%20%24a_n%3Dv%5E2%2F%5Crho%3D36%2F12%3D3%24%20m%2Fs%C2%B2.%20They%20are%20perpendicular%2C%20giving%20%24%7Ca%7C%3D%5Csqrt%7B13%7D%3D3.606%24%20m%2Fs%C2%B2%2C%20directed%20inward%20and%20forward.%0A%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Example%3A%20the%20path%20of%20a%20projectile%0A%0A%20%20%20%20Consider%20a%20particle%20following%20the%20path%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7B%5Cmathbf%7Br%7D%7D(t)%20%3D%20(10t%2B100)%5C%2C%5Chat%7B%5Cmathbf%7Bi%7D%7D%20%2B%20%5Cleft(-%5Cfrac%7B9.81%7D%7B2%7Dt%5E2%2B50t%2B100%5Cright)%5Chat%7B%5Cmathbf%7Bj%7D%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20This%20is%20the%20path%20of%20a%20projectile%20(see%20%5BProjectile%20motion%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fprojectile_motion.py))%20launched%20from%20the%20point%20%24(100%2C%20100)%24%20m%20with%20a%20horizontal%20velocity%20of%2010%20m%2Fs%20and%20a%20vertical%20velocity%20of%2050%20m%2Fs.%20It%20is%20a%20good%20first%20example%20precisely%20because%20we%20already%20know%20the%20answer%3A%20the%20acceleration%20is%20%24(0%2C%20-9.81)%5C%3B%5Cmathrm%7Bm%2Fs%5E2%7D%24%20at%20every%20instant%2C%20and%20at%20the%20top%20of%20the%20flight%2C%20reached%20at%20%24t%20%3D%2050%2F9.81%20%3D%205.10%24%20s%2C%20the%20velocity%20is%20horizontal%20and%20equal%20to%2010%20m%2Fs.%20Whatever%20the%20path%20frame%20says%20has%20to%20be%20consistent%20with%20that.%0A%0A%20%20%20%20**Before%20you%20run%20the%20next%20cells**%2C%20predict%20two%20things%3A%0A%0A%20%20%20%201.%20Where%20along%20the%20path%20is%20the%20curvature%20largest%3F%0A%20%20%20%202.%20What%20is%20the%20radius%20of%20curvature%20there%3F%20(Guiding%20question%201.2%20is%20the%20hint.)%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Solving%20numerically%0A%0A%20%20%20%20We%20start%20numerically%2C%20because%20that%20is%20the%20method%20you%20need%20when%20there%20is%20no%20formula%20for%20the%20path%2C%20which%20is%20the%20usual%20situation%20in%20biomechanics%2C%20where%20the%20path%20comes%20from%20measured%20data.%0A%0A%20%20%20%20To%20mimic%20that%20situation%2C%20we%20sample%20the%20expression%20above%20at%20100%20Hz%2C%20a%20typical%20rate%20for%20motion%20capture%2C%20and%20from%20then%20on%20pretend%20we%20do%20not%20know%20where%20the%20numbers%20came%20from%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(np)%3A%0A%20%20%20%20g%20%3D%209.81%20%20%23%20m%2Fs2%0A%20%20%20%20dt%20%3D%200.01%20%20%23%20s%2C%20100%20Hz%0A%20%20%20%20t%20%3D%20np.arange(0%2C%2010%20%2B%20dt%20%2F%202%2C%20dt)%0A%20%20%20%20r%20%3D%20np.column_stack((10%20*%20t%20%2B%20100%2C%20-g%20%2F%202%20*%20t**2%20%2B%2050%20*%20t%20%2B%20100))%0A%0A%20%20%20%20print(f%22%7Blen(t)%7D%20samples%2C%20from%20t%20%3D%20%7Bt%5B0%5D%7D%20s%20to%20t%20%3D%20%7Bt%5B-1%5D%3A.2f%7D%20s%22)%0A%20%20%20%20return%20dt%2C%20g%2C%20r%2C%20t%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Every%20derivative%20now%20becomes%20a%20finite%20difference.%20We%20use%20%60numpy.gradient%60%2C%20which%20takes%20*central*%20differences%2C%20%24(%5Cvec%7B%5Cmathbf%7Br%7D%7D_%7Bi%2B1%7D%20-%20%5Cvec%7B%5Cmathbf%7Br%7D%7D_%7Bi-1%7D)%2F(2%5CDelta%20t)%24.%20Unlike%20%60numpy.diff%60%2C%20it%20returns%20an%20array%20of%20the%20same%20length%20as%20its%20input%20and%20aligned%20with%20it%20in%20time.%20A%20forward%20difference%20is%20half%20a%20sample%20late%20and%20one%20sample%20short%2C%20and%20those%20offsets%20pile%20up%20when%20you%20differentiate%20twice%2C%20as%20we%20are%20about%20to.%20The%20option%20%60edge_order%3D2%60%20keeps%20the%20first%20and%20last%20samples%20accurate%20as%20well.%0A%0A%20%20%20%20The%20tangential%20versor%20is%20the%20velocity%20divided%20by%20the%20speed%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(dt%2C%20np%2C%20r)%3A%0A%20%20%20%20v%20%3D%20np.gradient(r%2C%20dt%2C%20axis%3D0%2C%20edge_order%3D2)%0A%20%20%20%20speed%20%3D%20np.linalg.norm(v%2C%20axis%3D1)%0A%0A%20%20%20%20e_t%20%3D%20v%20%2F%20speed%5B%3A%2C%20np.newaxis%5D%0A%20%20%20%20return%20e_t%2C%20speed%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20curvature%20vector%20is%20the%20time%20derivative%20of%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20divided%20by%20the%20speed%2C%20and%20the%20normal%20versor%20is%20its%20direction%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(dt%2C%20e_t%2C%20np%2C%20speed)%3A%0A%20%20%20%20C%20%3D%20np.gradient(e_t%2C%20dt%2C%20axis%3D0%2C%20edge_order%3D2)%20%2F%20speed%5B%3A%2C%20np.newaxis%5D%0A%20%20%20%20kappa%20%3D%20np.linalg.norm(C%2C%20axis%3D1)%0A%0A%20%20%20%20e_n%20%3D%20C%20%2F%20kappa%5B%3A%2C%20np.newaxis%5D%0A%20%20%20%20return%20e_n%2C%20kappa%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Let's%20draw%20the%20two%20versors%20along%20the%20path.%20The%20function%20below%20plots%20any%20set%20of%20vectors%20at%20regularly%20spaced%20points%20of%20a%20planar%20path.%20It%20keeps%20the%20two%20axes%20at%20the%20same%20scale%3A%20without%20that%2C%20perpendicular%20vectors%20are%20drawn%20at%20the%20wrong%20angle%20to%20each%20other%2C%20and%20the%20whole%20point%20of%20the%20picture%20is%20lost.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.function%0Adef%20plot_path_vectors(r%2C%20vectors%2C%20labels%2C%20step%3D50%2C%20scale%3D1.0%2C%20title%3D%22%22)%3A%0A%20%20%20%20%22%22%22Plot%20a%20planar%20path%20with%20vectors%20drawn%20at%20every%20%60step%60-th%20sample.%0A%0A%20%20%20%20%60r%60%20holds%20the%20positions%20%5Bm%5D%20in%20rows%3B%20each%20array%20in%20%60vectors%60%20holds%20one%0A%20%20%20%20vector%20per%20row%20of%20%60r%60.%20The%20vectors%20are%20multiplied%20by%20%60scale%60%20before%20being%0A%20%20%20%20drawn%2C%20and%20are%20coloured%20red%2C%20green%20and%20blue%2C%20in%20that%20order.%0A%20%20%20%20%22%22%22%0A%20%20%20%20import%20matplotlib.pyplot%20as%20plt%0A%0A%20%20%20%20_%2C%20ax%20%3D%20plt.subplots(figsize%3D(7%2C%206))%0A%20%20%20%20ax.plot(r%5B%3A%2C%200%5D%2C%20r%5B%3A%2C%201%5D%2C%20color%3D%220.6%22%2C%20linewidth%3D2%2C%20zorder%3D0)%0A%20%20%20%20idx%20%3D%20slice(0%2C%20None%2C%20step)%0A%20%20%20%20for%20vec%2C%20label%2C%20color%20in%20zip(vectors%2C%20labels%2C%20%5B%22tab%3Ared%22%2C%20%22tab%3Agreen%22%2C%20%22tab%3Ablue%22%5D)%3A%0A%20%20%20%20%20%20%20%20ax.quiver(%0A%20%20%20%20%20%20%20%20%20%20%20%20r%5Bidx%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20r%5Bidx%2C%201%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20scale%20*%20vec%5Bidx%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20scale%20*%20vec%5Bidx%2C%201%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20angles%3D%22xy%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20scale_units%3D%22xy%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20scale%3D1%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20width%3D0.005%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20color%3Dcolor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20label%3Dlabel%2C%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20ax.set_aspect(%22equal%22)%0A%20%20%20%20ax.margins(0.12)%0A%20%20%20%20ax.set_xlabel(%22x%20%5Bm%5D%22)%0A%20%20%20%20ax.set_ylabel(%22y%20%5Bm%5D%22)%0A%20%20%20%20ax.set_title(title)%0A%20%20%20%20ax.legend(loc%3D%22lower%20center%22)%0A%20%20%20%20plt.tight_layout()%0A%20%20%20%20plt.show()%0A%0A%0A%40app.cell%0Adef%20_(e_n%2C%20e_t%2C%20r)%3A%0A%20%20%20%20plot_path_vectors(%0A%20%20%20%20%20%20%20%20r%2C%0A%20%20%20%20%20%20%20%20%5Be_t%2C%20e_n%5D%2C%0A%20%20%20%20%20%20%20%20%5Br%22%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%22%2C%20r%22%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%22%5D%2C%0A%20%20%20%20%20%20%20%20scale%3D10%2C%0A%20%20%20%20%20%20%20%20title%3D%22Path%20basis%20along%20the%20trajectory%20(versors%20drawn%2010%20m%20long)%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20red%20versor%20follows%20the%20path%2C%20and%20the%20green%20one%20always%20points%20to%20the%20inside%20of%20the%20curve%2C%20which%20for%20a%20projectile%20is%20always%20somewhere%20downwards.%20The%20pair%20rotates%20clockwise%20from%20launch%20to%20landing.%0A%0A%20%20%20%20Now%20the%20components%20of%20the%20acceleration.%20The%20tangential%20component%20is%20the%20time%20derivative%20of%20the%20speed%3B%20the%20normal%20component%20is%20the%20curvature%20times%20the%20squared%20speed.%20Here%20are%20a%20few%20instants%20along%20the%20flight%2C%20including%20the%20top%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(dt%2C%20g%2C%20kappa%2C%20np%2C%20speed%2C%20t)%3A%0A%20%20%20%20a_t%20%3D%20np.gradient(speed%2C%20dt%2C%20edge_order%3D2)%0A%20%20%20%20a_n%20%3D%20kappa%20*%20speed**2%0A%0A%20%20%20%20print(%22%20%20%20t%20%20%20%20%20%20speed%20%20%20%20%20%20a_t%20%20%20%20%20%20a_n%20%20%20%20radius%20of%20curvature%20%20%20%7Ca%7C%22)%0A%20%20%20%20for%20_time%20in%20%5B0%2C%202%2C%2050%20%2F%20g%2C%208%2C%2010%5D%3A%0A%20%20%20%20%20%20%20%20_i%20%3D%20np.argmin(np.abs(t%20-%20_time))%0A%20%20%20%20%20%20%20%20print(%0A%20%20%20%20%20%20%20%20%20%20%20%20f%22%7Bt%5B_i%5D%3A5.2f%7D%20s%20%7Bspeed%5B_i%5D%3A7.2f%7D%20m%2Fs%20%7Ba_t%5B_i%5D%3A7.2f%7D%20%7Ba_n%5B_i%5D%3A7.2f%7D%20m%2Fs2%22%0A%20%20%20%20%20%20%20%20%20%20%20%20f%22%20%7B1%20%2F%20kappa%5B_i%5D%3A10.1f%7D%20m%20%7Bnp.hypot(a_t%5B_i%5D%2C%20a_n%5B_i%5D)%3A12.2f%7D%20m%2Fs2%22%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20return%20a_n%2C%20a_t%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20At%20the%20top%20of%20the%20flight%20the%20tangential%20acceleration%20is%20zero%20(to%20the%20precision%20of%20the%20sampling)%2C%20all%20of%20%24g%24%20is%20normal%2C%20and%20the%20radius%20of%20curvature%20is%2010.2%20m.%20That%20matches%20what%20the%20formula%20predicts%3A%20%24%5Crho%20%3D%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5E2%2Fa_n%20%3D%2010%5E2%2F9.81%20%3D%2010.19%24%20m.%20At%20launch%2C%20the%20same%20path%20has%20a%20radius%20of%20curvature%20of%201351%20m.%20The%20path%20bends%20a%20hundred%20times%20more%20sharply%20at%20the%20top%20than%20at%20the%20bottom%2C%20although%20nothing%20about%20the%20force%20changed.%0A%0A%20%20%20%20And%20yet%20the%20last%20column%20is%20the%20same%20at%20every%20instant.%20The%20two%20components%20change%20continuously%2C%20trading%20%24g%24%20between%20them%2C%20but%20together%20they%20always%20make%20up%20the%20same%20%249.81%5C%3B%5Cmathrm%7Bm%2Fs%5E2%7D%24.%0A%0A%20%20%20%20**Guiding%20questions%202.**%0A%0A%20%20%20%201.%20Why%20is%20the%20path%20nearly%20straight%20at%20launch%20and%20tightest%20at%20the%20top%3F%20Answer%20in%20terms%20of%20the%20angle%20between%20the%20velocity%20and%20gravity.%0A%20%20%20%202.%20%24a_t%24%20changes%20sign%20at%20the%20top.%20What%20is%20it%20telling%20you%20before%20and%20after%20that%20instant%3F%0A%20%20%20%203.%20Call%20%24%5Cbeta%24%20the%20angle%20between%20the%20velocity%20and%20the%20horizontal.%20Show%20that%20%24a_t%20%3D%20-g%5Csin%5Cbeta%24%20and%20%24a_n%20%3D%20g%5Ccos%5Cbeta%24%2C%20and%20check%20two%20rows%20of%20the%20table%20with%20it.%0A%20%20%20%204.%20Where%20along%20the%20path%20would%20you%20expect%20the%20numerical%20estimate%20of%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20to%20be%20least%20reliable%3F%20Keep%20your%20answer%20for%20the%20section%20on%20measured%20data.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Putting%20the%20acceleration%20back%20together%0A%0A%20%20%20%20If%20the%20decomposition%20is%20right%2C%20reassembling%20it%20must%20give%20back%20the%20acceleration%20we%20know%2C%20%24%5Cvec%7B%5Cmathbf%7Ba%7D%7D%20%3D%20a_t%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%20%2B%20a_n%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24.%20Let's%20draw%20it%20once%20every%20second%20together%20with%20the%20velocity%2C%20%24%5Cvec%7B%5Cmathbf%7Bv%7D%7D%20%3D%20%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%2C%20both%20at%20the%20same%20scale%20of%20half%20a%20metre%20of%20arrow%20per%20unit%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(a_n%2C%20a_t%2C%20e_n%2C%20e_t%2C%20g%2C%20np%2C%20r%2C%20speed)%3A%0A%20%20%20%20a%20%3D%20a_t%5B%3A%2C%20np.newaxis%5D%20*%20e_t%20%2B%20a_n%5B%3A%2C%20np.newaxis%5D%20*%20e_n%0A%0A%20%20%20%20print(%0A%20%20%20%20%20%20%20%20f%22Largest%20deviation%20of%20the%20reassembled%20acceleration%20from%20(0%2C%20-%7Bg%7D)%3A%20%22%0A%20%20%20%20%20%20%20%20f%22%7Bnp.abs(a%20-%20%5B0%2C%20-g%5D).max()%3A.4f%7D%20m%2Fs2%22%0A%20%20%20%20)%0A%20%20%20%20plot_path_vectors(%0A%20%20%20%20%20%20%20%20r%2C%0A%20%20%20%20%20%20%20%20%5Bspeed%5B%3A%2C%20np.newaxis%5D%20*%20e_t%2C%20a%5D%2C%0A%20%20%20%20%20%20%20%20%5Br%22%24%5Cvec%7B%5Cmathbf%7Bv%7D%7D%24%20%5Bm%2Fs%5D%22%2C%20r%22%24%5Cvec%7B%5Cmathbf%7Ba%7D%7D%24%20%5Bm%2Fs%24%5E2%24%5D%22%5D%2C%0A%20%20%20%20%20%20%20%20step%3D100%2C%0A%20%20%20%20%20%20%20%20scale%3D0.5%2C%0A%20%20%20%20%20%20%20%20title%3D%22Velocity%20and%20acceleration%20rebuilt%20from%20the%20path%20frame%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%20(a%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Every%20green%20arrow%20is%20the%20same%3A%20%249.81%5C%3B%5Cmathrm%7Bm%2Fs%5E2%7D%24%2C%20straight%20down.%20The%20pieces%20%24a_t%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20and%20%24a_n%5C%2C%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20change%20all%20along%20the%20path%3B%20their%20sum%20does%20not.%0A%0A%20%20%20%20This%20is%20the%20thing%20to%20take%20away%20from%20the%20example.%20**The%20path%20frame%20does%20not%20change%20the%20acceleration%3B%20it%20changes%20how%20we%20describe%20it.**%20In%20the%20fixed%20frame%20the%20projectile's%20acceleration%20is%20the%20simplest%20thing%20in%20the%20problem.%20In%20the%20path%20frame%20it%20is%20split%20into%20a%20part%20that%20is%20slowing%20the%20projectile%20down%20and%20a%20part%20that%20is%20bending%20its%20path%2C%20and%20it%20is%20that%20split%2C%20not%20the%20vector%2C%20that%20tells%20you%20about%20speed%20and%20turning.%0A%0A%20%20%20%20Finally%2C%20the%20binormal%20versor.%20The%20path%20is%20planar%2C%20so%20it%20should%20be%20%24%5Cpm%5Chat%7B%5Cmathbf%7Bk%7D%7D%24%20everywhere%2C%20and%20since%20the%20path%20turns%20clockwise%2C%20it%20should%20be%20%24-%5Chat%7B%5Cmathbf%7Bk%7D%7D%24.%20NumPy's%20cross%20product%20needs%20three-dimensional%20vectors%2C%20so%20we%20add%20a%20zero%20third%20component%20to%20the%20two%20versors%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(e_n%2C%20e_t%2C%20np%2C%20t)%3A%0A%20%20%20%20_zeros%20%3D%20np.zeros((len(t)%2C%201))%0A%20%20%20%20e_b%20%3D%20np.cross(np.hstack((e_t%2C%20_zeros))%2C%20np.hstack((e_n%2C%20_zeros)))%0A%0A%20%20%20%20print(%22Distinct%20values%20of%20e_b%20along%20the%20path%3A%22%2C%20np.unique(e_b.round(6)%2C%20axis%3D0))%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20A%20function%20for%20any%20path%0A%0A%20%20%20%20The%20steps%20above%20work%20for%20any%20planar%20or%20spatial%20trajectory%20sampled%20at%20a%20constant%20rate%2C%20so%20let's%20collect%20them%20in%20a%20function%20we%20can%20reuse%3A%0A%0A%20%20%20%20There%20is%20one%20numerical%20trap%20in%20Challenge%201's%20straight%20path%3A%20rounding%20errors%20can%20leave%20a%20tiny%20nonzero%20curvature.%20Normalizing%20that%20tiny%20vector%20invents%20a%20normal%20where%20none%20exists.%20The%20function%20treats%20curvature%20at%20or%20below%20%60curvature_tol%60%20(by%20default%20%2410%5E%7B-10%7D%5C%3B%5Cmathrm%7Bm%5E%7B-1%7D%7D%24)%20as%20zero%20and%20returns%20%60NaN%60%20for%20the%20undefined%20normal%20versor.%20The%20normal%20acceleration%20is%20still%20zero.%20When%20reconstructing%20acceleration%20there%2C%20omit%20the%20normal%20term%20rather%20than%20multiplying%20zero%20by%20%60NaN%60.%20This%20tolerance%20is%20adjustable%20for%20the%20scale%20of%20the%20trajectory%3B%20it%20is%20not%20a%20substitute%20for%20filtering%20noisy%20measurements.%20As%20in%20the%20derivation%2C%20the%20computation%20assumes%20nonzero%20speed.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.function%0Adef%20path_frame(r%2C%20dt%2C%20curvature_tol%3D1e-10)%3A%0A%20%20%20%20%22%22%22Path-frame%20description%20of%20a%20trajectory%20sampled%20at%20a%20constant%20rate.%0A%0A%20%20%20%20%60r%60%20holds%20the%20positions%20%5Bm%5D%20in%20rows%2C%20one%20row%20every%20%60dt%60%20%5Bs%5D.%20Returns%20the%0A%20%20%20%20speed%20%5Bm%2Fs%5D%2C%20the%20tangential%20and%20normal%20versors%2C%20the%20curvature%20%5B1%2Fm%5D%2C%20and%0A%20%20%20%20the%20tangential%20and%20normal%20components%20of%20the%20acceleration%20%5Bm%2Fs2%5D.%0A%0A%20%20%20%20Assumes%20nonzero%20speed.%20Curvatures%20at%20or%20below%20%60curvature_tol%60%20%5B1%2Fm%5D%0A%20%20%20%20are%20treated%20as%20zero%2C%20with%20a%20NaN%20normal%20versor%20and%20zero%20normal%0A%20%20%20%20acceleration.%20Omit%20that%20undefined%20normal%20term%20when%20rebuilding%20acceleration.%0A%20%20%20%20%22%22%22%0A%20%20%20%20import%20numpy%20as%20np%0A%0A%20%20%20%20v%20%3D%20np.gradient(r%2C%20dt%2C%20axis%3D0%2C%20edge_order%3D2)%0A%20%20%20%20speed%20%3D%20np.linalg.norm(v%2C%20axis%3D1)%0A%20%20%20%20e_t%20%3D%20v%20%2F%20speed%5B%3A%2C%20np.newaxis%5D%0A%0A%20%20%20%20C%20%3D%20np.gradient(e_t%2C%20dt%2C%20axis%3D0%2C%20edge_order%3D2)%20%2F%20speed%5B%3A%2C%20np.newaxis%5D%0A%20%20%20%20kappa%20%3D%20np.linalg.norm(C%2C%20axis%3D1)%0A%20%20%20%20kappa%20%3D%20np.where(kappa%20%3C%3D%20curvature_tol%2C%200.0%2C%20kappa)%0A%20%20%20%20e_n%20%3D%20np.divide(%0A%20%20%20%20%20%20%20%20C%2C%0A%20%20%20%20%20%20%20%20kappa%5B%3A%2C%20np.newaxis%5D%2C%0A%20%20%20%20%20%20%20%20out%3Dnp.full_like(C%2C%20np.nan)%2C%0A%20%20%20%20%20%20%20%20where%3Dkappa%5B%3A%2C%20np.newaxis%5D%20%3E%200%2C%0A%20%20%20%20)%0A%0A%20%20%20%20a_t%20%3D%20np.gradient(speed%2C%20dt%2C%20edge_order%3D2)%0A%20%20%20%20a_n%20%3D%20kappa%20*%20speed**2%0A%0A%20%20%20%20return%20speed%2C%20e_t%2C%20e_n%2C%20kappa%2C%20a_t%2C%20a_n%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Back%20to%20the%20bend%0A%0A%20%20%20%20Let's%20give%20it%20the%20athlete%20in%20lane%201%3A%20a%20half-circle%20of%20radius%2036.8%20m%2C%20run%20at%20a%20constant%2010%20m%2Fs%20and%20sampled%20at%20100%20Hz%2C%20with%20the%20centre%20of%20the%20bend%20at%20the%20origin.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(np)%3A%0A%20%20%20%20_radius%2C%20_v%20%3D%2036.8%2C%2010.0%20%20%23%20m%2C%20m%2Fs%0A%20%20%20%20_t%20%3D%20np.arange(0%2C%20np.pi%20*%20_radius%20%2F%20_v%2C%200.01)%0A%20%20%20%20_phi%20%3D%20_v%20*%20_t%20%2F%20_radius%0A%20%20%20%20_r%20%3D%20np.column_stack((_radius%20*%20np.cos(_phi)%2C%20_radius%20*%20np.sin(_phi)))%0A%0A%20%20%20%20_speed%2C%20_e_t%2C%20_e_n%2C%20_kappa%2C%20_a_t%2C%20_a_n%20%3D%20path_frame(_r%2C%200.01)%0A%0A%20%20%20%20print(f%22Speed%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B_speed.mean()%3A.2f%7D%20m%2Fs%22)%0A%20%20%20%20print(f%22Largest%20%7Ca_t%7C%3A%20%20%20%20%20%20%20%20%20%20%20%7Bnp.abs(_a_t).max()%3A.3f%7D%20m%2Fs2%22)%0A%20%20%20%20print(f%22a_n%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B_a_n.mean()%3A.2f%7D%20m%2Fs2%22)%0A%20%20%20%20print(f%22Radius%20of%20curvature%3A%20%20%20%20%20%7B1%20%2F%20_kappa.mean()%3A.1f%7D%20m%22)%0A%20%20%20%20print(f%22e_n%20at%20the%20start%3A%20%20%20%20%20%20%20%20%7B_e_n%5B0%5D.round(3)%20%2B%200.0%7D%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20A%20tangential%20acceleration%20that%20is%20zero%20to%20within%20a%20few%20thousandths%20of%20a%20m%2Fs%C2%B2%2C%20a%20normal%20acceleration%20of%202.72%20m%2Fs%C2%B2%2C%20a%20radius%20of%20curvature%20equal%20to%20the%20radius%20of%20the%20bend%2C%20and%20at%20the%20start%2C%20where%20the%20athlete%20is%20at%20%24(36.8%2C%200)%24%2C%20a%20normal%20versor%20of%20%24(-1%2C%200)%24%3A%20pointing%20straight%20at%20the%20centre.%20The%20fixed-frame%20velocity%20components%20we%20started%20with%20swing%20up%20and%20down%20the%20whole%20way%3B%20the%20path%20frame%20reduces%20the%20bend%20to%20two%20numbers.%0A%0A%20%20%20%20Those%20two%20numbers%20matter%20for%20performance.%20Usherwood%20and%20Wilson%20(2006)%20used%20exactly%20this%20requirement%20to%20explain%20why%2C%20on%20the%20tighter%20bends%20of%20indoor%20tracks%2C%20the%20athletes%20drawn%20in%20the%20inside%20lanes%20run%20the%20200%20m%20measurably%20slower.%20The%20ground%20has%20to%20supply%20the%20sideways%20force%20for%20the%20centripetal%20acceleration%20on%20top%20of%20the%20vertical%20force%20that%20supports%20the%20body%2C%20and%20a%20leg%20can%20only%20push%20so%20hard%20during%20the%20brief%20time%20it%20is%20on%20the%20ground.%0A%0A%20%20%20%20**Challenge%202.**%20Compute%20%24a_n%24%20for%20lane%208%20(a%20radius%20of%20about%2045.2%20m)%20at%2010%20m%2Fs%2C%20with%20the%20formula%20and%20with%20%60path_frame%60.%20Then%20find%20the%20speed%20in%20lane%201%20that%20has%20the%20same%20normal%20acceleration.%20Before%20you%20conclude%20that%20lane%201%20costs%20that%20much%20speed%2C%20ask%20whether%20equal%20normal%20acceleration%20is%20really%20the%20right%20thing%20to%20hold%20constant.%20What%20limits%20a%20sprinter%20on%20a%20bend%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20**Exercise%203.**%20At%20the%20apex%20of%20a%20projectile%20with%20horizontal%20speed%2010%20m%2Fs%2C%20what%20are%20the%20tangent%2C%20principal%20normal%20and%20radius%20of%20curvature%3F%0A%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Worked%20solution%20%E2%80%94%20Exercise%203%0A%0A%20%20%20%20The%20velocity%20is%20horizontal%2C%20so%20the%20tangent%20points%20along%20it.%20Gravity%20is%20entirely%20normal%20and%20downward%20there%3A%20%24a_n%3Dg%24.%20Thus%20%24%5Crho%3Dv%5E2%2Fg%3D10.194%24%20m%20at%20%24g%3D9.81%24%20m%2Fs%C2%B2.%0A%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20From%20clean%20curves%20to%20measured%20data%0A%0A%20%20%20%20Everything%20so%20far%20used%20positions%20computed%20from%20a%20formula%2C%20exact%20to%20about%20sixteen%20digits.%20Measured%20positions%20are%20nothing%20like%20that.%20A%20good%20optoelectronic%20motion%20capture%20system%20locates%20a%20marker%20with%20an%20error%20of%20the%20order%20of%20a%20millimetre.%0A%0A%20%20%20%20Let's%20add%20random%20noise%20with%20a%20standard%20deviation%20of%201%20mm%20to%20the%20projectile's%20positions%2C%20a%20hundred-thousandth%20of%20the%20size%20of%20the%20path%2C%20and%20compute%20the%20path%20frame%20again.%0A%0A%20%20%20%20**Before%20you%20run%20the%20next%20cell**%2C%20predict%3A%20will%20the%20reconstructed%20acceleration%20still%20look%20like%20%24g%24%2C%20straight%20down%3F%20Will%20the%20radius%20of%20curvature%20at%20the%20top%20still%20be%20about%2010%20m%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(a%2C%20dt%2C%20g%2C%20np%2C%20plt%2C%20r%2C%20t)%3A%0A%20%20%20%20_rng%20%3D%20np.random.default_rng(0)%0A%20%20%20%20_r_noisy%20%3D%20r%20%2B%20_rng.normal(0%2C%200.001%2C%20r.shape)%20%20%23%201%20mm%20of%20noise%0A%0A%20%20%20%20_speed%2C%20_e_t%2C%20_e_n%2C%20_kappa%2C%20_a_t%2C%20_a_n%20%3D%20path_frame(_r_noisy%2C%20dt)%0A%20%20%20%20_a_noisy%20%3D%20_a_t%5B%3A%2C%20np.newaxis%5D%20*%20_e_t%20%2B%20_a_n%5B%3A%2C%20np.newaxis%5D%20*%20_e_n%0A%20%20%20%20_mag%20%3D%20np.linalg.norm(_a_noisy%2C%20axis%3D1)%0A%20%20%20%20_top%20%3D%20np.argmin(np.abs(t%20-%2050%20%2F%20g))%0A%0A%20%20%20%20print(f%22Radius%20of%20curvature%20at%20the%20top%3A%20%7B1%20%2F%20_kappa%5B_top%5D%3A.1f%7D%20m%20(true%3A%2010.2%20m)%22)%0A%20%20%20%20print(f%22%7Ca%7C%3A%20median%20%7Bnp.median(_mag)%3A.1f%7D%20m%2Fs2%2C%20largest%20%7B_mag.max()%3A.1f%7D%20m%2Fs2%20(true%3A%20%7Bg%7D)%22)%0A%0A%20%20%20%20_%2C%20_ax%20%3D%20plt.subplots(figsize%3D(9%2C%204))%0A%20%20%20%20_ax.plot(t%2C%20_mag%2C%20color%3D%22tab%3Ared%22%2C%20linewidth%3D1%2C%20label%3D%221%20mm%20of%20noise%22)%0A%20%20%20%20_ax.plot(t%2C%20np.linalg.norm(a%2C%20axis%3D1)%2C%20color%3D%22k%22%2C%20linewidth%3D2%2C%20label%3D%22no%20noise%22)%0A%20%20%20%20_ax.set_xlabel(%22Time%20%5Bs%5D%22)%0A%20%20%20%20_ax.set_ylabel(%22%7Ca%7C%20%5Bm%2Fs%24%5E2%24%5D%22)%0A%20%20%20%20_ax.set_title(%22Magnitude%20of%20the%20acceleration%20rebuilt%20from%20the%20path%20frame%22)%0A%20%20%20%20_ax.legend(loc%3D%22upper%20center%22)%0A%20%20%20%20plt.tight_layout()%0A%20%20%20%20plt.show()%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20A%20millimetre%20of%20noise%20is%20enough%20to%20wreck%20it.%20The%20typical%20magnitude%20of%20the%20acceleration%20is%20off%20by%20a%20fifth%2C%20the%20worst%20samples%20are%20off%20by%20a%20factor%20of%20nearly%20seven%2C%20and%20the%20radius%20of%20curvature%20at%20the%20top%20is%20wrong%20by%20a%20third.%0A%0A%20%20%20%20The%20reason%20is%20the%20same%20one%20met%20in%20%5BKinematics%20of%20a%20particle%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinematics_particle.py)%20and%20%5BProjectile%20motion%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fprojectile_motion.py)%3A%20every%20finite%20difference%20divides%20a%20small%20difference%20of%20noisy%20numbers%20by%20a%20small%20time%20interval.%20The%20tangential%20versor%20needs%20one%20derivative%20of%20the%20position%2C%20and%20survives.%20The%20curvature%20and%20the%20normal%20versor%20need%20two%2C%20and%20the%20noise%20is%20amplified%20twice.%20Near%20launch%20and%20landing%2C%20where%20the%20path%20is%20almost%20straight%2C%20the%20true%20curvature%20is%20so%20small%20that%20the%20noise%20overwhelms%20it%2C%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20occasionally%20points%20the%20wrong%20way%20altogether.%0A%0A%20%20%20%20In%20practice%2C%20positions%20are%20low-pass%20filtered%20before%20they%20are%20differentiated%3B%20see%20the%20notebooks%20on%20%5Bdata%20filtering%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fdata_filtering.py)%20and%20%5Bresidual%20analysis%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fresidual_analysis.py).%0A%0A%20%20%20%20**Challenge%203.**%20Repeat%20the%20computation%20with%20the%20same%201%20mm%20of%20noise%20but%20with%20the%20path%20sampled%20at%2025%20Hz%20(%24%5CDelta%20t%24%20%3D%200.04%20s).%20Does%20the%20result%20get%20better%20or%20worse%3F%20Explain%20why%20a%20*lower*%20sampling%20rate%20can%20help%20here%2C%20when%20a%20higher%20one%20was%20what%20reduced%20the%20error%20of%20the%20take-off%20angle%20in%20the%20Projectile%20motion%20notebook.%20Is%20there%20a%20sampling%20rate%20that%20is%20best%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Symbolic%20solution%20(extra%20reading)%0A%0A%20%20%20%20When%20the%20path%20*is*%20given%20by%20a%20formula%2C%20we%20can%20do%20the%20whole%20computation%20exactly%20with%20%5BSymPy%5D(http%3A%2F%2Fwww.sympy.org)%2C%20the%20symbolic%20mathematics%20package%20for%20Python.%20Below%20we%20define%20a%20Cartesian%20coordinate%20system%2C%20%60N%60%2C%20and%20the%20symbols%20for%20time%20and%20gravity.%20We%20keep%20%24g%24%20as%20a%20symbol%20instead%20of%209.81%2C%20so%20the%20results%20hold%20for%20any%20gravity%20and%20SymPy's%20simplifications%20have%20exact%20expressions%20to%20work%20with.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20sympy%20as%20sym%0A%20%20%20%20from%20sympy.vector%20import%20CoordSys3D%0A%0A%20%20%20%20N%20%3D%20CoordSys3D(%22N%22)%0A%20%20%20%20t_s%2C%20g_s%20%3D%20sym.symbols(%22t%20g%22%2C%20positive%3DTrue)%0A%20%20%20%20return%20N%2C%20g_s%2C%20sym%2C%20t_s%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20position%20vector%20of%20the%20projectile%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(N%2C%20g_s%2C%20t_s)%3A%0A%20%20%20%20r_s%20%3D%20(10%20*%20t_s%20%2B%20100)%20*%20N.i%20%2B%20(-g_s%20%2F%202%20*%20t_s**2%20%2B%2050%20*%20t_s%20%2B%20100)%20*%20N.j%0A%20%20%20%20r_s%0A%20%20%20%20return%20(r_s%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Its%20velocity%20and%20speed%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(r_s%2C%20sym%2C%20t_s)%3A%0A%20%20%20%20v_s%20%3D%20sym.diff(r_s%2C%20t_s)%0A%20%20%20%20speed_s%20%3D%20sym.sqrt(v_s.dot(v_s))%0A%20%20%20%20v_s%0A%20%20%20%20return%20speed_s%2C%20v_s%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20tangential%20versor%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(speed_s%2C%20v_s)%3A%0A%20%20%20%20et_s%20%3D%20v_s%20%2F%20speed_s%0A%20%20%20%20et_s%0A%20%20%20%20return%20(et_s%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20curvature%20vector%2C%20the%20curvature%20and%20the%20normal%20versor%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(et_s%2C%20speed_s%2C%20sym%2C%20t_s)%3A%0A%20%20%20%20C_s%20%3D%20sym.simplify(sym.diff(et_s%2C%20t_s)%20%2F%20speed_s)%0A%20%20%20%20kappa_s%20%3D%20sym.simplify(sym.sqrt(C_s.dot(C_s)))%0A%20%20%20%20en_s%20%3D%20sym.simplify(C_s%20%2F%20kappa_s)%0A%20%20%20%20en_s%0A%20%20%20%20return%20en_s%2C%20kappa_s%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20radius%20of%20curvature%20at%20the%20top%20of%20the%20flight%2C%20%24t%20%3D%2050%2Fg%24%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(g_s%2C%20kappa_s%2C%20sym%2C%20t_s)%3A%0A%20%20%20%20sym.simplify(1%20%2F%20kappa_s.subs(t_s%2C%2050%20%2F%20g_s))%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Exactly%20%24100%2Fg%24%2C%20the%20%2410.19%24%20m%20found%20numerically.%20Now%20the%20acceleration%2C%20assembled%20from%20its%20tangential%20and%20normal%20components%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(en_s%2C%20et_s%2C%20kappa_s%2C%20speed_s%2C%20sym%2C%20t_s)%3A%0A%20%20%20%20a_s%20%3D%20sym.diff(speed_s%2C%20t_s)%20*%20et_s%20%2B%20speed_s**2%20*%20kappa_s%20*%20en_s%0A%20%20%20%20sym.simplify(a_s)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Two%20long%2C%20time-varying%20expressions%20simplify%20to%20%24-g%5C%2C%5Chat%7B%5Cmathbf%7Bj%7D%7D%24.%20That%20is%20the%20symbolic%20version%20of%20the%20plot%20of%20green%20arrows%20above%2C%20and%20this%20time%20it%20is%20exact.%0A%0A%20%20%20%20Finally%2C%20let's%20check%20the%20numerical%20versors%20against%20the%20exact%20ones%2C%20evaluating%20the%20symbolic%20expressions%20at%20the%20sampled%20instants%20with%20%60sympy.lambdify%60%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(N%2C%20e_n%2C%20e_t%2C%20en_s%2C%20et_s%2C%20g%2C%20g_s%2C%20np%2C%20r%2C%20sym%2C%20t%2C%20t_s)%3A%0A%20%20%20%20def%20_evaluate(vec)%3A%0A%20%20%20%20%20%20%20%20%22%22%22Evaluate%20the%20x%20and%20y%20components%20of%20a%20symbolic%20vector%20at%20the%20instants%20t.%22%22%22%0A%20%20%20%20%20%20%20%20_f%20%3D%20sym.lambdify(t_s%2C%20%5Bvec.dot(N.i).subs(g_s%2C%20g)%2C%20vec.dot(N.j).subs(g_s%2C%20g)%5D)%0A%20%20%20%20%20%20%20%20return%20np.column_stack(%5Bnp.broadcast_to(c%2C%20t.shape)%20for%20c%20in%20_f(t)%5D)%0A%0A%20%20%20%20_et_exact%2C%20_en_exact%20%3D%20_evaluate(et_s)%2C%20_evaluate(en_s)%0A%0A%20%20%20%20print(f%22Largest%20difference%20in%20e_t%3A%20%7Bnp.abs(_et_exact%20-%20e_t).max()%3A.1e%7D%22)%0A%20%20%20%20print(f%22Largest%20difference%20in%20e_n%3A%20%7Bnp.abs(_en_exact%20-%20e_n).max()%3A.1e%7D%22)%0A%20%20%20%20plot_path_vectors(%0A%20%20%20%20%20%20%20%20r%2C%0A%20%20%20%20%20%20%20%20%5B_et_exact%2C%20_en_exact%5D%2C%0A%20%20%20%20%20%20%20%20%5Br%22%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%22%2C%20r%22%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%22%5D%2C%0A%20%20%20%20%20%20%20%20step%3D33%2C%0A%20%20%20%20%20%20%20%20scale%3D10%2C%0A%20%20%20%20%20%20%20%20title%3D%22Path%20basis%20from%20the%20symbolic%20solution%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Agreement%20to%20several%20decimal%20places%2C%20as%20it%20should%20be%20with%20clean%20data%20sampled%20at%20100%20Hz.%20The%20symbolic%20route%20is%20exact%20but%20needs%20a%20formula%3B%20the%20numerical%20one%20works%20on%20any%20data%20but%20inherits%20every%20error%20in%20it.%20In%20biomechanics%20you%20will%20nearly%20always%20be%20on%20the%20numerical%20side%2C%20which%20is%20why%20the%20previous%20section%20matters%20more%20than%20this%20one.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20**Exercise%204.**%20Position%20noise%20has%20standard%20deviation%201%20mm.%20Halve%20the%20time%20step%20without%20changing%20that%20noise.%20How%20does%20second-difference%20acceleration%20noise%20scale%3F%0A%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Worked%20solution%20%E2%80%94%20Exercise%204%0A%0A%20%20%20%20The%20second%20difference%20is%20%24(x_%7Bi%2B1%7D-2x_i%2Bx_%7Bi-1%7D)%2F%5CDelta%20t%5E2%24.%20Independent%20equal-variance%20errors%20give%20standard%20deviation%20%24%5Csqrt6%5Csigma%2F%5CDelta%20t%5E2%24.%20Halving%20%24%5CDelta%20t%24%20multiplies%20it%20by%20four%3B%20extra%20samples%20alone%20do%20not%20remove%20measurement%20noise.%0A%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Checkpoint%20questions%0A%0A%20%20%20%20Pause%20here%20before%20the%20problems.%0A%0A%20%20%20%201.%20Go%20back%20to%20the%20movement%20you%20chose%20in%20Challenge%200.%20Is%20the%20body%20accelerating%3F%20Which%20component%20of%20the%20acceleration%2C%20%24a_t%24%20or%20%24a_n%24%2C%20is%20doing%20the%20work%2C%20and%20in%20which%20direction%20does%20it%20point%3F%0A%20%20%20%202.%20Why%20can%20the%20acceleration%20never%20have%20a%20component%20along%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_b%24%3F%0A%20%20%20%203.%20A%20sprinter%20accelerates%20out%20of%20the%20blocks%20on%20the%20straight.%20Which%20of%20the%20three%20path%20versors%20can%20you%20define%3F%20What%20changes%20when%20they%20reach%20the%20bend%3F%0A%20%20%20%204.%20%24a_n%20%3D%20%5Ckappa%5C%2C%5CVert%5Cvec%7B%5Cmathbf%7Bv%7D%7D%5CVert%5E2%24%20can%20never%20be%20negative.%20Where%20did%20the%20information%20about%20which%20way%20the%20path%20turns%20go%3F%0A%20%20%20%205.%20You%20have%20marker%20data%20at%20200%20Hz%20for%20a%20hand%20during%20a%20reaching%20movement.%20Rank%20the%20speed%2C%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%2C%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20and%20the%20radius%20of%20curvature%20from%20most%20to%20least%20trustworthy%2C%20and%20explain%20the%20ranking.%0A%20%20%20%206.%20The%20%5Bpolar%20basis%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fpolar_basis.py)%20is%20another%20basis%20that%20moves%20with%20the%20particle.%20What%20is%20each%20of%20the%20two%20bases%20attached%20to%3F%20For%20a%20particle%20on%20a%20circle%20centred%20at%20the%20origin%2C%20how%20are%20they%20related%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Problems%0A%0A%20%20%20%201.%20A%20track%20cyclist%20rides%20a%20velodrome%20bend%20of%20radius%2025%20m%20at%2015%20m%2Fs%20while%20slowing%20down%20at%201%20m%2Fs%C2%B2.%3Cbr%3E%0A%20%20%20%20%20%20%20a.%20Calculate%20the%20tangential%20and%20normal%20components%20of%20the%20acceleration.%3Cbr%3E%0A%20%20%20%20%20%20%20b.%20Calculate%20the%20magnitude%20of%20the%20acceleration%20and%20the%20angle%20between%20it%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24.%3Cbr%3E%0A%20%20%20%20%20%20%20c.%20Velodrome%20bends%20are%20steeply%20banked.%20Explain%20what%20the%20banking%20does%20for%20the%20cyclist%2C%20using%20the%20direction%20of%20the%20acceleration%20you%20found.%0A%0A%20%20%20%202.%20Return%20to%20the%20movement%20you%20chose%20in%20Challenge%200.%20Estimate%20its%20speed%20and%20the%20radius%20of%20curvature%20of%20its%20path%2C%20and%20calculate%20its%20normal%20acceleration.%20Compare%20it%20with%20%24g%24.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Final%20answers%20to%20the%20problems%0A%0A%20%20%20%201.%20%24a_t%3D-1%24%20m%2Fs%C2%B2%2C%20%24a_n%3D9%24%20m%2Fs%C2%B2%3B%20%24%7Ca%7C%3D%5Csqrt%7B82%7D%3D9.055%24%20m%2Fs%C2%B2%2C%20%246.34%5E%5Ccirc%24%20from%20inward%20normal%20toward%20the%20backward%20tangent.%20Banking%20directs%20part%20of%20the%20ground%20reaction%20inward%3B%20braking%20also%20needs%20a%20tangential%20force.%0A%20%20%20%202.%20No%20single%20numerical%20answer%20applies%20to%20a%20chosen%20movement.%20The%20result%20is%20%24a_n%3Dv%5E2%2F%5Crho%24%20and%20%24a_n%2Fg%3Dv%5E2%2F(9.81%5Crho)%24%3B%20for%20example%2C%205%20m%2Fs%20on%20a%2010%20m%20radius%20gives%202.5%20m%2Fs%C2%B2%2C%20or%200.255%20g.%0A%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%0A%20%20%20%20return%20(mo%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Go%20deeper%0A%0A%20%20%20%20-%20Read%20pages%20932%E2%80%93971%20of%20chapter%2018%20of%20%5BRuina%20and%20Pratap's%20book%5D(https%3A%2F%2Fruina.tam.cornell.edu%2FBook%2Findex.html)%20about%20path%20basis%20vectors.%0A%20%20%20%20-%20%5BPolar%20basis%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fpolar_basis.py)%20%E2%80%94%20another%20basis%20that%20moves%20with%20the%20particle.%0A%20%20%20%20-%20%5BAngular%20kinematics%20in%20a%20plane%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinematics_angular_2d.py)%20%E2%80%94%20circular%20motion%2C%20where%20%24%5Crho%24%20is%20constant%20and%20%24a_n%20%3D%20%5Comega%5E2%20r%24.%0A%20%20%20%20-%20%5BProjectile%20motion%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fprojectile_motion.py)%20%E2%80%94%20the%20path%20used%20in%20the%20example.%0A%20%20%20%20-%20%5BData%20filtering%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fdata_filtering.py)%20%E2%80%94%20what%20to%20do%20before%20differentiating%20measured%20positions.%0A%0A%20%20%20%20%23%23%23%20Video%20lectures%20on%20the%20Internet%0A%0A%20%20%20%20-%20%5BPath%20Vectors%5D(https%3A%2F%2Feaulas.usp.br%2Fportal%2Fvideo%3FidItem%3D7800)%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Optional%20assignments%20from%20the%20original%20sources%0A%0A%20%20%20%20These%20original%20reading%20assignments%20remain%20available%20for%20further%20study.%20Their%20full%20statements%20and%20source-specific%20answer%20keys%20are%20external%20to%20this%20guide.%0A%0A%20%20%20%20-%20Obtain%20the%20vectors%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24%20for%20problem%2018.1.1%20of%20Ruina%20and%20Pratap's%20book.%0A%0A%20%20%20%20-%20Solve%20problem%2018.1.9%20of%20Ruina%20and%20Pratap's%20book.%0A%0A%20%20%20%20-%20Write%20a%20Python%20program%20to%20solve%20problem%2018.1.10%20of%20Ruina%20and%20Pratap's%20book%20(only%20the%20part%20about%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_n%24%20and%20%24%5Chat%7B%5Cmathbf%7Be%7D%7D_t%24).%0A%0A%20%20%20%20-%20Solve%20problems%201.13%2C%201.15%20and%201.16%20of%20Rade's%20book.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20References%0A%0A%20%20%20%20-%20Rade%20D%20(2017)%20%5BCinem%C3%A1tica%20e%20Din%C3%A2mica%20para%20Engenharia%5D(https%3A%2F%2Fwww.grupogen.com.br%2Fe-book-cinematica-e-dinamica-para-engenharia).%20Grupo%20GEN.%0A%0A%20%20%20%20-%20Ruina%20A%2C%20Pratap%20R%20(2019)%20%5BIntroduction%20to%20Statics%20and%20Dynamics%5D(https%3A%2F%2Fruina.tam.cornell.edu%2FBook%2Findex.html).%20Oxford%20University%20Press.%0A%0A%20%20%20%20-%20Usherwood%20JR%2C%20Wilson%20AM%20(2006)%20%5BAccounting%20for%20elite%20indoor%20200%20m%20sprint%20results%5D(https%3A%2F%2Froyalsocietypublishing.org%2Frsbl%2Farticle-abstract%2F2%2F1%2F47%2F63751%2FAccounting-for-elite-indoor-200-m-sprint-results).%20Biology%20Letters%2C%202(1)%2C%2047%E2%80%9350.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
6b5a390e6c525b1777c35e6b4b64a69f