%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%22pandas%3E%3D2.2%22%2C%20%22urllib3%3E%3D2.2%22%2C%20%22ipython%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()%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%20Body%20segment%20parameters%0A%0A%20%20%20%20%3E%20Marcos%20Duarte%2C%20Renato%20Naville%20Watanabe%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%20We%20will%20read%20the%20Dempster%20and%20de%20Leva%20tables%2C%20locate%20segment%20centers%20of%20mass%2C%20and%20combine%20segment%20inertias.%20You%20need%20weighted%20averages%20and%20distances%20between%20coordinates.%20Treat%20the%20table%20as%20an%20estimate%20for%20a%20population%2C%20and%20keep%20its%20segment%20landmarks%20and%20reference%20axes%20attached%20to%20every%20number.%0A%0A%20%20%20%20Try%20the%20distributed%20**Exercises**%20before%20opening%20their%20collapsed%20worked%20solutions.%20Then%20use%20the%20**Checkpoint%20questions**%20and%20attempt%20the%20**Problems**%20independently%3B%20their%20panels%20contain%20final%20answers%20only.%20Predict%20the%20effect%20of%20a%20parameter%20change%20before%20running%20it%2C%20and%20check%20units%20and%20limiting%20cases.%0A%0A%20%20%20%20**Opening%20challenge.**%20Two%20people%20have%20the%20same%20total%20mass%20and%20height.%20Must%20their%20leg%20moments%20of%20inertia%20be%20equal%3F%20Predict%20which%20measurements%20an%20anthropometric%20table%20can%20supply%20and%20which%20it%20cannot.%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%20The%20dependency%20declaration%20at%20the%20top%20of%20this%20file%20lists%20the%20packages%20used%20by%20this%20guide.%20Marimo%20runs%20cells%20in%20dependency%20order.%20Run%20the%20notebook%20in%20an%20editor%20to%20use%20its%20displays%20and%20controls%3B%20the%20computational%20examples%20below%20explain%20their%20inputs%20before%20using%20them.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_()%3A%0A%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20from%20notebook_resources%20import%20repo_file%0A%20%20%20%20except%20ModuleNotFoundError%20as%20_error%3A%0A%20%20%20%20%20%20%20%20if%20_error.name%20!%3D%20%22notebook_resources%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20raise%0A%20%20%20%20%20%20%20%20raise%20ModuleNotFoundError(%0A%20%20%20%20%20%20%20%20%20%20%20%20%22This%20notebook%20needs%20notebook_resources.py.%20Download%20it%20from%3A%5Cn%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%22https%3A%2F%2Fraw.githubusercontent.com%2FBMClab%2FBMC%2Fmaster%2Ffunctions%2Fnotebook_resources.py%5Cn%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Save%20it%20in%20the%20same%20folder%20as%20this%20notebook%2C%20then%20rerun%20this%20cell.%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20name%3D%22notebook_resources%22%2C%0A%20%20%20%20%20%20%20%20)%20from%20None%0A%20%20%20%20return%20(repo_file%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%3Cfigure%3E%3Ccenter%3E%3Cimg%20src%3D'https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2Fvitruvian_man.jpg%3Fraw%3D1'%20width%3D240%20alt%3D'Vitruvian%20Man%20by%20Leonardo%20da%20Vinci'%2F%3E%3C%2Fcenter%3E%3C%2Ffigure%3E%0A%20%20%20%20%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%3Ci%3E%22Le%20proporzioni%20del%20corpo%20umano%20secondo%20Vitruvio%22%3C%2Fi%3E%2C%20also%20known%20as%20the%20%3Ca%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FVitruvian_Man%22%20target%3D%22_blank%22%3EVitruvian%20Man%3C%2Fa%3E%2C%20drawing%20by%20%3Ca%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FLeonardo_da_Vinci%22%20target%3D%22_blank%22%3ELeonardo%20da%20Vinci%3C%2Fa%3E%20circa%201490%20based%20on%20the%20work%20of%20%3Ca%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FVitruvius%22%20target%3D%22_blank%22%3EMarcus%20Vitruvius%20Pollio%3C%2Fa%3E%20(1st%20century%20BC)%2C%20depicting%20a%20man%20in%20supposedly%20ideal%20human%20proportions.%20Image%3A%20%3Ca%20href%3D%22https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FFile%3ADa_Vinci_Vitruve_Luc_Viatour.jpg%22%3EWikimedia%20Commons%3C%2Fa%3E%2C%20digitization%20by%20%3Ca%20href%3D%22https%3A%2F%2Flucnix.be%2F%22%3ELuc%20Viatour%20%2F%20Lucnix%3C%2Fa%3E.%0A%20%20%20%20%3Cbr%3E%3Cbr%3E%0A%20%20%20%20In%20fact%2C%20Leonardo's%20drawing%20does%20not%20follow%20the%20proportions%20according%20Vitruvius%2C%20but%20rather%20the%20proportions%20he%20found%20after%20his%20own%20anthropometrical%20studies%20of%20the%20human%20body.%20Leonardo%20was%20unable%20to%20fit%20a%20human%20body%20inside%20a%20circle%20and%20a%20square%20with%20the%20same%20center%2C%20one%20of%20the%20Vitruvius'%20claims.%0A%20%20%20%20%3Cbr%3E%3Cbr%3E%0A%20%20%20%20This%20is%20a%20remarkable%20historical%20evidence%20of%20not%20complying%20with%20established%20common%20knowledge%20and%20relying%20on%20experimental%20data%20for%20acquiring%20knowledge%20about%20nature%2C%20a%20%3Ci%3Etour%20de%20force%3C%2Fi%3E%20for%20the%20scientific%20method.%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%20Estimation%20of%20body%20segment%20parameters%0A%0A%20%20%20%20Body%20segment%20parameters%20(BSP)%20of%20the%20human%20body%2C%20such%20as%20length%2C%20area%2C%20volume%2C%20mass%2C%20density%2C%20center%20of%20mass%2C%20moment%20of%20inertia%2C%20and%20center%20of%20volume%2C%20are%20fundamental%20for%20the%20application%20of%20mechanics%20to%20the%20understanding%20of%20human%20movement.%20Anthropometry%20is%20the%20field%20concerned%20with%20the%20study%20of%20such%20measurements%20of%20the%20human%20body.%20Frequently%2C%20one%20cannot%20measure%20most%20of%20these%20parameters%20of%20each%20segment%20of%20an%20individual%20and%20these%20quantities%20are%20estimated%20by%20indirect%20methods.%20The%20main%20indirect%20methods%20are%20based%20in%20data%20of%20cadavers%20(e.g.%20Dempster's%20model)%2C%20body%20image%20scanning%20of%20living%20subjects%20(e.g.%2C%20Zatsiorsky-Seluyanov's%20model)%2C%20and%20geometric%20measurements%20(e.g.%2C%20Hanavan's%20model).%0A%0A%20%20%20%20For%20reviews%20available%20online%20of%20the%20different%20methods%20employed%20in%20the%20estimation%20of%20BSP%2C%20see%20%5BDrills%20et%20al.%20(1964)%5D(http%3A%2F%2Fwww.oandplibrary.org%2Fal%2F1964_01_044.asp)%20and%20%5BBj%C3%B8rnstrup%20(1995)%5D(http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.21.5223).%0A%0A%20%20%20%20Let's%20look%20on%20how%20to%20estimate%20some%20of%20the%20BSP%20using%20the%20anthropometric%20model%20of%20Dempster%20(1955)%20with%20some%20parameters%20adapted%20by%20Winter%20(2009)%20and%20the%20model%20of%20Zatsiorsky%20and%20Seluyanov%20(Zatsiorsky%2C%202002)%2C%20from%20now%20on%2C%20Zatsiorsky%2C%20with%20parameters%20adjusted%20by%20de%20Leva%20(1996).%20There%20is%20at%20least%20one%20Python%20library%20for%20the%20calculation%20of%20human%20body%20segment%20parameters%2C%20see%20Dembia%20et%20al.%20(2014)%2C%20it%20implements%20the%20Yeadon%20human%20inertia%20geometric%20model%2C%20but%20we%20will%20not%20use%20it%20here.%0A%0A%20%20%20%20For%20a%20table%20with%20BSP%20values%2C%20also%20referred%20as%20anthropometric%20table%2C%20typically%3A%0A%0A%20%20%20%20%2B%20The%20mass%20of%20each%20segment%20is%20given%20as%20fraction%20of%20the%20total%20body%20mass.%0A%20%20%20%20%2B%20The%20center%20of%20mass%20(CM)%20position%20in%20the%20sagittal%20plane%20of%20each%20segment%20is%20given%20as%20fraction%20of%20the%20segment%20length%20with%20respect%20to%20the%20proximal%20or%20distal%20joint%20position.%0A%20%20%20%20%2B%20The%20radius%20of%20gyration%20(Rg)%20around%20the%20transverse%20axis%20(rotation%20at%20the%20sagittal%20plane)%20and%20around%20other%20axes%20of%20each%20segment%20is%20given%20as%20fraction%20of%20the%20segment%20length%20with%20respect%20to%20(w.r.t.)%20the%20center%20of%20mass%20or%20w.r.t.%20the%20proximal%20or%20w.r.t.%20the%20distal%20joint%20position.%0A%0A%20%20%20%20For%20a%20formal%20description%20of%20these%20parameters%2C%20see%20the%20notebook%20%5BCenter%20of%20Mass%20and%20Moment%20of%20Inertia%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fcenter_of_mass_and_moment_of_inertia.py).%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%20%23%20Import%20the%20necessary%20libraries%0A%20%20%20%20import%20numpy%20as%20np%0A%20%20%20%20import%20pandas%20as%20pd%0A%20%20%20%20from%20IPython.display%20import%20display%0A%20%20%20%20%23%20'%25matplotlib%20inline'%20command%20supported%20automatically%20in%20marimo%0A%20%20%20%20import%20matplotlib.pyplot%20as%20plt%0A%20%20%20%20pd.set_option('max_colwidth'%2C%20100)%0A%20%20%20%20return%20display%2C%20np%2C%20pd%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%23%20Dempster's%20model%20adapted%20by%20Winter%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(display%2C%20mo%2C%20pd%2C%20repo_file)%3A%0A%20%20%20%20BSP_Dmarks%20%3D%20pd.read_csv(repo_file('data%2FBSP_DempsterWinter.txt')%2C%20sep%3D'%5Ct')%0A%20%20%20%20display(mo.md(%22BSP%20segments%20from%20Dempster's%20model%20adapted%20by%20Winter%20(2009)%3A%22))%0A%20%20%20%20display(BSP_Dmarks)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(display%2C%20mo%2C%20pd%2C%20repo_file)%3A%0A%20%20%20%20bsp_D%20%3D%20pd.read_csv(repo_file('data%2FBSP_DempsterWinter.txt')%2C%20index_col%3D0%2C%20sep%3D'%5Ct')%0A%20%20%20%20display(mo.md(%22BSP%20values%20from%20Dempster's%20model%20adapted%20by%20Winter%20(2009)%3A%22))%0A%20%20%20%20display(bsp_D)%0A%20%20%20%20return%20(bsp_D%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**Exercise%201%20%E2%80%94%20Read%20a%20mass%20fraction.**%20A%20shank%20has%20mass%20fraction%200.0465%20in%20a%20chosen%20table.%20For%20a%2070%20kg%20person%2C%20find%20its%20mass.%20Would%20you%20use%204.65%20or%200.0465%20in%20Python%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%2F%2F%2F%20details%20%7C%20Solution%20to%20Exercise%201%0A%0A%20%20%20%20The%20table%20fraction%20is%20dimensionless%3A%20%24m%3D70(0.0465)%3D3.255%24%20kg.%20Using%204.65%20would%20give%20325.5%20kg%2C%20already%20larger%20than%20the%20whole%20person.%20This%20simple%20total-mass%20check%20catches%20a%20percent%2Ffraction%20error.%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%20Zatsiorsky's%20model%20adjusted%20by%20de%20Leva%0A%0A%20%20%20%20The%20segments%20defined%20in%20the%20Zatsiorsky's%20model%20(Zatsiorsky%2C%202002)%20adjusted%20by%20de%20Leva%20(1996)%20are%20illustrated%20in%20the%20next%20figure.%0A%0A%20%20%20%20%3Cfigure%20aria-describedby%3D%22figure-caption-1%22%3E%3Ccenter%3E%3Cimg%20src%3D'https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2FBSP_ZdeLeva.png%3Fraw%3D1'%20alt%3D'Zatsiorsky%20anthropometric%20model'%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.%20Segment%20definition%20employed%20in%20the%20anthropometric%20model%20of%20Zatsiorsky%20and%20Seluyanov%20(Zatsiorsky%2C%202002)%20adjusted%20by%20de%20Leva%20(1996).%3Cbr%3EImage%20from%20a%20%3Ca%20href%3D%22http%3A%2F%2Fmotionanalysis.com%2F%22%20target%3D%22_blank%22%3EMotion%20Analysis%20Corporation%3C%2Fa%3E%20manual.%3C%2Fspan%3E%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(display%2C%20mo%2C%20pd%2C%20repo_file)%3A%0A%20%20%20%20BSP_Zmarks%20%3D%20pd.read_csv(repo_file('data%2FBSPlandmarks_ZdeLeva.txt')%2C%20sep%3D'%5Ct')%0A%20%20%20%20display(mo.md(%22BSP%20landmarks%20from%20Zatsiorsky's%20model%20adjusted%20by%20de%20Leva%20(1996)%3A%22))%0A%20%20%20%20display(BSP_Zmarks)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(display%2C%20mo%2C%20pd%2C%20repo_file)%3A%0A%20%20%20%20bsp_Zf%20%3D%20pd.read_csv(repo_file('data%2FBSPfemale_ZdeLeva.txt')%2C%20index_col%3D0%2C%20sep%3D'%5Ct')%0A%20%20%20%20display(mo.md(%22BSP%20female%20values%20from%20Zatsiorsky's%20model%20adjusted%20by%20de%20Leva%20(1996)%3A%22))%0A%20%20%20%20display(bsp_Zf)%0A%20%20%20%20return%20(bsp_Zf%2C)%0A%0A%0A%40app.cell%0Adef%20_(display%2C%20mo%2C%20pd%2C%20repo_file)%3A%0A%20%20%20%20bsp_Zm%20%3D%20pd.read_csv(repo_file('data%2FBSPmale_ZdeLeva.txt')%2C%20index_col%3D0%2C%20sep%3D'%5Ct')%0A%20%20%20%20display(mo.md(%22BSP%20male%20values%20from%20Zatsiorsky's%20model%20adjusted%20by%20de%20Leva%20(1996)%3A%22))%0A%20%20%20%20display(bsp_Zm)%0A%20%20%20%20return%20(bsp_Zm%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%23%20Differences%20between%20the%20anthropometric%20models%20from%20Dempster%20and%20Zatsiorsky%0A%0A%20%20%20%20The%20anthropometric%20models%20from%20Dempster%20and%20Zatsiorsky%20are%20different%20in%20many%20aspects%3B%20regarding%20the%20subjetcs%20investigated%20in%20the%20studies%2C%20Dempster's%20model%20is%20based%20on%20the%20data%20of%208%20cadavers%20of%20older%20male%20individuals%20(but%20two%20of%20the%20individuals%20were%20of%20unknown%20age)%20analyzed%20in%20the%20United%20States.%20Zatsiorsky's%20model%20is%20based%20on%20image%20scanning%20of%20100%20young%20men%20and%2015%20young%20women%2C%20at%20the%20time%20all%20students%20of%20a%20military%20school%20in%20the%20former%20Soviet%20Union.%0A%0A%20%20%20%20The%20difference%20between%20models%20for%20some%20segments%20is%20large%20(see%20table%20below)%3A%20the%20mass%20fraction%20of%20the%20thigh%20segment%20for%20Zatsiorsky's%20model%20is%20more%20than%2040%25%20larger%20than%20for%20the%20Dempster's%20model%2C%20inversely%2C%20the%20trunk%20segment%20has%20about%2015%25%20lower%20mass%20fraction%20for%20Zatisorsky's%20model.%20Also%2C%20note%20that%20some%20of%20the%20%20segments%20don't%20have%20the%20same%20definition%20in%20the%20two%20models.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(bsp_D%2C%20bsp_Zf%2C%20bsp_Zm%2C%20display%2C%20mo%2C%20np%2C%20pd)%3A%0A%20%20%20%20m_D%20%3D%20bsp_D.loc%5B%5B'Foot'%2C%20'Leg'%2C%20'Thigh'%2C%20'Pelvis'%2C%20'Abdomen'%2C%20'Thorax'%2C%20'Trunk'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'Upper%20arm'%2C%20'Forearm'%2C%20'Hand'%2C%20'Head%20neck'%5D%2C%20'Mass'%5D%0A%20%20%20%20m_Zf%20%3D%20bsp_Zf.loc%5B%5B'Foot'%2C%20'Shank'%2C%20'Thigh'%2C%20'Lower%20trunk'%2C%20'Middle%20trunk'%2C%20'Upper%20trunk'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'Trunk'%2C%20'Upper%20arm'%2C%20'Forearm'%2C%20'Hand'%2C%20'Head'%5D%2C%20'Mass'%5D%0A%20%20%20%20m_Zm%20%3D%20bsp_Zm.loc%5B%5B'Foot'%2C%20'Shank'%2C%20'Thigh'%2C%20'Lower%20trunk'%2C%20'Middle%20trunk'%2C%20'Upper%20trunk'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'Trunk'%2C%20'Upper%20arm'%2C%20'Forearm'%2C%20'Hand'%2C%20'Head'%5D%2C%20'Mass'%5D%0A%20%20%20%20m_D.index%20%3D%20m_Zf.index%20%20%23%20because%20of%20different%20names%20for%20some%20segments%0A%0A%20%20%20%20display(mo.md(%22Mass%20fraction%20difference%20(in%20%25)%20of%20Zatsiorsky's%20model%20w.r.t.%20Dempster's%20model%22))%0A%20%20%20%20d%20%3D%20pd.DataFrame(%7B'Females'%3A%20np.around(100%20*%20(m_Zf%20-%20m_D)%20%2F%20m_D)%2C%20%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'Males'%3A%20np.around(100%20*%20(m_Zm%20-%20m_D)%20%2F%20m_D)%7D)%0A%20%20%20%20display(d)%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%20Center%20of%20mass%0A%0A%20%20%20%20See%20the%20notebook%20%5BCenter%20of%20Mass%20and%20Moment%20of%20Inertia%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fcenter_of_mass_and_moment_of_inertia.py)%20for%20a%20description%20of%20center%20of%20mass.%0A%0A%20%20%20%20Using%20the%20data%20of%20the%20body%20segment%20parameters%20table%2C%20the%20center%20of%20mass%20of%20a%20single%20segment%20%24i%24%20is%20(see%20figure%20below)%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20r_%7Bi%7D%20%3D%20r_%7Bi%2Cp%7D%20%2B%20%5Ctext%7Bbsp%5Bi%2Ccmp%5D%7D%20%5Ccdot%20(r_%7Bi%2Cd%7D-r_%7Bi%2Cp%7D)%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Where%20%24r_%7Bi%2Cp%7D%24%20and%20%24%5C%3Ar_%7Bi%2Cd%7D%24%20are%20the%20positions%20of%20the%20proximal%20and%20distal%20landmarks%20used%20to%20define%20the%20%24i%24%20segment.%3Cbr%3E%0A%20%20%20%20Note%20that%20%24r%24%20is%20a%20vector%20and%20may%20have%20more%20than%20one%20dimension.%20The%20equation%20for%20the%20center%20of%20mass%20is%20valid%20in%20each%20direction%20and%20the%20calculations%20are%20performed%20independently%20in%20each%20direction.%20In%20addition%2C%20there%20is%20no%20need%20to%20include%20the%20mass%20of%20the%20segment%20in%20the%20equation%20above%3B%20the%20mass%20of%20the%20segment%20is%20used%20only%20when%20there%20is%20more%20than%20one%20segment.%0A%0A%20%20%20%20For%20example%2C%20given%20the%20following%20coordinates%20(%24x%2C%20y%24)%20for%20the%20MT2%2C%20ankle%2C%20knee%20and%20hip%20joints%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(display%2C%20np)%3A%0A%20%20%20%20r%20%3D%20np.array(%5B%5B101.1%2C%201.3%5D%2C%20%5B84.9%2C%2011.0%5D%2C%20%5B86.4%2C%2054.9%5D%2C%20%5B72.1%2C%2092.8%5D%5D)%2F100%0A%20%20%20%20display(np.around(r%2C%203))%0A%20%20%20%20return%20(r%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%20position%20of%20the%20center%20of%20mass%20of%20each%20segment%20and%20of%20the%20lower%20limb%20are%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(bsp_D%2C%20np%2C%20r)%3A%0A%20%20%20%20M%20%3D%20bsp_D.loc%5B%5B'Foot'%2C%20'Leg'%2C%20'Thigh'%5D%2C%20'Mass'%5D.sum()%0A%20%20%20%20rcm_foot%20%20%3D%20r%5B1%5D%20%2B%20bsp_D.loc%5B'Foot'%2C%20'CM%20prox'%5D*(r%5B0%5D-r%5B1%5D)%0A%20%20%20%20rcm_leg%20%20%20%3D%20r%5B2%5D%20%2B%20bsp_D.loc%5B'Leg'%2C%20%20'CM%20prox'%5D*(r%5B1%5D-r%5B2%5D)%0A%20%20%20%20rcm_thigh%20%3D%20r%5B3%5D%20%2B%20bsp_D.loc%5B'Thigh'%2C'CM%20prox'%5D*(r%5B2%5D-r%5B3%5D)%0A%20%20%20%20rcm%20%3D%20(bsp_D.loc%5B'Foot'%2C'Mass'%5D*rcm_foot%20%2B%20bsp_D.loc%5B'Leg'%2C'Mass'%5D*rcm_leg%20%2B%20%5C%0A%20%20%20%20%20%20%20%20%20%20%20bsp_D.loc%5B'Thigh'%2C'Mass'%5D*rcm_thigh)%2FM%0A%20%20%20%20print('Foot%20CM%3A%20'%2C%20np.around(rcm_foot%2C%203)%2C%20'm')%0A%20%20%20%20print('Leg%20CM%3A%20'%2C%20np.around(rcm_leg%2C%203)%2C%20'm')%0A%20%20%20%20print('Thigh%20CM%3A%20'%2C%20np.around(rcm_thigh%2C%203)%2C%20'm')%0A%20%20%20%20print('Lower%20limb%20CM%3A%20'%2C%20np.around(rcm%2C%203)%2C%20'm')%0A%20%20%20%20return%20rcm%2C%20rcm_foot%2C%20rcm_leg%2C%20rcm_thigh%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%20And%20here%20is%20a%20geometric%20representation%20of%20part%20of%20these%20calculations%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(plt%2C%20r%2C%20rcm%2C%20rcm_foot%2C%20rcm_leg%2C%20rcm_thigh)%3A%0A%20%20%20%20plt.rc('axes'%2C%20%20labelsize%3D14%2C%20linewidth%3D1.5)%0A%20%20%20%20plt.rc('xtick'%2C%20labelsize%3D14)%0A%20%20%20%20plt.rc('ytick'%2C%20labelsize%3D14)%0A%20%20%20%20plt.rc('lines'%2C%20markersize%3D8)%0A%20%20%20%20hfig%2C%20hax%20%3D%20plt.subplots(1%2C%201%2C%20figsize%3D(10%2C%205))%0A%0A%20%20%20%20%23%20bones%20and%20joints%0A%20%20%20%20plt.plot(r%5B%3A%2C0%5D%2C%20r%5B%3A%2C1%5D%2C%20'b-')%0A%20%20%20%20plt.plot(r%5B%3A%2C0%5D%2C%20r%5B%3A%2C1%5D%2C%20'ko'%2C%20label%3D'joint')%0A%20%20%20%20%23%20center%20of%20mass%20of%20each%20segment%0A%20%20%20%20plt.plot(rcm_foot%5B0%5D%2C%20rcm_foot%5B1%5D%2C%20'go'%2C%20label%3D'segment%20center%20of%20mass')%0A%20%20%20%20plt.plot(rcm_leg%5B0%5D%2C%20rcm_leg%5B1%5D%2C%20'go'%2C%20rcm_thigh%5B0%5D%2C%20rcm_thigh%5B1%5D%2C%20'go')%0A%20%20%20%20%23%20total%20center%20of%20mass%0A%20%20%20%20plt.plot(rcm%5B0%5D%2C%20rcm%5B1%5D%2C%20'ro'%2C%20label%3D'total%20center%20of%20mass')%0A%20%20%20%20hax.legend(frameon%3DFalse%2C%20loc%3D'upper%20left'%2C%20fontsize%3D12%2C%20numpoints%3D1)%0A%20%20%20%20plt.arrow(0%2C%200%2C%20r%5B3%2C0%5D%2C%20r%5B3%2C1%5D%2C%20color%3D'b'%2C%20head_width%3D0.02%2C%20overhang%3D.5%2C%20fc%3D%22k%22%2C%20ec%3D%22k%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20lw%3D2%2C%20length_includes_head%3DTrue)%0A%20%20%20%20plt.arrow(r%5B3%2C0%5D%2C%20r%5B3%2C1%5D%2C%20rcm_thigh%5B0%5D%20-%20r%20%5B3%2C0%5D%2C%20rcm_thigh%5B1%5D%20-%20r%5B3%2C1%5D%2C%20head_width%3D0.02%2C%0A%20%20%20%20%20%20%20%20%20%20overhang%3D.5%2C%20fc%3D%22b%22%2C%20ec%3D%22b%22%2C%20lw%3D2%2C%20length_includes_head%3DTrue)%0A%20%20%20%20plt.arrow(0%2C%200%2C%20rcm_thigh%5B0%5D%2C%20rcm_thigh%5B1%5D%2C%20head_width%3D0.02%2C%20overhang%3D.5%2C%20fc%3D%22g%22%2C%20ec%3D%22g%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20lw%3D2%2C%20length_includes_head%3DTrue)%0A%20%20%20%20plt.text(0.30%2C%20.5%2C%20r'%24%5Cmathbf%7Br%7D_%7Bthigh%2Cp%7D%24'%2C%20rotation%3D38%2C%20fontsize%3D16)%0A%20%20%20%20plt.text(0.77%2C%20.85%2C%20r'%24bsp_%7Bthigh%2Ccmp%7D*(%5Cmathbf%7Br%7D_%7Bi%2Cd%7D-%5Cmathbf%7Br%7D_%7Bi%2Cp%7D)%24'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20fontsize%3D16%2C%20color%3D'b')%0A%20%20%20%20plt.text(0.15%2C%20.05%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20r'%24%5Cmathbf%7Br%7D_%7Bthigh%2Ccm%7D%3D%5Cmathbf%7Br%7D_%7Bi%2Cp%7D%2Bbsp_%7Bi%2Ccmp%7D*'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20r'(%5Cmathbf%7Br%7D_%7Bi%2Cd%7D-%5Cmathbf%7Br%7D_%7Bi%2Cp%7D)%24'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20rotation%3D25%2C%20fontsize%3D16%2C%20color%3D'g')%0A%20%20%20%20hax.set_xlim(0%2C1.1)%0A%20%20%20%20hax.set_ylim(0%2C1.05)%0A%20%20%20%20hax.set_xlabel('x%20%5Bm%5D')%0A%20%20%20%20hax.set_ylabel('y%20%5Bm%5D')%0A%20%20%20%20hax.set_title('Determination%20of%20center%20of%20mass'%2C%20fontsize%3D16)%0A%20%20%20%20hax.grid()%0A%20%20%20%20hax%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%20%E2%80%94%20Locate%20a%20segment%20center.**%20A%20proximal%20joint%20is%20at%20%24(0%2C0)%24%20m%20and%20a%20distal%20joint%20at%20%24(0.4%2C0.3)%24%20m.%20The%20center%20lies%2043%25%20of%20the%20length%20from%20proximal%20to%20distal.%20Where%20is%20it%2C%20and%20what%20is%20the%20segment%20length%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%2F%2F%2F%20details%20%7C%20Solution%20to%20Exercise%202%0A%0A%20%20%20%20Use%20the%20same%20fraction%20on%20the%20displacement%20vector%3A%20%24%5Cmathbf%20r_C%3D%5Cmathbf%20r_P%2B0.43(%5Cmathbf%20r_D-%5Cmathbf%20r_P)%3D(0.172%2C0.129)%24%20m.%20The%20length%20is%20%24%5Csqrt%7B0.4%5E2%2B0.3%5E2%7D%3D0.5%24%20m.%20The%20percentage%20is%20a%20position%20along%20the%20segment%2C%20not%20an%20absolute%20laboratory%20coordinate.%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%20Moment%20of%20inertia%0A%0A%20%20%20%20%23%23%23%20Radius%20of%20gyration%0A%0A%20%20%20%20See%20the%20notebook%20%5BCenter%20of%20Mass%20and%20Moment%20of%20Inertia%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fcenter_of_mass_and_moment_of_inertia.py)%20for%20a%20description%20of%20moment%20of%20inertia%20and%20radius%20of%20gyration.%0A%0A%20%20%20%20The%20radius%20of%20gyration%20(as%20a%20fraction%20of%20the%20segment%20length)%20is%20the%20quantity%20that%20is%20given%20in%20the%20table%20of%20body%20segment%20parameters.%20Because%20of%20that%2C%20we%20don't%20need%20to%20sum%20each%20element%20of%20mass%20of%20the%20segment%20to%20calculate%20its%20moment%20of%20inertia%3B%20we%20just%20need%20to%20take%20the%20mass%20of%20the%20segment%20times%20the%20radius%20or%20gyration%20squared.%0A%0A%20%20%20%20Using%20the%20body%20segment%20parameters%2C%20the%20moment%20of%20inertia%20of%20a%20single%20segment%20%24i%24%20rotating%20around%20its%20own%20center%20of%20mass%20is%20(see%20figure%20below)%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20I_%7Bi%2Ccm%7D%20%3D%20M%20%5Ccdot%20%5Ctext%7Bbsp%5Bi%2Cmass%5D%7D%20%5Ccdot%20%5Cleft(%5Ctext%7Bbsp%5Bi%2Crgcm%5D%7D%20%5Ccdot%20%7C%7Cr_%7Bi%2Cd%7D-r_%7Bi%2Cp%7D%7C%7C%5Cright)%5E2%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Where%20%24M%24%20is%20the%20total%20body%20mass%20of%20the%20subject%20and%20%24%7C%7Cr_%7Bi%2Cd%7D-r_%7Bi%2Cp%7D%7C%7C%24%20is%20the%20length%20of%20the%20segment%20%24i%24.%0A%0A%20%20%20%20For%20example%2C%20the%20moment%20of%20inertia%20of%20each%20segment%20of%20the%20lower%20limb%20around%20each%20corresponding%20segment%20center%20of%20mass%20considering%20the%20coordinates%20(x%2C%20y)%20for%20the%20MT2%2C%20ankle%2C%20knee%20and%20hip%20joints%20given%20above%20are%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(bsp_D%2C%20np%2C%20r)%3A%0A%20%20%20%20norm%20%3D%20np.linalg.norm%0A%20%20%20%20M_1%20%3D%20100%0A%20%20%20%20Icm_foot%20%3D%20M_1%20*%20bsp_D.loc%5B'Foot'%2C%20'Mass'%5D%20*%20(bsp_D.loc%5B'Foot'%2C%20'Rg%20CM'%5D%20*%20norm(r%5B0%5D%20-%20r%5B1%5D))%20**%202%0A%20%20%20%20Icm_leg%20%3D%20M_1%20*%20bsp_D.loc%5B'Leg'%2C%20'Mass'%5D%20*%20(bsp_D.loc%5B'Leg'%2C%20'Rg%20CM'%5D%20*%20norm(r%5B1%5D%20-%20r%5B2%5D))%20**%202%0A%20%20%20%20Icm_thigh%20%3D%20M_1%20*%20bsp_D.loc%5B'Thigh'%2C%20'Mass'%5D%20*%20(bsp_D.loc%5B'Thigh'%2C%20'Rg%20CM'%5D%20*%20norm(r%5B2%5D%20-%20r%5B3%5D))%20**%202%0A%20%20%20%20print('Icm%20foot%3A%20'%2C%20np.around(Icm_foot%2C%203)%2C%20'kgm2')%0A%20%20%20%20print('Icm%20leg%3A%20'%2C%20np.around(Icm_leg%2C%203)%2C%20'kgm2')%0A%20%20%20%20print('Icm%20thigh%3A%20'%2C%20np.around(Icm_thigh%2C%203)%2C%20'kgm2')%0A%20%20%20%20return%20Icm_foot%2C%20Icm_leg%2C%20Icm_thigh%2C%20M_1%2C%20norm%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%20%E2%80%94%20Turn%20a%20radius%20into%20inertia.**%20For%20a%203%20kg%2C%200.4%20m%20segment%2C%20the%20radius%20of%20gyration%20about%20a%20specified%20center-of-mass%20axis%20is%2030%25%20of%20the%20segment%20length.%20Find%20the%20inertia%20and%20its%20units.%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%20Solution%20to%20Exercise%203%0A%0A%20%20%20%20The%20dimensional%20radius%20is%20%24k%3D0.30(0.4)%3D0.12%24%20m%3B%20hence%20%24I_C%3Dmk%5E2%3D3(0.12)%5E2%3D0.0432%24%20kg%20m%C2%B2.%20Squaring%20the%20fraction%20alone%20would%20miss%20the%20length%20scale.%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%20Parallel%20axis%20theorem%0A%0A%20%20%20%20See%20the%20notebook%20%5BCenter%20of%20Mass%20and%20Moment%20of%20Inertia%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fcenter_of_mass_and_moment_of_inertia.py)%20for%20a%20description%20of%20parallel%20axis%20theorem.%0A%0A%20%20%20%20For%20example%2C%20using%20the%20parallel%20axis%20theorem%20the%20moment%20of%20inertia%20of%20the%20lower%20limb%20around%20its%20center%20of%20mass%20is%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(%0A%20%20%20%20Icm_foot%2C%0A%20%20%20%20Icm_leg%2C%0A%20%20%20%20Icm_thigh%2C%0A%20%20%20%20M_1%2C%0A%20%20%20%20bsp_D%2C%0A%20%20%20%20norm%2C%0A%20%20%20%20np%2C%0A%20%20%20%20rcm%2C%0A%20%20%20%20rcm_foot%2C%0A%20%20%20%20rcm_leg%2C%0A%20%20%20%20rcm_thigh%2C%0A)%3A%0A%20%20%20%20Icmll%20%3D%20Icm_foot%20%2B%20M_1%20*%20bsp_D.loc%5B'Foot'%2C%20'Mass'%5D%20*%20norm(rcm%20-%20rcm_foot)%20**%202%20%2B%20Icm_leg%20%2B%20M_1%20*%20bsp_D.loc%5B'Leg'%2C%20'Mass'%5D%20*%20norm(rcm%20-%20rcm_leg)%20**%202%20%2B%20Icm_thigh%20%2B%20M_1%20*%20bsp_D.loc%5B'Thigh'%2C%20'Mass'%5D%20*%20norm(rcm%20-%20rcm_thigh)%20**%202%0A%20%20%20%20print('Icm%20lower%20limb%3A%20'%2C%20np.around(Icmll%2C%203)%2C%20'kgm2')%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%20To%20calculate%20the%20moment%20of%20inertia%20of%20the%20lower%20limb%20around%20the%20hip%2C%20we%20use%20again%20the%20parallel%20axis%20theorem%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(%0A%20%20%20%20Icm_foot%2C%0A%20%20%20%20Icm_leg%2C%0A%20%20%20%20Icm_thigh%2C%0A%20%20%20%20M_1%2C%0A%20%20%20%20bsp_D%2C%0A%20%20%20%20norm%2C%0A%20%20%20%20np%2C%0A%20%20%20%20r%2C%0A%20%20%20%20rcm_foot%2C%0A%20%20%20%20rcm_leg%2C%0A%20%20%20%20rcm_thigh%2C%0A)%3A%0A%20%20%20%20Ihipll%20%3D%20Icm_foot%20%2B%20M_1%20*%20bsp_D.loc%5B'Foot'%2C%20'Mass'%5D%20*%20norm(r%5B3%5D%20-%20rcm_foot)%20**%202%20%2B%20Icm_leg%20%2B%20M_1%20*%20bsp_D.loc%5B'Leg'%2C%20'Mass'%5D%20*%20norm(r%5B3%5D%20-%20rcm_leg)%20**%202%20%2B%20Icm_thigh%20%2B%20M_1%20*%20bsp_D.loc%5B'Thigh'%2C%20'Mass'%5D%20*%20norm(r%5B3%5D%20-%20rcm_thigh)%20**%202%0A%20%20%20%20print('Ihip%20lower%20limb%3A%20'%2C%20np.around(Ihipll%2C%203)%2C%20'kgm2')%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%20Note%20that%20for%20the%20correct%20use%20of%20the%20parallel%20axis%20theorem%20we%20have%20to%20input%20the%20moment%20of%20inertia%20around%20the%20center%20of%20mass%20of%20each%20body.%20For%20example%2C%20we%20CAN%20NOT%20calculate%20the%20moment%20of%20inertia%20around%20the%20hip%20with%20the%20moment%20of%20inertia%20of%20the%20entire%20lower%20limb%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Icm_foot%2C%20Icm_leg%2C%20Icm_thigh%2C%20M_1%2C%20bsp_D%2C%20norm%2C%20np%2C%20r%2C%20rcm)%3A%0A%20%20%20%20I%20%3D%20Icm_foot%20%2B%20M_1%20*%20bsp_D.loc%5B'Foot'%2C%20'Mass'%5D%20*%20norm(r%5B3%5D%20-%20rcm)%20**%202%20%2B%20Icm_leg%20%2B%20M_1%20*%20bsp_D.loc%5B'Leg'%2C%20'Mass'%5D%20*%20norm(r%5B3%5D%20-%20rcm)%20**%202%20%2B%20Icm_thigh%20%2B%20M_1%20*%20bsp_D.loc%5B'Thigh'%2C%20'Mass'%5D%20*%20norm(r%5B3%5D%20-%20rcm)%20**%202%0A%20%20%20%20print('Icm%20lower%20limb%3A%20'%2C%20np.around(I%2C%203)%2C%20'kgm2.%20THIS%20IS%20WRONG!')%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%20%E2%80%94%20Move%20the%20axis.**%20The%20preceding%20segment%20center%20is%200.17%20m%20from%20a%20parallel%20proximal%20axis.%20Find%20the%20proximal%20inertia.%20Why%20must%20it%20exceed%20the%20center-of-mass%20inertia%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%2F%2F%2F%20details%20%7C%20Solution%20to%20Exercise%204%0A%0A%20%20%20%20%24I_P%3DI_C%2Bmd%5E2%3D0.0432%2B3(0.17)%5E2%3D0.1299%24%20kg%20m%C2%B2.%20The%20added%20term%20is%20nonnegative.%20This%20statement%20applies%20to%20parallel%20axes%3B%20an%20axis%20with%20a%20different%20direction%20requires%20the%20inertia%20tensor.%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%20Center%20of%20buoyancy%0A%0A%20%20%20%20%5BCenter%20of%20buoyancy%5D(https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBuoyancy)%20is%20the%20center%20of%20the%20volume%20of%20water%20which%20the%20submerged%20part%20of%20an%20object%20displaces.%20Center%20of%20buoyancy%20is%20to%20center%20of%20volume%20as%20center%20of%20gravity%20is%20to%20center%20of%20mass.%0A%0A%20%20%20%20For%20the%20human%20body%20submerged%20in%20water%2C%20because%20different%20parts%20of%20the%20body%20have%20different%20densities%2C%20the%20center%20of%20buoyancy%20is%20at%20a%20different%20place%20than%20the%20center%20of%20gravity%2C%20see%20for%20example%20%5BYanai%20and%20Wilson%20(2008)%5D(https%3A%2F%2Fonlinelibrary.wiley.com%2Fdoi%2Fpdf%2F10.1002%2Fjst.23).%0A%0A%20%20%20%20%3Cfigure%20aria-describedby%3D%22figure-caption-2%22%3E%3Ccenter%3E%3Cimg%20src%3D'https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2Fbuoyance.png%3Fraw%3D1'%20width%3D400%20alt%3D'Center%20of%20gravity%20and%20center%20of%20buoyancy.'%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.%20Forces%20of%20gravity%20and%20buoyancy%20acting%20respectively%20on%20the%20center%20of%20gravity%20and%20center%20of%20buoyancy%20in%20a%20submerged%20human%20body%20(figure%20from%20Yanai%20and%20Wilson%20(2008)).%3C%2Fspan%3E%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%20Checkpoint%20questions%0A%0A%20%20%20%201.%20Why%20can%20two%20anthropometric%20tables%20give%20different%20estimates%20for%20the%20same%20person%3F%0A%20%20%20%202.%20What%20distinguishes%20a%20center-of-mass%20fraction%20from%20a%20radius-of-gyration%20fraction%3F%0A%20%20%20%203.%20Can%20a%20planar%20model%20determine%20all%20six%20independent%20components%20of%20a%203D%20inertia%20tensor%3F%0A%20%20%20%204.%20Revisit%20the%20opening%20challenge%3A%20what%20remains%20unknown%20after%20mass%20and%20height%20are%20measured%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%2F%2F%2F%20details%20%7C%20Checkpoint%20answers%0A%0A%20%20%20%201.%20Population%2C%20measurement%20method%2C%20and%20anatomical%20segment%20definitions%20differ.%0A%20%20%20%202.%20The%20first%20locates%20a%20point%3B%20the%20second%20determines%20an%20axis-specific%20inertia%20after%20squaring%20its%20dimensional%20radius.%0A%20%20%20%203.%20No%3B%20out-of-plane%20geometry%20or%20additional%20assumptions%20are%20needed.%0A%20%20%20%204.%20Segment%20mass%20distribution%2C%20lengths%2C%20landmarks%2C%20and%20axis-specific%20inertias%20remain%20individual%20quantities.%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%20Problems%0A%0A%20%20%20%201.%20Take%20a%20picture%20at%20the%20frontal%20plane%20of%20somebody%20standing%20on%20one%20foot%20on%20tiptoes%20with%20the%20arms%20and%20the%20other%20leg%20abducted%20at%20the%20horizontal.%3Cbr%3E%0A%20%20%20%20%20%201.%20Estimate%20the%20body%20center%20of%20mass%20of%20this%20person.%20Hint%3A%20for%20simplicity%2C%20consider%20the%20center%20of%20mass%20of%20each%20segment%20to%20be%20located%20at%20the%20middle%20of%20the%20segment%20and%20measure%20these%20positions%20using%20a%20image%20digitizer%2C%20e.g.%2C%20%5BWebPlotDigitizer%5D(https%3A%2F%2Fautomeris.io%2FWebPlotDigitizer%2F).%3Cbr%3E%0A%20%20%20%20%20%202.%20If%20the%20person%20is%20almost%20standing%20still%2C%20through%20which%20part%20of%20the%20body%20a%20vertical%20line%20through%20the%20center%20of%20mass%20should%20necessarily%20pass%3F%20Have%20you%20obtained%20this%20result%3F%20Comment%20on%20possible%20differences%20between%20the%20expected%20and%20obtained%20results.%0A%0A%20%20%20%202.%20Consider%20the%20following%20positions%20of%20markers%20placed%20on%20a%20leg%20(described%20in%20the%20laboratory%20coordinate%20system%20with%20coordinates%20%24x%2C%20y%2C%20z%24%20in%20cm%2C%20the%20%24x%24%20axis%20points%20forward%20and%20the%20%24y%24%20axes%20points%20upward)%3A%20lateral%20malleolus%20(**lm**%20%3D%20%5B2.92%2C%2010.10%2C%2018.85%5D)%2C%20medial%20malleolus%20(**mm**%20%3D%20%5B2.71%2C%2010.22%2C%2026.52%5D)%2C%20fibular%20head%20(**fh**%20%3D%20%5B5.05%2C%2041.90%2C%2015.41%5D)%2C%20and%20medial%20condyle%20(**mc**%20%3D%20%5B8.29%2C%2041.88%2C%2026.52%5D).%20Define%20the%20ankle%20joint%20center%20as%20the%20centroid%20between%20the%20**lm**%20and%20**mm**%20markers%20and%20the%20knee%20joint%20center%20as%20the%20centroid%20between%20the%20**fh**%20and%20**mc**%20markers%20(same%20data%20as%20in%20the%20%22Example%20with%20actual%20motion%20analysis%20data%22%20of%20the%20notebook%20%5BRigid-body%20transformations%20in%20three%20dimensions%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Ftransformation_3d.py)).%20Consider%20that%20the%20principal%20axes%20of%20the%20leg%20are%20aligned%20with%20the%20axes%20of%20the%20respective%20anatomical%20coordinate%20system.%3Cbr%3E%0A%20%20%20%20%20%201.%20Determine%20the%20center%20of%20mass%20position%20of%20the%20leg%20at%20the%20anatomical%20and%20laboratory%20coordinate%20systems.%3Cbr%3E%0A%20%20%20%20%20%202.%20Determine%20the%20inertia%20tensor%20of%20the%20leg%20for%20a%20rotation%20around%20its%20proximal%20joint%20and%20around%20its%20center%20of%20mass.%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%20original%20Problems%0A%0A%20%20%20%201.%20Your%20photograph%20determines%20the%20numerical%20result%3A%20%24%5Cmathbf%20r_C%3D%5Csum_i%20m_i%5Cmathbf%20r_%7BC_i%7D%2F%5Csum_i%20m_i%24.%20For%20quasi-static%20balance%20without%20external%20support%2C%20its%20vertical%20projection%20must%20lie%20inside%20the%20supporting%20foot%E2%80%99s%20contact%20area.%20Landmark%2C%20perspective%20and%20segment-model%20errors%20can%20explain%20disagreement.%0A%0A%20%20%20%202.%20Ankle%20center%3A%20%24(2.815%2C10.160%2C22.685)%24%20cm%3B%20knee%20center%3A%20%24(6.670%2C41.890%2C20.965)%24%20cm%3B%20length%3A%200.320096%20m.%20**Using%20the%20male%20de%20Leva%20shank%20parameters%20explicitly**%2C%20%24m_s%3D0.0433M%24%2C%20%24c%3D0.4395%24%2C%20and%20laboratory%20center%3A%20%24(4.97573%2C27.94467%2C21.72094)%24%20cm.%20With%20an%20anatomical%20origin%20at%20the%20knee%20and%20longitudinal%20axis%20pointing%20proximally%2C%20the%20center%20is%20%24(0%2C-0.140682%2C0)%24%20m.%20Principal%20center%20inertias%20are%20%24m_sL%5E2(0.251%5E2%2C0.246%5E2%2C0.102%5E2)%24%20in%20the%20table%E2%80%99s%20sagittal%2Ftransverse%2Flongitudinal%20order.%20In%20any%20declared%20orthonormal%20anatomical%20basis%2C%20%24I_P%3DI_C%2Bm_s%5B(r%5ETr)%5Cmathbf1-rr%5ET%5D%24%3B%20laboratory%20tensors%20are%20%24RI%20R%5ET%24.%20A%20numerical%20tensor%20requires%20body%20mass%20and%20the%20full%20anatomical-axis%20convention%3B%20the%20markers%20alone%20do%20not%20specify%20these%20choices.%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%20Go%20deeper%0A%0A%20%20%20%20**Optional%20Winter-table%20assignment.**%20Consider%20the%20kinematic%20data%20from%20table%20A.1%20of%20the%20Winter's%20book%20(Winter%2C%202009)%20used%20in%20problem%202%20of%20the%20notebook%20%5BAngular%20kinematics%20in%20a%20plane%20(2D)%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinematics_angular_2d.py).%3Cbr%3E%0A%20%20%20%201.%20Calculate%20the%20center%20of%20mass%20position%20for%20each%20segment%20and%20for%20the%20whole%20body%20(beware%20that%20no%20data%20are%20given%20for%20the%20head%20and%20arms%20segments)%20using%20the%20Dempster's%20and%20Zatsiorsky's%20models.%3Cbr%3E%0A%20%20%20%202.%20Perform%20these%20calculations%20also%20for%20the%20moment%20of%20inertia%20(of%20each%20segment%20and%20of%20the%20whole%20body%20around%20the%20corresponding%20centers%20of%20mass).%0A%0A%20%20%20%20The%20external%20table%20is%20needed%20for%20numerical%20work.%20Without%20head%20and%20arm%20data%2C%20report%20partial-body%20quantities%3B%20whole-body%20center%20and%20inertia%20are%20underdetermined.%0A%0A%20%20%20%20-%20%5BDrill%20et%20a.%20(1964)%5D(http%3A%2F%2Fwww.oandplibrary.org%2Fal%2F1964_01_044.asp)%20and%20%5BBj%C3%B8rnstrup%20(1995)%5D(http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.21.5223)%20for%20a%20historical%20overview%20on%20the%20estimation%20of%20body%20segment%20parameters.%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%20Video%20lectures%20on%20the%20Internet%0A%0A%20%20%20%20-%20%5BBody%20segments%20parameters%20in%20Biomechanics%5D(https%3A%2F%2Fyoutu.be%2F8hyPiha-lFU)%0A%20%20%20%20-%20%5BEstimating%20and%20Visualizing%20the%20Inertia%20of%20the%20Human%20Body%20with%20Python%5D(https%3A%2F%2Fyoutu.be%2FH9AK65ZY-Vw)%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%20Additional%20verified%20lecture%0A%0A%20%20%20%20%5BMIT%20OpenCourseWare%5D(https%3A%2F%2Focw.mit.edu%2Fcourses%2F8-01sc-classical-mechanics-fall-2016%2Fpages%2Fweek-5-momentum-and-impulse%2F17-1-definition-of-the-center-of-mass%2F)%20%E2%80%94%20Center%20of%20mass%3A%20compare%20the%20weighted-average%20definition%20with%20a%20physical%20balance%20argument.%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-%20Bj%C3%B8rnstrup%20J%20(1995)%20%5BEstimation%20of%20Human%20Body%20Segment%20Parameters%20-%20Historical%20Background%5D(http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.21.5223).%20Technical%20Report.%0A%0A%20%20%20%20-%20de%20Leva%20P%20(1996)%20%5BAdjustments%20to%20Zatsiorsky-Seluyanov's%20segment%20inertia%20parameters%5D(http%3A%2F%2Febm.ufabc.edu.br%2Fwp-content%2Fuploads%2F2013%2F12%2FLeva-1996.pdf).%20Journal%20of%20Biomechanics%2C%2029%2C%209%2C%201223-1230.%0A%0A%20%20%20%20-%20Dembia%20C%2C%20Moore%20JK%2C%20Hubbard%20M%20(2014)%20%5BAn%20object%20oriented%20implementation%20of%20the%20Yeadon%20human%20inertia%20model%5D(https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC4329601%2F).%20F1000Research.%202014%3B3%3A223.%20doi%3A10.12688%2Ff1000research.5292.2.%0A%0A%20%20%20%20-%20Drills%20R%2C%20Contini%20R%2C%20Bluestein%20M%20(1964)%20%5BBody%20segment%20parameters%3A%20a%20survey%20of%20measurement%20techniques%5D(http%3A%2F%2Fwww.oandplibrary.org%2Fal%2F1964_01_044.asp).%20Artificial%20Limbs%2C%208%2C%2044-66.%0A%0A%20%20%20%20-%20Kwon%20Y-H%20(1998)%20%5BBSP%20Estimation%20Methods%5D(http%3A%2F%2Fkwon3d.com%2Ftheory%2Fbsp.html).%0A%0A%20%20%20%20-%20Ruina%20A%2C%20Rudra%20P%20(2013)%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-%20Winter%20DA%20(2009)%20%5BBiomechanics%20and%20motor%20control%20of%20human%20movement%5D(https%3A%2F%2Fbooks.google.com.br%2Fbooks%3Fid%3D_bFHL08IWfwC).%204%20ed.%20Hoboken%2C%20EUA%3A%20Wiley.%0A%0A%20%20%20%20-%20Yanai%20T%2C%20Wilson%20BD%20(2008)%20%5BHow%20does%20buoyancy%20influence%20front-crawl%20performance%3F%20Exploring%20the%20assumptions%5D(https%3A%2F%2Fonlinelibrary.wiley.com%2Fdoi%2Fpdf%2F10.1002%2Fjst.23).%20Sports%20Technol.%2C%201%202%E2%80%933%2C%2089%E2%80%9399.%0A%0A%20%20%20%20-%20Zatsiorsky%20VM%20(2002)%20%5BKinetics%20of%20human%20motion%5D(https%3A%2F%2Fbooks.google.com.br%2Fbooks%3Fid%3Dwp3zt7oF8a0C%26lpg%3DPA571%26ots%3DKjc17DAl19%26dq%3DZATSIORSKY%252C%2520Vladimir%2520M.%2520Kinetics%2520of%2520human%2520motion%26hl%3Dpt-BR%26pg%3DPP1%23v%3Donepage%26q%26f%3Dfalse).%20Champaign%2C%20IL%3A%20Human%20Kinetics.%0A%0A%20%20%20%20-%20Some%20of%20the%20original%20works%20on%20body%20segment%20parameters%3A%0A%0A%20%20%20%20-%20Contini%20R%20(1972)%20%5BBody%20Segment%20Parameters%2C%20Part%20II%5D(http%3A%2F%2Fwww.oandplibrary.org%2Fal%2F1972_01_001.asp).%20Artificial%20Limbs%2C%2016%2C%201-19.%0A%0A%20%20%20%20-%20Dempster%20WT%20(1955)%20%5BSpace%20requirements%20of%20the%20seated%20operator%3A%20geometrical%2C%20kinematic%2C%20and%20mechanical%20aspects%20of%20the%20body%2C%20with%20special%20reference%20to%20the%20limbs%5D(http%3A%2F%2Fdeepblue.lib.umich.edu%2Fhandle%2F2027.42%2F4540).%20WADC%20Technical%20Report%2055-159%2C%20AD-087-892%2C%20Wright-Patterson%20Air%20Force%20Base%2C%20Ohio.%0A%0A%20%20%20%20-%20Hanavan%20EP%20(1964).%20%5BA%20mathematical%20model%20of%20the%20human%20body%5D(http%3A%2F%2Fwww.dtic.mil%2Fcgi-bin%2FGetTRDoc%3FAD%3DAD0608463).%20AMRL-TR-64-102%2C%20AD-608-463.%20Aerospace%20Medical%20Research%20Laboratories%2C%20Wright-Patterson%20Air%20Force%20Base%2C%20Ohio.%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
a634d9262aba6b5effc6ee39927cb629