Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Three-dimensional polygonal muscle modelling and line of action estimation in living and extinct taxa

## Abstract

Biomechanical models and simulations of musculoskeletal function rely on accurate muscle parameters, such as muscle masses and lines of action, to estimate force production potential and moment arms. These parameters are often obtained through destructive techniques (i.e., dissection) in living taxa, frequently hindering the measurement of other relevant parameters from a single individual, thus making it necessary to combine multiple specimens and/or sources. Estimating these parameters in extinct taxa is even more challenging as soft tissues are rarely preserved in fossil taxa and the skeletal remains contain relatively little information about the size or exact path of a muscle. Here we describe a new protocol that facilitates the estimation of missing muscle parameters (i.e., muscle volume and path) for extant and extinct taxa. We created three-dimensional volumetric reconstructions for the hindlimb muscles of the extant Nile crocodile and extinct stem-archosaur Euparkeria, and the shoulder muscles of an extant gorilla to demonstrate the broad applicability of this methodology across living and extinct animal clades. Additionally, our method can be combined with surface geometry data digitally captured during dissection, thus facilitating downstream analyses. We evaluated the estimated muscle masses against physical measurements to test their accuracy in estimating missing parameters. Our estimated muscle masses generally compare favourably with segmented iodine-stained muscles and almost all fall within or close to the range of observed muscle masses, thus indicating that our estimates are reliable and the resulting lines of action calculated sufficiently accurately. This method has potential for diverse applications in evolutionary morphology and biomechanics.

## Introduction

Over the last two decades, three-dimensional (3D) muscle reconstructions have become common practise in palaeobiology, comparative morphology and biomechanics1,2,3. Contrast-enhanced CT (e.g., “diceCT”4) scanning is, contrary to traditional dissection, mostly non-destructive and allows the investigation of internal structures and soft-tissues selectively and in situ5,6,7,8,9,10,11,12,13,14,15,16,17, which can provide useful data for 3D reconstructions. DiceCT facilitates measuring muscle parameters such as volume10,12,13,18,19,20,21,22 and architecture; e.g. fascicle length and orientation18,23,24,25,26,27,28. Accurate muscle parameters are essential for biomechanical analyses that estimate movement performances29,30,31,32,33.

In extinct taxa, volumetric muscle reconstructions have mostly focused on the jaw adductor musculature2,3,34,35,36,37,38,39,40,41,42, as their size is constrained by surrounding bones, i.e., the adductor chamber in reptiles or the zygomatic arch in mammals and, therefore, require fewer assumptions about their extent43; but see33. The appendicular musculature is usually simplified and reconstructed in form of lines of actions (LoA) for biomechanical analyses44,45,46,47,48,49,50,51,52,53,54, with only a few comparative studies conducting volumetric muscle reconstructions in the tail55,56,57,58,59,60. There is a clear need for a method to predict appendicular muscle parameters for extinct taxa that take their individual limb morphology accurately into account.

Volumetric reconstructions of muscles in extinct taxa are challenging, as the exact maximal 3D extents of muscle boundaries are unknown and, therefore, might be based on flawed assumptions. However, through comparison with extant taxa and osteological correlates from the outgroup-based extant phylogenetic bracket (EPB61,62), we can better infer the maximal dimensions of muscles, e.g., see56,59,63,64,65,66. Further constraints on muscle sizes can be based on the spatial organisation of epaxial, hypaxial and appendicular musculature from extant taxa59.

