Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2022 Jan 24.
Published in final edited form as: J Open Source Softw. 2021 Dec 21;6(68):3490. doi: 10.21105/joss.03490

Kinematics-vis: A Visualization Tool for the Mathematics of Human Motion

Klevis Aliaj 1,2, Heath B Henninger 1,2,3,*
PMCID: PMC8786220  NIHMSID: NIHMS1771600  PMID: 35079685

Summary

Kinematic analysis studies characterize human motion in healthy, pathologic, and rehabilitated subjects. These studies provide rich datasets which enable clinicians and researchers to understand disease progression, and the effects of surgical intervention and physical therapy. A variety of techniques – ranging from optical skin marker tracking to biplane fluoroscopy – are utilized to collect these datasets. The quantification and physical interpretation of these motion capture datasets (i.e. kinematic analysis) are predominantly conducted using Euler/Cardan angles (Diebel, 2006; Wikipedia, 2021; Zatsiorsky, 1998), whose output – time series of 3 angles – is presented in peer-reviewed manuscripts in 2D graphs (Ludewig et al., 2009). This rudimentary presentation, however, obscures the physical meaning behind Euler/Cardan analysis. As other authors have noted, the visualization of these angles enables meaningful discussion between biomechanics researchers and clinicians (Baker, 2011). A ubiquitous open-source method to concurrently visualize recorded human motion and the results of kinematic analysis is presently lacking in the biomechanics community. ‘Kinematics-vis’ is a JavaScript web application that visualizes kinematic analysis output resulting from motion capture studies.

Statement of need

3D rotations are utilized to quantify human motion and in kinematic analysis. However, because 3D rotations belong to the SO(3) mathematical group, they can be difficult to understand – especially for biomechanics researchers and clinicians with a limited mathematical background. Euler/Cardan angles are typically utilized to infuse physical meaning into kinematic analysis (Diebel, 2006; Wikipedia, 2021; Zatsiorsky, 1998). However, they are described abstractly and attempts towards visualizing their physical underpinning is rarely made (Baker, 2011). Furthermore, 12 Euler/Cardan angle sequences exist for quantifying 3D orientations, and which sequence is most appropriate for quantifying human motion is debatable and varies by study (Krishnan et al., 2019). It has previously been shown that incorrect usage of Euler/Cardan sequences can significantly misrepresent human motion (Aliaj et al., 2021). Furthermore, studies rarely present multiple Euler/Cardan sequences in publications – which clouds data interpretation and limits the ability to compare results between laboratory groups and studies.

‘Kinematics-vis’ is a JavaScript web application that visualizes different methods of quantifying and decomposing human motion including, but not limited to, Euler/Cardan angles Figure 1. The software enables researchers to visualize different kinematic analysis methods while outputting the 2D time-series graphs that are typically presented in peer-reviewed manuscripts (Ludewig et al., 2009). Presently, ‘kinematics-vis’ is specialized to study shoulder kinematic analysis. However, it is easily expandable to accommodate the decomposition sequences of other joints, including subject-specific 3D anatomic models. ‘Kinematics-vis’ is designed to work from a central motion capture dataset, but also enables the visualization of singular motion files. JavaScript and WebGL, the technologies which underlie ‘kinematics-vis,’ are ubiquitous and a standard in modern web browsers – which facilitates collaboration between researchers and clinicians.

Figure 1:

Figure 1:

Example display of a shoulder motion analyzed using kinematics-vis. Arm elevation is shown with the humerus motion decomposed using the International Society of Biomechanics (ISB) yx’y’ ’ sequence (top left) and scapular motion decomposed using the ISB yx’z’ ’ sequence (top right). The 3D “Preview” view (bottom left) visualizes the simultaneous motion of the humerus and scapula. The 2D kinematic curves typically presented in peer-reviewed articles are also presented (bottom right).