Here we describe and test a new method for volumetric 3D musculature reconstructions for extant and extinct taxa (Fig. 1), first applied in Díez Díaz et al.59. Instead of using non-uniform R B-splines (NURBS) to reconstruct the musculature (e.g.33,56,58,66), we present an approach similar to ‘box modelling’67. In contrast to lofting a surface over multiple rings or curves (e.g., see33,58,60,64,68,69) with only limited control, polygonal modelling allows adjustment of every vertex individually, to extrude new faces, as well as to create holes, which can later be filled (i.e., closed) again, allowing modelling of muscles with complex geometry (e.g., with multiple heads or tendons; see Supplementary Information). This new approach makes it possible to build the musculature in relatively low resolution and, therefore, permits quick adjustments. It further allows smoothing the muscles after completion in order to get a more detailed reconstruction with higher realism (and, presumably, precision), which can be previewed at all times during the construction process to visualize the effect of the placement of individual vertices. Importantly, we test the method’s accuracy against different data from extant taxa: both measured (via dissection) and derived from contrast-enhanced CT scanning data for crocodylian (Crocodylus niloticus) hindlimb muscles; and both measured and derived from surface scanning for Western lowland gorilla (Gorilla gorilla gorilla) shoulder muscles. We then apply our method to reconstruct the hindlimb musculature of the extinct archosauriform Euparkeria capensis (a distant relative of Crocodylia) to demonstrate the applicability to extinct taxa. The 3D muscle reconstructions then acts as foundation to estimate their respective LoA in an automated fashion based upon user defined input parameters in a single software package: Autodesk Maya (https://www.autodesk.com/products/maya/overview).

## Results

### Crocodile muscle mass comparison

As a major goal of our method is to enable the reconstruction of 3D musculature in extinct animals, we evaluated the methodology first on an animal for which we had maximally comparable data. Overall, the range of the reconstructed muscle mass estimates overlapped with the range of the physical measurements of crocodylians (Fig. 2b). However, the estimates were generally lower in mass; the polygonal modelling muscle masses were on average 38.6% lower and the diceCT-based estimates were 56.4% lower than the measured muscle masses (see Table 1; Fig. 2f,g). The Bland–Altman plots revealed under-predicted values for both the polygonal modelling (bias − 0.000318 ± 0.000133) and segmented diceCT-based muscles (bias − 0.000334 ± 0.000187) in comparison with the physical measurements. A Mann–Whitney U test showed no significant difference (W = 170, p-value = 0.1474) between the muscle mass estimates of the polygonal modelling approach (n = 20) and the segmented diceCT-based muscles (n = 13). However, both values were significantly lower than the body-mass-normalised physical measurements of other specimens of C. niloticus (n = 160, W = 4348, p-value < 0.001 for comparison with the former and W = 3240, p-value < 0.001 for the latter; Fig. 2b). Unfortunately, we could not compare the reconstructed muscle masses directly with the actual muscle masses of the same specimen, as in some previous studies, and not all muscles could be segmented reliably from the diceCT data and were thus excluded (Table 2).

### Gorilla shoulder muscle reconstruction

To be able to create accurate LoAs, individual 3D muscle bellies need to be reconstructed accurately and differences between dissection data and the muscle mass calculations from 3D models should therefore be minimal. We modelled five shoulder muscles of the gorilla specimen (Fig. 3). To evaluate the accuracy of the modelled muscles, their calculated masses were compared with dissection-based measurement data (Table 3) published by van Beesel et al.70. The virtual muscle masses matched the measured muscle masses with a total mass of 0.462 kg in the former and 0.475 kg in the latter, an overall underestimation of just 2.695%, indicating that the resulting LoAs (Fig. 3c,d) were also reasonable.

### Euparkeria muscle reconstruction

We reconstructed the complete pelvic and hindlimb musculature of a Mesozoic reptile in 3D for the first time that we are aware of (Figs. 1b,d, 4a). The reconstruction is based on muscular information from the EPB and additional Alligator hindlimb cross-sections (Fig. 5; Supplementary Figures S1S3) to constrain their size and spatial organisation. Our code (provided in the Supplementary Information) successfully estimated the LoAs automatically (Fig. 4a), guided by the 3D muscle reconstructions. Calculated LoAs can then be transferred into specialist software, such as OpenSim71, for future biomechanical modelling and other analyses (Fig. 4b).

## Discussion

In this study, we present an iterative polygonal modelling approach used to virtually reconstruct 3D muscle volumes of different species. Using custom written code (See Supplementary Information), we were able to create a LoA for each individual muscle based on the respective muscle volume in a single software package with high geometric accuracy. LoAs are important for studies interested in musculoskeletal function29,50,53,54,70,72. For such studies, LoA reconstructions become now easily available by applying the Maya muscle line of action estimation code (provided in the Supplementary Information) on volumetric muscle models, either derived from diceCT scanning or reconstructed using our approach, without the need to transfer them into other software packages73,74. This procedure allowed us to directly establish their spatial relationships with the respective body segments, which would be valuable for subject-specific musculoskeletal models.

Our approach in combination with tomographic data allows reduction of the amount of uncertainty in the muscle reconstruction of extinct taxa (in combination with the EPB) and additionally facilitates the three-dimensional quantification of muscle geometry in extant taxa where other means are impossible; e.g. lack of contrast-stained CT/MRI-scanned specimens. It also allows estimation of muscle parameters to match best-practice workflows, e.g.29,74,75,76,77, and due to advantage of 3D muscle models our method can be directly combined with other methods, such as muscle discretization78,79, if multiple lines of action are desired, or biomechanical modelling and simulation29,46,77,80. Additionally, the muscle models could be directly used for finite element (FE) analyses as they are already quadrilaterally tessellated81, or could even act as subject-specific target meshes for fibre registration in FE models82. Furthermore, 3D reconstructions of the shape of individual muscles and the configuration of the musculature are enabled for extant taxa when only surface models and dissection data are available, thus facilitating further downstream analyses. Capturing surface data during a dissection, either through photogrammetry or other surface digitization techniques1,83,84,85,86,87, and reconstructing the musculature using our approach could streamline the pipeline for comparative morphological analyses8,22,27,70,72,88 as well as biomechanical models and simulations. Our method enables the subject-specific quantification of muscle attachment area as well as muscle shape and path estimations, information usually lost during dissection, which, however, is crucial for musculoskeletal modelling29.

The masses of the reconstructed Gorilla muscles were evaluated to ensure accuracy in the muscle belly reconstruction and thus LoA estimation for a subject-specific musculoskeletal model. Because the muscle belly reconstructions accurately describe the muscle belly shape (guided by the surface scans) and reasonably approach the muscle mass, the resulting LoA calculations for the Western lowland gorilla were, therefore, deemed accurate (Fig. 3c,d). Discrepancies in the muscle masses are relatively minor as the muscles could be guided directly with the dissection surface scans, not needing to be approximated using cross-sections. Superficial muscles of the gorilla were more difficult to accurately reconstruct than deeper muscle layers. Muscles tightly constrained by bone such as the M. supraspinatus and M. infraspinatus showed little discrepancy between modelled and measured muscle masses (Table 3). The relative position of the humerus to the scapula during surface scanning had a greater influence on the muscle shapes and resulting masses (± 10%) than for deeper muscles (± 1%). However, the overall discrepancy in the M. deltoideus muscle mass was only around 5% (Table 3), which might indicate that the discrepancy in the different heads can in part be explained by uncertainties where the muscle was split into subsections. For future studies we recommend fixing the bones in situ at a constant orientation for surface scanning to minimise the influence of different bone orientations on the muscle reconstructions. Nevertheless, the minor percentage differences between the modelled and measured muscle masses (Table 3) indicate the suitability and adaptability of the iterative polygonal modelling approach to reconstruct individual muscle bellies from surface scan data for sufficiently accurate LoA estimation.

The crocodylian muscle mass estimates of the iterative polygonal modelling approach overall match the masses obtained from the iodine-stained CT data (Fig. 2b), which was previously demonstrated to be an accurate method for quantifying muscle mass in avian limb muscles21. Potential discrepancies in the crocodile muscle mass estimates and physical measurements could be attributed to errors in the muscle modelling process; or to simplifications in the assumption of muscle composition (i.e., the 3D model assumed a homogeneous mass distribution). These differences could indicate that our crocodile specimen was either heavier than expected, thus reducing our body-mass-normalised muscle mass estimates or that simplifications in the modelling process negatively affected the muscle masses. The simplification of the muscle into quasi-cylinders results in negative spaces between the muscles that cannot be filled without intersections of the musculature elsewhere. This negative space was absent in the segmented diceCT muscles due to their higher resolution and represents a limitation of our modelling approach.

The masses of larger muscles appeared to be more difficult to estimate (Fig. 2) and were more likely to be underestimated in both the polygonal modelling (Fig. 2c,f) and diceCT segmentation (Fig. 2d,g), evident from the linear regressions with a slope substantially lower than 1 (0.39 for polygonal modelling, adjusted R2 = 0.6977, and 0.32 for diceCT-based, adjusted R2 = 0.6967). The diceCT-based muscles potentially ‘underperformed’ (Fig. 2d,g) as the tendons could not be segmented and the resulting volumes, and therefore masses, were thus smaller. In smaller muscles (e.g., IT1), the polygonal model-reconstructed muscle fell close to the median of the observed data (between Q1 and Q3, Fig. 2a), whereas the diceCT-segmented muscle was just within the range of observations. Another reason why the iodine-stained segmentation underperformed could be that the muscles may have undergone volume shrinkage (dehydration) during fixation21,89,90,91,92 and may, therefore, have been smaller than expected from the physical measurements. The polygonally modelled muscles, which included the tendons in the volume calculations, however, ignored the ~ 5% higher density of the tendons (1120 kg/m3;93), which potentially negatively influenced their muscle mass estimates as well. Partitioning muscle segments into muscle and tendon is not straightforward for extant taxa and particularly difficult for extinct taxa, for which no muscle architectural information is directly preserved. However, the density difference affects only a small part of the total volumes and is thus almost negligible. A correction factor could address this issue, which, however, might not be uniformly applicable to all taxa without assuming musculoskeletal isometric scaling and could thus potentially be problematic in itself. It is, nonetheless, very encouraging that the muscle mass estimates of the iterative polygonal modelling approach generally matched the masses obtained from the iodine-stained CT data (Fig. 2b,e,h) and thus indicate reliable results. Especially, as Bribiesca-Contreras and Sellers21 generally found robust agreement between volume calculations of diceCT segmented muscles and physical measurements of those same muscles.

The LoA calculations based on the modelled muscles realistically described the LoA on the path from muscle origin to insertion (i.e., Fig. 3c,d) in most cases. In a specific and limited case, the LoA calculations slightly deviated from the presumed actual LoA, such as the kink in the LoA of the M. deltoideus spinalis (Fig. 3d). This discrepancy could be directly attributed to a limitation of the way the LoAs are calculated. Due to the wide attachment area, which is angled in relation to the long axis of the muscle, and a single vector along the muscle long axis describing the cut axis, the muscle was not sliced parallel to the origin surface but at an angle incorporating the medial part of the attachment into the slices. This artificially dragged the slice centroids towards the medial side (see Supplementary Figure S6). Therefore, our LoA estimation script might result in slight deviations of the LoA close to the attachment site for muscles with sheath-like and wide attachment areas; a similar limitation was discussed by Allen et al.73. However, these deviations should not directly affect LoA-dependent measurements (i.e., moment arms) as the discrepancy is regionally contained (close to the attachment site) and the LoA can be corrected in other software packages used for LoA-dependent measurements such as OpenSim53,54,70,71,72,74,76,94, GaitSym47,50,95,96,97 or Simm52,98,99,100,101,102. Therefore, the iterative polygonal modelling approach offers an intuitive way to streamline all muscle modelling steps in which: (1) during dissection of a species to collect parametrical information, the researcher can scan each muscle layer to produce 3D models of each layer, from which (2) the muscle layers can directly be used to guide 3D modelling of each specific muscle of interest, after which (3) parametrical information from dissection and the 3D muscle model can be combined to produce a specified LoA per muscle in musculoskeletal modelling software (e.g., GaitSym, OpenSim, Simm), complete with subject-specific muscle parameters. This may then minimise potential modelling errors, which may be apparent in other studies. For example, in Wiseman et al.76 different specimens of the same species each provided independent information (i.e., one specimen was dissected, whereas a different specimen provided muscle paths via diceCT-based scanning). This information then had to be scaled accordingly to produce a singular musculoskeletal model.

In conclusion, the workflow presented herein and evaluated using data from crocodylians and Gorilla enables the reconstruction of crucial missing muscle parameters for biomechanical models and simulations of living and extinct animals with more confidence and allows appraising values predicted through other methods. Overall our results show that the method yields reasonable estimates for muscle masses and sufficiently accurately describes LoAs in extant animals, and therefore should be directly applicable to extinct animals, as demonstrated for Euparkeria. We, therefore, advocate the suitability of iterative polygonal modelling guided via physical cross-sections (Fig. 5), or diceCT and/or MRI-scan slices to model musculature in extant and extinct species. This method circumvents the often prohibitive cost of many segmentation software packages1, which can be limiting to many researchers. Rather, this method is ready for use in Maya, which is free to all researchers/academics registered at an educational institution (schools, colleges, universities and home-school programs worldwide which are government accredited). Alternatively, the method is generally adaptable for use in freeware, such as Blender software (https://www.blender.org/). The wide applicability of our method will have great advantages for improving the development of subject-specific models. Additionally, our approach represents a valid and fast alternative to CT scanning of iodine-stained specimens (diceCT) for cases in which the latter is not feasible (e.g. costs or availability of materials, specimens and/or CT scanners; time-consuming nature of manual segmentation1).

## Material and methods

Several taxa were chosen as case studies to test and evaluate our methodology. No animals were harmed for the purposes of this study. In sum, our workflow pattern was structured as follows: to model the musculature of an extinct species (here, Eupakeria capensis), we first had to model the musculature of a comparative extant species (Crocodylus niloticus). We then statistically determined the efficacy of our procedure. Next, to determine if the method was adaptable to other forms of data capture, we modelled the musculature of another extant species (Gorilla gorilla gorilla) based upon data collected during dissection, thus streamlining the whole process. Each process is described in detail below and/or the Supplementary Information.

### Extant reptile: Nile crocodile

The Nile crocodile (Crocodylus niloticus) allowed us to evaluate our results with a maximally comparable dataset. Skeletal and muscle geometry were obtained from an iodine-stained and μCT scanned (diceCT4) hindlimb of a single juvenile female individual (see: Supplementary Information for scan parameters and further information). Hindlimb muscle measurements of various Nile crocodile specimens were obtained from Allen et al.103, Wiseman et al.76 and this study (see Supplementary Information for raw measurements).

### Extinct fossil reptile: Euparkeria

Euparkeria capensis is a small archosauriform from the Middle Triassic Burgersdorp Formation of South Africa104. Its osteology is well known from numerous specimens104,105 and it is a phylogenetically important taxon as a close relative of the last common ancestor of birds and crocodiles105,106,107. It is therefore a key taxon to investigate the ecology and ancestral locomotory capabilities of archosaurs108,109,110. Additionally, its limb morphology is similar to modern crocodilians108 and thus well suited as a case study to volumetrically reconstruct the hindlimb musculature of an extinct taxon. Multiple individuals from the Iziko South African Museum, Cape Town, South Africa (SAM) and University Museum of Zoology Cambridge, Cambridge, UK (UMZC) were μCT scanned in Stellenbosch, South Africa and Cambridge, UK (see Supplementary Information for scan parameters and further information) and scaled isometrically to the most-complete specimen (SAM PK 5867). The composite hindlimb skeleton and pelvic girdle was articulated in an osteologically feasible posture110 for muscle reconstruction.

### Extant mammal: Western lowland gorilla

The Western lowland gorilla (Gorilla gorilla gorilla) offered a unique opportunity to test the methodology on a single specimen for which a multitude of data was available. Surface scans capturing muscle orientation and attachment sites were obtained during the dissection that provided muscle architectural measurements using a structured-light surface scanner (Artec Space Spider with Artec Studio 12, Artec 3D, Luxembourg). The skeletal geometry was obtained from a medical CT scan performed at the Ohio State University College of Veterinary Medicine94; see Supplementary Information for further information. The female specimen died of old age and was donated by the Cleveland Metroparks Zoo to the Cleveland Museum of Natural History for research purposes.

### Polygonal muscle modelling approach

The fundamental basis for every muscle in our 3D modelling approach builds a closed cylinder, which is morphed to match the shape of the muscle, with 8, 12 or 16 faces describing its circumference, depending on the surface area of the muscle origin and muscle complexity, whereas the caps represent the origin and insertion respectively. The height (i.e., the long axis) of this cylinder can be arbitrarily and iteratively subdivided and adjusted to alter the circumference and shape of the cross-section at any given point, or to change the curvature and path of the modelled muscle to prevent it from intersecting with other muscles or bones. We used the software package Autodesk Maya 2019 in this study, which is freely available for educational/academic usage. Some other software packages, e.g. the open-source freeware Blender, allow for the same 3D modelling approach (see1,111 for further examples). The general workflow of the 3D muscle modelling may differ slightly based on the software package used; however, the workflow should be readily adaptable.

#### Iterative polygonal muscle modelling

This workflow allows the three-dimensional estimation of muscle volumes and paths for extant and extinct taxa of which 3D scans of bones have been acquired but no direct information on muscle volume is present. We developed the workflow based on the extant Nile crocodile (Crocodylus niloticus; 3D bone models were obtained from76; Fig. 1a,c) and the extinct stem-archosaur Euparkeria capensis (3D bone models were obtained from110; Fig. 1b,d). The muscle size was qualitatively constrained by physical cross-sections of Alligator mississippiensis hindlimbs (Fig. 5 and additional photographs of the cross-sections are provided in the Supplementary Information; Supplementary Figures S1S3), which were used as guides along the thigh (for both the crocodile in our sample to test our method vs. diceCT data, and Euparkeria) and the shank (Euparkeria only). As alligators and crocodiles are both crocodylians and Euparkeria also had a similar limb morphology108, we used alligator cross-sections as constraints. For the general application of this method to other taxa, it should be suitable to use any closely related and/or morphologically similar taxon/taxa to constrain the musculature. We advise to use such tomographic data (physical, CT or MRI if available) of closely related taxa in combination with information derived from the EPB53 to guide the reconstruction of the missing musculature and constrain their extent and spatial organisation, which can be highly evolutionarily constrained in vertebrates8,112,113,114,115,116,117; but see118, thus addressing one of the major uncertainties in the modelling process, see59. The step-by-step guide of our polygonal muscle modelling approach is described in detail in the Supplementary Information.

#### Application to surface data (surface mesh retopology)

Iterative polygonal modelling is not limited to cross-sectional information, this method can be used in conjunction with muscle surface scan data that can (1) streamline processes in which the user can also collect dissection data at the same time as muscular configurations, and (2) further minimise costs and time commitment for the user because expensive CT-scan data after lengthy staining processes do not need to be collected1. However, it is not required to use surface scan-technology that can be expensive and prohibitive itself85,87; photogrammetry is an alternative possibility84,86, in which the user can further minimise total costs by even using a personal smartphone rather than an expensive camera or laser scanning87 to capture a series of photographs and then subsequently use freeware to build 3D models of each muscle layer (e.g.1,83).

We modelled individual muscle bellies of a Western lowland gorilla specimen through retopology81,119,120 of surface scan data that were collected during dissection of the shoulder musculature in combination with CT scan-derived bone models of the same specimen94 (see Supplementary Information for detailed step-by-step instructions). Such surface scans can be collected during the systematic removal of muscle ‘layers’ (i.e., from superficial to deep). However, in comparison to diceCT or MRI data, where the complete three-dimensional information of a muscle is characterised4,26,28,121, surface scan data represent a challenge. The third dimension (i.e., volume) of a muscle is only partially derived, because only the extent on the surface can directly be inferred. Combining surface data from multiple steps during a dissection (i.e., collecting surface scans via the systematic removal of individual muscles or layers from superficial to deep musculature), however, allows retroactive estimation of the 3D shape of the muscles by constraining their volume through the difference of two or more surface meshes. A polygonal retopology of the muscle surfaces allows fast quantification of the negative space between different dissection steps. The step-by-step guide of our workflow on surface data is described in detail in the Supplementary Information.

#### Muscle attachment centroid calculation

The centroids of the attachment areas can either be estimated for extinct taxa44,50,51,53,60,97,122,123,124 or measured/inferred from digitized attachment areas of extant taxa69,73,74,78,79,88,125. Additionally, we developed a code (Supplementary Information) to streamline musculoskeletal modelling workflows that now allows to directly calculate the attachment centroids and the attachment area for extinct and extant taxa from the vertices placed on the attachment area during the iterative polygonal muscle modelling approach presented herein (see Supplementary Information for muscle attachment definition) or for selected faces of a segmented muscle (i.e., diceCT or MRI) or selected faces of a muscle scar/attachment area on a bone, as follows.

The centroids were calculated by selecting the faces of the attachment area and running the Maya polygon surface centroid calculation script written in Maya Embedded Language (MEL; code provided in Supplementary Information). The script triangulates the muscle attachment areas to subdivide faces with more than three vertices into individual triangles to facilitate the calculation of their centroid. The area of each triangle can be described using Heron’s Formula and the distances between the 3D coordinates of each vertex (i.e., $$a = \left| {\overrightarrow {BC} } \right|, b = \left| {\overrightarrow {AC} } \right|, c = \left| {\overrightarrow {AB} } \right|$$), where the semi-perimeter s is calculated as:

$$s = \frac{a + b + c}{2}$$
(1)

And its area wi is calculated as:

$$w_{i} = \sqrt {s\left( {s - a} \right)\left( {s - b} \right)\left( {s - c} \right)} { }$$
(2)

The centroid of each individual triangle Ci is calculated by averaging the position of each vertex:

$$C_{i} = \frac{A + B + C}{3}{ }$$
(3)

The centroid of the attachment area CA is then calculated by weighting the centroid of each triangle Ci by their respective face area wi in comparison to the total area WA of the attachment area:

$$W_{A} = \mathop \sum \limits_{i = 1}^{n - 2} w_{i}$$
(4)

and, therefore:

$$C_{A} = \frac{1}{{W_{A} }}\mathop \sum \limits_{i = 1}^{n - 2} w_{i} C_{i} ,{ }$$
(5)

where n is the number of vertices describing the attachment area (i.e., the number of vertices projected onto the bone during modelling or describing the selected faces).

#### Muscle line of action estimation

The Maya muscle line of action estimation MEL script (provided in the Supplementary Information) was inspired by Allen et al.73. However, this previous workflow requires several software packages and processing steps. Our process offers an intuitively fast and straightforward way to automate the estimation of a single LoA for downstream analyses in a single software package (Maya). This process depends on four input parameters: the 3D coordinates of the origin and insertion centroids, the 3D model of the muscle (path) and the number of slices (user-specified; see below). The attachment centroid positions are best represented as Locators, i.e., as calculated from faces (using the Maya polygon surface centroid calculation script above) or imported from a different source (e.g. see71,101,102,103,104,105). The script slices a muscle into a user-specified number of slices along an axis from the origin to the insertion (i.e., the 3D coordinates of the respective locators). Our process (see Supplementary Information) calculates the centroid of each slice in the same fashion as the Maya muscle attachment centroid calculation MEL script (i.e., by subdividing the slices into triangles and then weighting their centroids by their respective area). The centroids of all slices are then threaded together to form a path from origin to insertion representing the LoA. This path is then converted into a NURBS curve and subsequently into a polygonal object for visualisation (Figs. 3c,d, 4a) that can subsequently be exported for musculoskeletal modelling and simulation software, such as OpenSim71 (Fig. 4b). This method has the potential to streamline the workflow of prior studies (e.g.73,74,76,94) or to improve the modelling of LoA dependent measurements (e.g.46,70,72). The LoA estimation code is written in Maya’s native programming language, i.e., Maya Embeded Language (MEL), and is thus conceptualized only for Maya. Therefore, it is not easily adaptable for other software packages without major rewriting of the code provided herein, as variable definitions and/or specific functions may differ depending on the software package; yet the approach has transferrable concepts.

### Statistical analysis of muscle mass comparisons in the Nile crocodile

The volumetric muscle models created using the iterative polygonal modelling approach (either surface-based or tomography-guided) can be evaluated by the criterion that simplifications and/or predictions should quantitatively fall within the range of physical measurements or follow observed patterns21,29,33. The 3D muscle masses of both the diceCT segmented and the reconstructed muscles using the iterative polygonal modelling approach were calculated from their volumes with an assumed homogeneous density of 1060 kg/m3 3,102,126,127. These calculated muscle masses of the Nile crocodile were then compared to the median of the body-mass-normalised measurements of the respective muscles of other Nile crocodile specimens (Fig. 2a; Table 1). Discrepancies between the actual muscle masses and the 3D representations of the muscles had to be interpreted broadly, because no direct comparison with the actual muscle mass was possible. As direct, dissection-based measurements were not available for the Nile crocodile specimen used in this study, our model-estimated muscle masses were compared to a broader set of published data on Nile crocodile muscle masses76,103 as well as muscle volumes calculated from the segmented iodine-stained (diceCT) muscles of the same specimen (Wiseman et al.76 and this study; see Supplementary Information). Therefore, we performed a Bland–Altman analysis128 using R software129 with the R package ‘blandr’130 to compare the different measurements and muscle mass estimates, and their agreement. Additionally, Mann–Whitney U tests were performed between the different methods to test for differences in the muscle mass estimates.

## Data availability

The data that support the findings of this study are available in the article and/or Supporting Information and under the following link https://doi.org/10.6084/m9.figshare.16903897. All code used in this study to replicate our methodology and findings is available in the Supporting Information and under the following link https://doi.org/10.6084/m9.figshare.16903900. All muscle 3D models to replicate our findings are available under the following link https://doi.org/10.6084/m9.figshare.16903894; additional 3D models (bones and/or surface scans) are available from the corresponding author upon request.

## References

1. Cunningham, J. A., Rahman, I. A., Lautenschlager, S., Rayfield, E. J. & Donoghue, P. C. J. A virtual world of paleontology. Trends Ecol. Evol. 29, 347–357 (2014).

2. Lautenschlager, S. Cranial myology and bite force performance of Erlikosaurus andrewsi : A novel approach for digital muscle reconstructions. J. Anat. 222, 260–272 (2013).

3. Lautenschlager, S. Digital reconstruction of soft-tissue structures in fossils. Paleontol. Soc. Pap. 22, 101–117 (2016).

4. Gignac, P. M. et al. Diffusible iodine-based contrast-enhanced computed tomography (diceCT): An emerging tool for rapid, high-resolution, 3-D imaging of metazoan soft tissues. J. Anat. 228, 889–909 (2016).

5. Metscher, B. D. MicroCT for comparative morphology: Simple staining methods allow high-contrast 3D imaging of diverse non-mineralized animal tissues. BMC Physiol. 9, 11 (2009).

6. Metscher, B. D. MicroCT for developmental biology: A versatile tool for high-contrast 3D imaging at histological resolutions. Dev. Dyn. 238, 632–640 (2009).

7. Regnault, S., Fahn-Lai, P., Norris, R. M. & Pierce, S. E. Shoulder muscle architecture in the Echidna (Monotremata: Tachyglossus aculeatus) indicates conserved functional properties. J. Mamm. Evol. 27, 591–603 (2020).

8. Fahn-Lai, P., Biewener, A. A. & Pierce, S. E. Broad similarities in shoulder muscle architecture and organization across two amniotes: Implications for reconstructing non-mammalian synapsids. PeerJ 8, e8556 (2020).

9. Dickinson, E. et al. Visualization and quantification of mimetic musculature via diceCT. PeerJ 8, e9343 (2020).

10. Cox, P. G. & Jeffery, N. Reviewing the morphology of the jaw-closing musculature in squirrels, rats, and guinea pigs with contrast-enhanced microCT. Anat. Rec. Adv. Integr. Anat. Evol. Biol. 294, 915–928 (2011).

11. Tsai, H. P. & Holliday, C. M. Ontogeny of the Alligator Cartilago transiliens and its significance for sauropsid jaw muscle evolution. PLoS ONE 6, e24935 (2011).

12. Holliday, C. M., Tsai, H. P., Skiljan, R. J., George, I. D. & Pathan, S. A 3D interactive model and atlas of the jaw musculature of Alligator mississippiensis. PLoS ONE 8, e62806 (2013).

13. Cox, P. G. & Faulkes, C. G. Digital dissection of the masticatory muscles of the naked mole-rat, Heterocephalus glaber (Mammalia, Rodentia). PeerJ 2, e448 (2014).

14. Descamps, E. et al. Soft tissue discrimination with contrast agents using micro-CT scanning. Belgian J. Zool. 144, 20–40 (2020).

15. Lautenschlager, S., Bright, J. A. & Rayfield, E. J. Digital dissection: Using contrast-enhanced computed tomography scanning to elucidate hard- and soft-tissue anatomy in the Common buzzard Buteo buteo. J. Anat. 224, 412–431 (2014).

16. Li, Z. & Clarke, J. A. New insight into the anatomy of the hyolingual apparatus of Alligator mississippiensis and implications for reconstructing feeding in extinct archosaurs. J. Anat. 227, 45–61 (2015).

17. Li, Z. & Clarke, J. A. The craniolingual morphology of waterfowl (Aves, Anseriformes) and its relationship with feeding mode revealed through contrast-enhanced x-ray computed tomography and 2D morphometrics. Evol. Biol. 43, 12–25 (2016).

18. Jeffery, N. S., Stephenson, R. S., Gallagher, J. A., Jarvis, J. C. & Cox, P. G. Micro-computed tomography with iodine staining resolves the arrangement of muscle fibres. J. Biomech. 44, 189–192 (2011).

19. Baverstock, H., Jeffery, N. S. & Cobb, S. N. The morphology of the mouse masticatory musculature. J. Anat. 223, 46–60 (2013).

20. Gignac, P. M. & Kley, N. J. Iodine-enhanced micro-CT imaging: Methodological refinements for the study of the soft-tissue anatomy of post-embryonic vertebrates. J. Exp. Zool. Part B Mol. Dev. Evol. 322, 166–176 (2014).

21. Bribiesca-Contreras, F. & Sellers, W. I. Three-dimensional visualisation of the internal anatomy of the sparrowhawk ( Accipiter nisus ) forelimb using contrast-enhanced micro-computed tomography. PeerJ 5, e3039 (2017).

22. Sahd, L., Bennett, N. C. & Kotzé, S. H. Hind foot drumming: Volumetric micro-computed tomography investigation of the hind limb musculature of three African mole-rat species (Bathyergidae). J. Anat. https://doi.org/10.1111/joa.13534 (2021).

23. Kupczik, K. et al. Reconstruction of muscle fascicle architecture from iodine-enhanced microCT images: A combined texture mapping and streamline approach. J. Theor. Biol. 382, 34–43 (2015).

24. Dickinson, E., Stark, H. & Kupczik, K. Non-destructive determination of muscle architectural variables through the use of diceCT. Anat. Rec. 301, 363–377 (2018).

25. Dickinson, E., Basham, C., Rana, A. & Hartstone-Rose, A. Visualization and quantification of digitally dissected muscle fascicles in the masticatory muscles of Callithrix jacchus using nondestructive diceCT. Anat. Rec. 302, 1891–1900 (2019).

26. Nyakatura, J. A., Baumgarten, R., Baum, D., Stark, H. & Youlatos, D. Muscle internal structure revealed by contrast-enhanced μCT and fibre recognition: The hindlimb extensors of an arboreal and a fossorial squirrel. Mamm. Biol. 99, 71–80 (2019).

27. Eigen, L. & Nyakatura, J. A. Architectural properties of the musculoskeletal system in the shoulder of two callitrichid primate species derived from virtual dissection. Primates https://doi.org/10.1007/s10329-021-00917-7 (2021).

28. Sullivan, S. P., McGechie, F. R., Middleton, K. M. & Holliday, C. M. 3D Muscle architecture of the pectoral muscles of european starling (Sturnus vulgaris). Integr. Org. Biol. 1, oby010 (2019).

29. Gröning, F. et al. The importance of accurate muscle modelling for biomechanical analyses: A case study with a lizard skull. J. R. Soc. Interface 10, 20130216 (2013).

30. Sellers, K. C., Middleton, K. M., Davis, J. L. & Holliday, C. M. Ontogeny of bite force in a validated biomechanical model of the American alligator. J. Exp. Biol. 220, 2036–2046 (2017).

31. Wilken, A. T., Middleton, K. M., Sellers, K. C., Cost, I. N. & Holliday, C. M. The roles of joint tissues and jaw muscles in palatal biomechanics of the Savannah monitor ( Varanus exanthematicus ) and their significance for cranial kinesis. J. Exp. Biol. 222, jeb201459 (2019).

32. Bates, K. T. & Falkingham, P. L. The importance of muscle architecture in biomechanical reconstructions of extinct animals: A case study using Tyrannosaurus rex. J. Anat. 233, 625–635 (2018).

33. Broyde, S. et al. Evolutionary biomechanics: Hard tissues and soft evidence?. Proc. R. Soc. B Biol. Sci. 288, rspb.2020.2809 (2021).

34. Lautenschlager, S., Gill, P. G., Luo, Z.-X., Fagan, M. J. & Rayfield, E. J. The role of miniaturization in the evolution of the mammalian jaw and middle ear. Nature 561, 533–537 (2018).

35. Button, D. J., Rayfield, E. J. & Barrett, P. M. Cranial biomechanics underpins high sauropod diversity in resource-poor environments. Proc. R. Soc. B Biol. Sci. 281, 20142114 (2014).

36. Sharp, A. C. Three dimensional digital reconstruction of the jaw adductor musculature of the extinct marsupial giant Diprotodon optatum. PeerJ 2, e514 (2014).

37. Cuff, A. R. & Rayfield, E. J. Retrodeformation and muscular reconstruction of ornithomimosaurian dinosaur crania. PeerJ 3, e1093 (2015).

38. Button, D. J., Barrett, P. M. & Rayfield, E. J. Comparative cranial myology and biomechanics of Plateosaurus and Camarasaurus and evolution of the sauropod feeding apparatus. Palaeontology 59, 887–913 (2016).

39. Lautenschlager, S., Brassey, C. A., Button, D. J. & Barrett, P. M. Decoupled form and function in disparate herbivorous dinosaur clades. Sci. Rep. 6, 26495 (2016).

40. Taylor, A. C., Lautenschlager, S., Qi, Z. & Rayfield, E. J. Biomechanical evaluation of different musculoskeletal arrangements in Psittacosaurus and implications for cranial function. Anat. Rec. 300, 49–61 (2017).

41. Gignac, P. M. & Erickson, G. M. The biomechanics behind extreme osteophagy in Tyrannosaurus rex. Sci. Rep. 7, 1–10 (2017).

42. Lautenschlager, S., Gill, P., Luo, Z.-X., Fagan, M. J. & Rayfield, E. J. Morphological evolution of the mammalian jaw adductor complex. Biol. Rev. 92, 1910–1940 (2017).

43. Dickinson, E. et al. Evaluating bony predictors of bite force across the order Carnivora. J. Morphol. https://doi.org/10.1002/jmor.21400 (2021).

44. Hutchinson, J. R., Anderson, F. C., Blemker, S. S. & Delp, S. L. Analysis of hindlimb muscle moment arms in Tyrannosaurus rex using a three-dimensional musculoskeletal computer model: Implications for stance, gait, and speed. Paleobiology 31, 676–701 (2005).

45. Hutchinson, J. R. & Allen, V. R. The evolutionary continuum of limb function from early theropods to birds. Naturwissenschaften 96, 423–448 (2009).

46. Zwafing, M., Lautenschlager, S., Demuth, O. E. & Nyakatura, J. A. Modeling sprawling locomotion of the stem amniote Orobates: An examination of hindlimb muscle strains and validation using extant Caiman. Front. Ecol. Evol. 9, 1–15 (2021).

47. Maidment, S. C. R., Bates, K. T., Barrett, P. M., Eberth, D. A. & Evans, D. C. Three-dimensional computational modelling of pelvic locomotor muscle moment arms in Edmontosaurus (Dinosauria: Hadrosauridae) and comparisons with other archosaurs. In Hadrosaurs (eds Evans, D. C. & Eberth, D. A.) 433–448 (Indiana University Press, 2014).

48. Maidment, S. C. R. et al. Locomotion in ornithischian dinosaurs: An assessment using three-dimensional computational modelling. Biol. Rev. 89, 588–617 (2014).

49. Bates, K. T., Maidment, S. C. R., Schachner, E. R. & Barrett, P. M. Comments and corrections on 3D modeling studies of locomotor muscle moment arms in archosaurs. PeerJ 3, e1272 (2015).

50. Brassey, C. A., Maidment, S. C. R. & Barrett, P. M. Muscle moment arm analyses applied to vertebrate paleontology: A case study using Stegosaurus stenops Marsh, 1887. J. Vertebr. Paleontol. 37, e1361432 (2017).

51. Otero, A., Allen, V. R., Pol, D. & Hutchinson, J. R. Forelimb muscle and joint actions in Archosauria: Insights from Crocodylus johnstoni (Pseudosuchia) and Mussaurus patagonicus (Sauropodomorpha). PeerJ 5, e3976 (2017).

52. Klinkhamer, A. J., Mallison, H., Poropat, S. F., Sloan, T. & Wroe, S. Comparative three-dimensional moment arm analysis of the sauropod forelimb: Implications for the transition to a wide-gauge stance in titanosaurs. Anat. Rec. 302, 794–817 (2019).

53. Bishop, P. J., Cuff, A. R. & Hutchinson, J. R. How to build a dinosaur: Musculoskeletal modeling and simulation of locomotor biomechanics in extinct animals. Paleobiology 47, 1–38 (2021).

54. Allen, V. R., Kilbourne, B. M. & Hutchinson, J. R. The evolution of pelvic limb muscle moment arms in bird-line archosaurs. Sci. Adv. 7, eabe2778 (2021).

55. Persons, W. S. & Currie, P. J. Dinosaur speed demon: The caudal musculature of Carnotaurus sastrei and implications for the evolution of south american abelisaurids. PLoS ONE 6, e25763 (2011).

56. Persons, W. S. & Currie, P. J. The Tail of Tyrannosaurus: Reassessing the size and locomotive importance of the M. caudofemoralis in non-avian theropods. Anat. Rec. 294, 119–131 (2011).

57. Hutchinson, J. R., Bates, K. T., Molnar, J., Allen, V. R. & Makovicky, P. J. A computational analysis of limb and body dimensions in Tyrannosaurus rex with implications for locomotion, ontogeny, and growth. PLoS ONE 6, e26037 (2011).

58. Allen, V. R., Bates, K. T., Li, Z. & Hutchinson, J. R. Linking the evolution of body shape and locomotor biomechanics in bird-line archosaurs. Nature 497, 104–107 (2013).

59. Díez Díaz, V., Demuth, O. E., Schwarz, D. & Mallison, H. The tail of the Late Jurassic sauropod Giraffatitan brancai: Digital reconstruction of its epaxial and hypaxial musculature, and implications for tail biomechanics. Front. Earth Sci. 8, 1–18 (2020).

60. Bates, K. T., Benson, R. B. J. & Falkingham, P. L. A computational analysis of locomotor anatomy and body mass evolution in Allosauroidea (Dinosauria: Theropoda). Paleobiology 38, 486–507 (2012).

61. Bryant, H. N. & Russell, A. P. The role of phylogenetic analysis in the inference of unpreserved attributes of extinct taxa. Philos. Trans. R. Soc. London. Ser. B Biol. Sci. 337, 405–418 (1992).

62. Witmer, L. M. The extant phylogenetic bracket and the importance of reconstructing soft tissues in fossils. In Functional Morphology in Vertebrate Paleontology (ed. Thomason, J. J.) 19–33 (Cambridge University Press, 1995).

63. Arbour, V. M. Estimating impact forces of tail club strikes by ankylosaurid dinosaurs. PLoS ONE 4, e6738 (2009).

64. Allen, V. R., Paxton, H. & Hutchinson, J. R. Variation in center of mass estimates for extant sauropsids and its importance for reconstructing inertial properties of extinct archosaurs. Anat. Rec. Adv. Integr. Anat. Evol. Biol. 292, 1442–1461 (2009).

65. Mallison, H. Defense capabilities of Kentrosaurus aethiopicus Hennig, 1915. Palaeontol. Electron. 14, 1–25 (2011).

66. Persons, W. S., Currie, P. J. & Norell, M. A. Oviraptorosaur tail forms and functions. Acta Palaeontol. Pol. 59, 553–567 (2014).

67. Rahman, I. A. & Lautenschlager, S. Applications of three-dinemsional box modeling to palaeontological functional analysis. Paleontol. Soc. Pap. 22, 119–132 (2017).

68. Molnar, J. L., Pierce, S. E., Clack, J. A. & Hutchinson, J. R. Idealized landmark-based geometric reconstructions of poorly preserved fossil material: A case study of an early tetrapod vertebra. Palaeontol. Electron. 15, 2T (2012).

69. Bates, K. T. et al. Back to the bones: Do muscle area assessment techniques predict functional evolution across a macroevolutionary radiation?. J. R. Soc. Interface 18, 20210324 (2021).

70. Regnault, S., Fahn-Lai, P. & Pierce, S. E. Validation of an Echidna forelimb musculoskeletal model using XROMM and diceCT. Front. Bioeng. Biotechnol. 9, 1–25 (2021).

71. Delp, S. L. et al. OpenSim: Open-source software to create and analyze dynamic simulations of movement. IEEE Trans. Biomed. Eng. 54, 1940–1950 (2007).

72. Brocklehurst, R. J., Fahn-Lai, P., Regnault, S. & Pierce, S. E. Musculoskeletal modeling of sprawling and parasagittal forelimbs provides insight into synapsid postural transition. iScience 25, 103578 (2022).

73. Allen, V. R., Kambic, R. E., Gatesy, S. M. & Hutchinson, J. R. Gearing effects of the patella (knee extensor muscle sesamoid) of the Helmeted guineafowl during terrestrial locomotion. J. Zool. 303, 178–187 (2017).

74. Bishop, P. J. et al. Computational modelling of muscle fibre operating ranges in the hindlimb of a small ground bird (Eudromia elegans), with implications for modelling locomotion in extinct species. PLOS Comput. Biol. 17, e1008843 (2021).

75. Hicks, J. L., Uchida, T. K., Seth, A., Rajagopal, A. & Delp, S. L. Is My model good enough? Best practices for verification and validation of musculoskeletal models and simulations of movement. J. Biomech. Eng. 137, (2015).

76. Wiseman, A. L. A. et al. Musculoskeletal modelling of the Nile crocodile ( Crocodylus niloticus ) hindlimb: Effects of limb posture on leverage during terrestrial locomotion. J. Anat. https://doi.org/10.1111/joa.13431 (2021).

77. Lautenschlager, S. Multibody dynamics analysis (MDA) as a numerical modelling tool to reconstruct the function and palaeobiology of extinct organisms. Palaeontology 63, 703–715 (2020).

78. Kohout, J. & Kukačka, M. Real-time modelling of fibrous muscle. Comput. Graph. Forum 33, 1–15 (2014).

79. Modenese, L. & Kohout, J. Automated generation of three-dimensional complex muscle geometries for use in personalised musculoskeletal models. Ann. Biomed. Eng. 48, 1793–1804 (2020).

80. Lautenschlager, S., Figueirido, B., Cashmore, D. D., Bendel, E.-M. & Stubbs, T. L. Morphological convergence obscures functional diversity in sabre-toothed carnivores. Proc. R. Soc. B Biol. Sci. 287, 20201818 (2020).

81. Rossoni, M., Barsanti, S., Colombo, G. & Guidi, G. Retopology and simplification of reality-based models for finite element analysis. Comput. Aided. Des. Appl. 17, 525–546 (2020).

82. Sánchez, C. A., Lloyd, J. E., Fels, S. & Abolmaesumi, P. Embedding digitized fibre fields in finite element models of muscles. Comput. Methods Biomech. Biomed. Eng. Imaging Vis. 2, 223–236 (2014).

83. Falkingham, P. L. Acquisition of high resolution three-dimensional models using free, open-source, photogrammetric software. Palaeontol. Electron. 15, 15 (2012).

84. Mallison, H. & Wings, O. Photogrammetry in paleontology - a practical guide. J. Paleontol. Tech. 12, 1–31 (2014).

85. Giacomini, G. et al. 3D Photogrammetry of bat skulls: Perspectives for macro-evolutionary analyses. Evol. Biol. 46, 249–259 (2019).

86. Díez Díaz, V., Mallison, H., Asbach, P., Schwarz, D. & Blanco, A. Comparing surface digitization techniques in palaeontology using visual perceptual metrics and distance computations between 3D meshes. Palaeontology https://doi.org/10.1111/pala.12518 (2021).

87. Larsen, H., Budka, M. & Bennett, M. R. Technological innovation in the recovery and analysis of 3D forensic footwear evidence: Structure from motion (SfM) photogrammetry. Sci. Justice 61, 356–368 (2021).

88. Rhodes, M. M., Henderson, D. M. & Currie, P. J. Maniraptoran pelvic musculature highlights evolutionary patterns in theropod locomotion on the line to birds. PeerJ 9, e10855 (2021).

89. Vickerton, P., Jarvis, J. & Jeffery, N. Concentration-dependent specimen shrinkage in iodine-enhanced microCT. J. Anat. 223, 185–193 (2013).

90. Hedrick, B. P. et al. Assessing soft-tissue shrinkage estimates in museum specimens imaged with diffusible iodine-based contrast-enhanced computed tomography (diceCT). Microsc. Microanal. 24, 284–291 (2018).

91. Green, K. D., Orsbon, C. P., Ross, C. F. & Taylor, A. B. Iodine staining results in significant shrinkage of sarcomere lengths in macaque Biceps brachii muscle. FASEB J. 33, 7692 (2019).

92. Buytaert, J., Goyens, J., De Greef, D., Aerts, P. & Dirckx, J. Volume shrinkage of bone, brain and muscle tissue in sample preparation for micro-CT and light sheet fluorescence microscopy (LSFM). Microsc. Microanal. 20, 1208–1217 (2014).

93. Ker, R. F. Dynamic tensile properties of the plantaris tendon of sheep (Ovis aries). J. Exp. Biol. 93, 283–302 (1981).

94. van Beesel, J., Hutchinson, J. R., Hublin, J. & Melillo, S. M. Exploring the functional morphology of the Gorilla shoulder through musculoskeletal modelling. J. Anat. 239, 207–227 (2021).

95. Sellers, W. I. & Manning, P. L. Estimating dinosaur maximum running speeds using evolutionary robotics. Proc. R. Soc. B Biol. Sci. 274, 2711–2716 (2007).

96. Sellers, W. I., Manning, P. L., Lyson, T., Stevens, K. & Margetts, L. Virtual palaeontology: Gait reconstruction of extinct vertebrates using high performance computing. Palaeontol. Electron. 12, 11A (2009).

97. Sellers, W. I., Pond, S. B., Brassey, C. A., Manning, P. L. & Bates, K. T. Investigating the running abilities of Tyrannosaurus rex using stress-constrained multibody dynamic analysis. PeerJ 5, e3420 (2017).

98. Delp, S. L. et al. An interactive graphics-based model of the lower extremity to study orthopaedic surgical procedures. IEEE Trans. Biomed. Eng. 37, 757–767 (1990).

99. Delp, S. L. & Zajac, F. E. Force- and moment-generating capacity of lower-extremity muscles before and after tendon lengthening. Clin. Orthop. Relat. Res. 1, 247–259 (1992).

100. Delp, S. L. & Loan, J. P. A graphics-based software system to develop and analyze models of musculoskeletal structures. Comput. Biol. Med. 25, 21–34 (1995).

101. Delp, S. L. & Loan, J. P. A computational framework for simulating and analyzing human and animal movement. Comput. Sci. Eng. 2, 46–55 (2000).

102. Hutchinson, J. R. et al. Musculoskeletal modelling of an ostrich ( Struthio camelus ) pelvic limb: Influence of limb orientation on muscular capacity during locomotion. PeerJ 3, e1001 (2015).

103. Allen, V. R. et al. Comparative architectural properties of limb muscles in Crocodylidae and Alligatoridae and their relevance to divergent use of asymmetrical gaits in extant Crocodylia. J. Anat. 225, 569–582 (2014).

104. Sookias, R. B., Butler, R. J., Nesbitt, S. J., Desojo, J. B. & Irmis, R. B. Euparkeriidae. In Anatomy, Phylogeny and Palaeobiology of Early Archosaurs and their Kin Vol. 379 (eds Nesbitt, S. J. et al.) 35–48 (Geological Society, 2013).

105. Sookias, R. B. The relationships of the Euparkeriidae and the rise of Archosauria. R. Soc. Open Sci. 3, 150674 (2016).

106. Nesbitt, S. J. The early evolution of archosaurs: Relationships and the origin of major clades. Bull. Am. Museum Nat. Hist. 352, 1–292 (2011).

107. Ezcurra, M. D. The phylogenetic relationships of basal archosauromorphs, with an emphasis on the systematics of proterosuchian archosauriforms. PeerJ 4, e1778 (2016).

108. Ewer, R. F. The anatomy of the thecodont reptile Euparkeria capensis Broom. Philos. Trans. R. Soc. Lond. B. Biol. Sci. 248, 379–435 (1965).

109. Sullivan, C. S. Function and Evolution of the Hind Limb in Triassic Archosaurian Reptiles (Harvard University, 2007).

110. Demuth, O. E., Rayfield, E. J. & Hutchinson, J. R. 3D hindlimb joint mobility of the stem-archosaur Euparkeria capensis with implications for postural evolution within Archosauria. Sci. Rep. 10, 15357 (2020).

111. Lautenschlager, S. Reconstructing the past: Methods and techniques for the digital restoration of fossils. R. Soc. Open Sci. 3, 160342 (2016).

112. Romer, A. S. The locomotor apparatus of certain primitive and mammal-like reptiles. Bull. Am. Museum Nat. Hist. 46, 517–606 (1922).

113. Hutchinson, J. R. The evolution of hindlimb tendons and muscles on the line to crown-group birds. Comp. Biochem. Physiol. Part A Mol. Integr. Physiol. 133, 1051–1086 (2002).

114. Tsuihiji, T. Homologies of the Transversospinalis muscles in the anterior presacral region of Sauria (Crown Diapsida). J. Morphol. 263, 151–178 (2005).

115. Tsuihiji, T. Homologies of the Longissimus, Iliocostalis, and hypaxial muscles in the anterior presacral region of extant diapsida. J. Morphol. 268, 986–1020 (2007).

116. Molnar, J. L., Diogo, R., Hutchinson, J. R. & Pierce, S. E. Evolution of hindlimb muscle anatomy across the tetrapod water-to-land transition, including comparisons with forelimb anatomy. Anat. Rec. 303, 218–234 (2020).

117. Hattori, S. & Tsuihiji, T. Homology and osteological correlates of pedal muscles among extant sauropsids. J. Anat. 238, 365–399 (2021).

118. Dickinson, E. et al. Myological variation in the forearm anatomy of Callitrichidae and Lemuridae. J. Anat. 239, 669–681 (2021).

119. Bommes, D., Zimmer, H. & Kobbelt, L. Mixed-integer quadrangulation. ACM Trans. Graph. 28, 1–10 (2009).

120. Bommes, D. et al. Quad-mesh generation and processing: A survey. Comput. Graph. Forum 32, 51–76 (2013).

121. Sharp, A. C. & Trusler, P. W. Morphology of the jaw-closing musculature in the Common wombat (Vombatus ursinus) using digital dissection and magnetic resonance imaging. PLoS ONE 10, e0117730 (2015).

122. Bates, K. T. & Schachner, E. R. Disparity and convergence in bipedal archosaur locomotion. J. R. Soc. Interface 9, 1339–1353 (2012).

123. Bates, K. T., Maidment, S. C. R., Allen, V. R. & Barrett, P. M. Computational modelling of locomotor muscle moment arms in the basal dinosaur Lesothosaurus diagnosticus: Assessing convergence between birds and basal ornithischians. J. Anat. 220, 212–232 (2012).

124. Bishop, P. J. et al. Cancellous bone and theropod dinosaur locomotion. Part III—Inferring posture and locomotor biomechanics in extinct theropods, and its evolution on the line to birds. PeerJ 6, e5777 (2018).

125. Fukuda, N. et al. Estimation of attachment regions of hip muscles in CT image using muscle attachment probabilistic atlas constructed from measurements in eight cadavers. Int. J. Comput. Assist. Radiol. Surg. 12, 733–742 (2017).

126. Méndez, J. & Keys, A. Density and composition of mammalian muscle. Metab. - Clin. Exp. 9, 184–188 (1960).

127. Leonard, K. C., Worden, N., Boettcher, M. L., Dickinson, E. & Hartstone-Rose, A. Effects of freezing and short-term fixation on muscle mass, volume, and density. Anat. Rec. https://doi.org/10.1002/ar.24639 (2021).

128. MartinBland, J. & Altman, D. Statistical methods for assessing agreement between two methods of clinical measurement. Lancet 327, 307–310 (1986).

129. R Core Team. R: A language and environment for statistical computing. (2020).

130. Datta, D. & Love, J. Deepankardatta/blandr: Version 0.5.1. (v.0.5.1). Zenodo. https://doi.org/10.5281/zenodo.1244740 (2018).

## Acknowledgements

We thank Vivian Allen, Andrew Cuff and Krijn Michel for data collection from the crocodiles, and Ray Wilhite for alligator cross-sections created by Daniel Hillmann. We thank La Ferme aux Crocodiles (Pierrelatte, France) for provision of the Nile crocodile specimens. We also thank Matthew Lowe and Jason Head (University Museum of Zoology Cambridge, UMZC) for collections and curatorial support, Keturah Smithson for conducting the UMZC μCT scans, Claire Browning and Zaituna Skosan (Iziko South African Museum, SAM) for collections and curatorial support, and Stephan Le Roux for providing the μCT data of Euparkeria from the SAM. Staff at the Cleveland Museum of Natural History, Erie Zoo and Cleveland Metroparks Zoo are thanked for access to the gorilla specimen and staff at the Case Western Reserve University School of Medicine Animal Resource Center are thanked for access to dissection facilities. We also thank Eric M. Green and Denise Bailey (Ohio State University) for gorilla CT scan data. We thank Edwin Dickinson, Kassandra Turcotte and Stephanie Melillo for providing their support and expertise during the gorilla dissection. Finally, we thank two anonymous reviewers for their constructive feedback.

## Funding

This study was supported by funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant Agreement 695517) to J.R.H.

## Author information

Authors

### Contributions

O.E.D. and H.M. conceived the original method. O.E.D., H.M. and J.R.H. designed the study. O.E.D., A.L.A.W, J.v.B., and J.R.H. collected the data. O.E.D and A.L.A.W. analysed the data. O.E.D. prepared the figures. All authors contributed to the interpretation of the data and the writing of the manuscript and approved the final version.

### Corresponding author

Correspondence to Oliver E. Demuth.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

### Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Demuth, O.E., Wiseman, A.L.A., van Beesel, J. et al. Three-dimensional polygonal muscle modelling and line of action estimation in living and extinct taxa. Sci Rep 12, 3358 (2022). https://doi.org/10.1038/s41598-022-07074-x

• Accepted:

• Published:

• DOI: https://doi.org/10.1038/s41598-022-07074-x