A variety of commercial musculoskeletal modeling software are utilized in biomechanics, including AnyBody (AnyBodyTech, 2020) and Visual3D (CMotion, 2021). Computational kinematics packages (e.g. rotation matrices, trajectory generation, quaternions) are abundant and are typically provided as part of scientific computing environments – e.g. SciPy Spatial Transform package (SciPy-Developers, 2021) – but, visualization software is scarce. The open-source musculoskeletal modeling software OpenSim (Delp et al., 2007) does provide the ability to visualize the movement of bones and joints. However, what is missing from all the aforementioned software is the ability to visualize how decomposition methods (particularly Euler/Cardan angles) quantify human motion. Because 12 Euler/Cardan angle sequences exist, the choice of such a sequence can have a meaningful effect on the kinematic plots presented in biomechanics studies to researchers and clinicians (Aliaj et al., 2021; Baker, 2011). Notably, (Baker, 2011) visually demonstrates how the measured joint angles are affected by the chosen Euler/Cardan angle sequence and argues that “only when we can adequately visualise these angles that we can engage in meaningful consideration of which orientation this is.” Although (Baker, 2011) represents the first attempt at visualizing these angles in biomechanics literature, the presented analysis is static. It consists of a series of screenshots in a journal article.

The solution presented herein enables biomechanics researchers to visualize the 3D angles that Euler/Cardan decompositions quantify, and to associate these 3D angles with typical 2D plots. The interactive nature of the software also enables exploration that is not possible within the confines of a journal article page. The presented software can be especially useful to novice biomechanics researchers (e.g. undergraduate and graduate students) for learning kinematic analysis. The downside of the presented software is that it offers only kinematic analysis within the musculoskeletal modeling and analysis domain. Perhaps a better approach is to include this software as a plug-in to OpenSim (Delp et al., 2007). The downside of the plug-in approach is that researchers that perform kinematic analysis may not perform subsequent modeling. Regardless, it would be a good idea to consider whether future iterations of this software should be developed as a plug-in to OpenSim (Delp et al., 2007).

Human motion analysis is a complex topic. Biomechanists, clinicians, and trainees typically accept the results of research papers without having a consistent way to validate these results. ‘Kinematics-vis’ enables discussion amongst all parties interested in human motion analysis and obviates the need for a significant mathematical background. ‘Kinematics-vis’ provides a means for researchers to make their motion capture datasets visually explorable. This provides insight which is missing in the 2D graphs accompanying peer-reviewed publications. This software can be used as an adjunct to published manuscripts to allow readers to analyze a motion of interest both visually and quantitatively.

Mathematics

Minimally, kinematic analysis in biomechanics can be thought of as three steps:

  1. Establishing an orthogonal coordinate system associated with each bone of interest via bony landmarks.

  2. Tracking the position and orientation (pose) of the bones of interest with respect to each other and/or an external coordinate system of interest.

  3. Quantifying the position and orientation of the bones of interest by utilizing various decomposition techniques. For example, orientation is frequently decomposed via a specific Euler/Cardan sequence.

Each of these three steps can be accomplished in a variety of ways. In order to standardize these steps and increase reproducibility between biomechanics laboratories, the International Society of Biomechanics (ISB) has issued guidelines via a series of journal articles (Wu et al., 2005). However, there is still debate on whether these guidelines are appropriate for all investigations (Phadke et al., 2011). The excellent review article by (Krishnan et al., 2019) provides an overview of the multitude of functional kinematic representations of the shoulder joint and provides a succinct introduction to the underlying mathematics.

The mathematical representation of orientation (3D rotations) can be difficult to understand because 3D rotations are unintuitive for most biomechanics researchers. Finite 3D rotations cannot be added and do not commute - therefore they do not form a vector space but belong to the mathematical group termed SO(3). Typically, long bone axial orientation/rotation is the kinematic component that is subject to the most debate and misunderstanding (Cheng et al., 2000; Miyazaki & Ishida, 1991). With the visual insights gleaned from the presented software, we demonstrated how to correctly measure axial rotation for long bones (Aliaj et al., 2021; Miyazaki & Ishida, 1991).

Acknowledgements

Research reported in this publication was supported by the National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS) of the National Institutes of Health under award number R01 AR067196, and a Shared Instrumentation Grant S10 OD021644. The research content herein is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

References

  1. Aliaj K, Foreman KB, Chalmers PN, & Henninger HB (2021). Beyond Euler/Cardan analysis: True glenohumeral axial rotation during arm elevation and rotation. Gait & Posture, 88, 28–36. 10.1016/j.gaitpost.2021.05.004 [DOI] [PMC free article] [PubMed] [Google Scholar]
  2. AnyBodyTech. (2020). AnyBody technology. https://www.anybodytech.com
  3. Baker R (2011). Globographic visualisation of three dimensional joint angles. Journal of Biomechanics, 44(10), 1885–1891. 10.1016/j.jbiomech.2011.04.031 [DOI] [PubMed] [Google Scholar]
  4. Cheng PL, Nicol AC, & Paul JP (2000). Determination of axial rotation angles of limb segments - a new method. Journal of Biomechanics, 33(7), 837–843. 10.1016/s0021-9290(00)00032-4 [DOI] [PubMed] [Google Scholar]
  5. CMotion. (2021). CMotion Visual3D. https://www.c-motion.com/#visual3d
  6. Delp SL, Anderson FC, Arnold AS, Loan P, Habib A, John CT, Guendelman E, & Thelen DG (2007). OpenSim: Open-source software to create and analyze dynamic simulations of movement [Journal Article]. IEEE Transactions on Biomedical Engineering, 54(11), 1940–1950. 10.1109/TBME.2007.901024 [DOI] [PubMed] [Google Scholar]
  7. Diebel J (2006). Representing attitude : Euler angles, unit quaternions, and rotation vectors [Report]. Stanford University. [Google Scholar]
  8. Krishnan R, Bjorsell N, Gutierrez-Farewik EM, & Smith C (2019). A survey of human shoulder kinematic representations. Medical & Biological Engineering & Computing, 57(2), 339–367. 10.1007/s11517-018-1903-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Ludewig PM, Phadke V, Braman JP, Hassett DR, Cieminski CJ, & LaPrade RF (2009). Motion of the shoulder complex during multiplanar humeral elevation. Journal of Bone and Joint Surgery, American Edition, 91(2), 378–389. 10.2106/jbjs.g.01483 [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Miyazaki S, & Ishida A (1991). New mathematical definition and calculation of axial rotation of anatomical joints. Journal of Biomechanical Engineering, 113(3), 270–275. 10.1115/1.2894884 [DOI] [PubMed] [Google Scholar]
  11. Phadke V, Braman JP, LaPrade RF, & Ludewig PM (2011). Comparison of glenohumeral motion using different rotation sequences. Journal of Biomechanics, 44(4), 700–705. 10.1016/j.jbiomech.2010.10.042 [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. SciPy-Developers. (2021). SciPy spatial transformations. https://docs.scipy.org/doc/scipy/reference/spatial.transform.html [Google Scholar]
  13. Wikipedia. (2021). Euler angles. https://en.wikipedia.org/wiki/Euler_angles [Google Scholar]
  14. Wu G, Helm FC, van der H. E. Veeger, Makhsous M, Van Roy P., Anglin C, Nagels J, Karduna AR, McQuade K, Wang X, Werner FW, & Buchholz B (2005). ISB recommendation on definitions of joint coordinate systems of various joints for the reporting of human joint motion–Part II: shoulder, elbow, wrist and hand. Journal of Biomechanics, 38(5), 981–992. 10.1016/j.jbiomech.2004.05.042 [DOI] [PubMed] [Google Scholar]
  15. Zatsiorsky VM (1998). Kinematics of human motion [Book]. Human Kinetics. ISBN: 0-88011-676-5 [Google Scholar]

RESOURCES