Saturday, 25 May 2019

3D printing a crocodile

I have to say I was surprised how enthused everyone was for the 3D printed crocodile. It was the most interacted tweet I have ever done, and as promised I am ensuring all of the files are available so if people are keen they can do their own:

All files will print on a print bed that is 20x20cm, and are all scaled to the same size. However do check and scale up or down by 10 if required.

Forelimb (L - R)
Posteriormost Caudal vertebrae
So for anyone wondering how I put it together, it was fairly straight forward, albeit time consuming. If you don't have a set of 3D files (in this case ours were generated from CT scans and segmented in Mimics), there are an abundance of online 3D scans now in places like Morphosource, or and even thingiverse (the Makerbot repository where I've uploaded my bits), but I strongly encourage you to check the specifics with regards to the use of their scans and to only print things you are allowed to.

The next steps involve tidying up your meshes, e.g. decimation of your mesh to make it smaller/easier to use, and remeshing to standardise triangle sizes etc. I recommend Meshlab for a lot of this as it is free. Google is also full of how-tos, but I am happy help. Feel free to reach out here or Twitter.

I then separated the sections I wanted using the select tool and deleting the unwanted bits. This could, and should, be done in segmentation if you have the scans, but I have to admit I wasn't sure how I was going to separate things when I first started. You will also likely get 3D models online that need separating, so not bad practice. In the case of the vertebral column where I separated the different regions, holes were created in the mesh (where the vertebrae were connected as a single unit). I fixed these in Blender (again a free download) by selecting the nodes in Edit Mode and making new faces to fill the holes.

For sections I wanted to fuse together I created a cylinder where an end was in a bone of interest.
Right lower leg and foot with cylinders shown between all the bones.
In the case of the osteoderms, I created a scaffold of cylinders that would sit on the vertebrae, and then vertical cylinders to attach to the osteoderms:

Scaffold for the dorsal osteoderms (from shoulders to pelvis) in the foreground, with complete scaffold with fused osteoderms for pelvis in the background.
Originally, I used the Boolean tool in Blender to union join the various parts and the cylinder:

but I found that this was not necessary for our printer/software (printing done on a Ultimaker 3 extended, Cura software) so later parts just had cylinders and bones saved together as a single obj. Your experiences may vary!

I printed all of the model on the Ultimaker 3 as I said above, using a normal 0.15mm layer thickness, automated support in the zig-zag shape with chunks enabled, and either a raft or brim support using generic PLA (2.85mm thickness) purchased from Amazon. We have the option of using 2 materials, and this probably would have been better to print using soluble material (PVA) for the support as it took a long time to manually remove the supports but as this was a test it was cheaper and far quicker to print just using the one material. It is not a perfect method and some of the smallest bits have really thin supports and broke during separation so some superglue was used to reattach them. I suspect something like a soldering iron (anything that gets up to 200C) to quickly remelt the ends could also work but please use caution and common sense!

Because our model was printed in chunks (due to the 20x20cm plate), but the original animal was obviously fully connected I created some supports for the dorsal vertebrae to get everything to the appropriate height and to ensure a realistic look. This was achieved by creating a cylinder or cube in Blender, and scaling it to be about 1.5 times wider than a single vertebrae, and a bit longer than 2 vertebrae. I then boolean subtracted the vertebrae from the cylinder, creating a vertebrae cradle. The concave surfaces of the cradle (where there are overhangs) were deleted in the edit mode (and new faces were made to fill the holes) so that the print could be slotted into the cradles.
Vertebral cradle
A disc at the horizontal level of the sternum was created and then a cylinder (other shapes available) created to connect the two (same method as for connecting bones). For the support of the vertebrae over the sternum I created a hollow where the sternum was so that the support would sit flush on the ground with the sternum passing between it by boolean subtracting a slightly enlarged sternum from the underside of the disc (the same procedure as for the vertebrae and cylinder except now for the disc).
In place in the model showing off the front support also has a gap for the sternum.
For our printer there is less support created if you change the shape up to whatever the minimum overhang angle (45-60 degrees depending on the machine) so other shapes may be better for print times/reducing support structures.

I hope this all makes sense, let me know if it doesn't and I'd love to see what you all achieve. If any of the meshes misbehave, let me know and I will try to upload corrections.

Monday, 20 May 2019

4 legs good, 2 legs better: How a dinosaur grows

The newest paper I've been involved in just came out, this time looking at Mussaurus and how it grows up (quick summary right at the end):

What is Mussaurus?
Mussaurus is a sauropodomorph. If that doesn't make things any clearer, it is an early relative of the long neck, long tailed dinosaurs we know as sauropods (things like Diplodocus, Apatosaurus, Brachiosaurus, etc.). Found in Argentina, it is now dated from the early Jurassic (about 200 million years ago), having previously been dated to the Triassic.
Simplified phylogeny/family tree of sauropodomoprhs modified from Otero et al., 2015 with all silhouettes from
The name Mussaurus translates as "mouse lizard", and comes from the fact the first individuals found were small hatchlings that fit in the palm of your hand. In the years since its description in 1979 there have been many more individuals found covering a range of ages and associated increase in size.

Ageing a dinosaur
Dinosaurs, like trees, have rings that can be counted to determine how old they are. These lines of arrested growth (LAGs) are found particularly in long bones. It gets a bit messy with many long bones having marrow cavities (like in humans) which as the animal gets larger, so too does the marrow cavity which starts obliterating the innermost LAGs. This means that the age estimates are often given as a minimum. For our study we worked with 3 ages of Mussaurus: the smallest being palm sized and based on the sizes of eggs found nearby presumed to be hatchlings; a bigger group with individuals being determined to be under a year (no LAGs), but likely close to that age; and the largest at least 8 years old, and possibly up to 10 (which will be the age in all of my graphs below). 
Approximate sizes of the three different age groups from hatchling (bottom left), to yearling and adult.
Weighing a dinosaur
There are many ways to estimate the weight of a dinosaur but we chose 2 methods that are regularly  used in palaeontology. These are convex hulling and spline-based reconstruction:

Convex hull - this method works by building a simple geometric "box" (a hull) around bones, or series of bones to give a volume. All of the volumes are added together and multiplied by an estimated density for animals, and then multiplied by a correction factor. This correction factor is needed because the hulls are not biologically accurate (think of the amount of muscle usually on bones - see this earlier blog talking about it using lions). This method has been validated for calculating masses for mammals and birds.

Spline-based reconstructions - this method involves creating a series of hoops around various parts of the animal. For example, were the rib cage is, the hoop is built from the top of the vertebrae, around the ribs, and the gastralia/sternum. For the legs, different areas get hoops of different sizes as determined from the closest relatives of dinosaurs, birds and crocodiles (Allen et al., 2009). All of the hoops are ultimately joined together to create a 3D volume. The airways and lungs are also included. However there is variation between birds and crocodiles, and greater uncertainty with dinosaurs, so each of the segments (e.g. tail, chest, neck, arms, legs, airways/lungs) all get scaled up and down to create models with maximum and minimum estimates that are multiplied by the density of modern animals to get a mass. We can be fairly certain the real value lies somewhere between the extremes, but likely closer to the middle than the extremes.

Mass estimates between the two methods for Mussaurus.
The results between the 2 methods for masses are fairly similar. Hatchlings have a mass somewhere around 60-80g (about the size of a baby chicken/chick), by the time they are a year old they are 100x bigger at 8.19-8.30kg. That is an incredible amount of growth in a year. Just think about human babies being born around 3-4kg (6-8lbs) and being 300-400kg by the time they were 1 year old. For some of our domesticated birds this rate is exceeded, with modern turkeys carrying out this transition in size from 60g hatching to 8kg in 14-18 weeks (1/4 of the time) (Sogut et al,. 2016). In the next 7+ years of life for Mussaurus they continue growing at an incredible rate getting another 200x bigger reaching at least 1200-1500kg (about the size of a rhino or hippo). These growth rate are not unusual for dinosaurs, and the energetic requirements and stress associated with growing so much so quickly may be one of the major reasons there are so few "fully grown" adult dinosaurs of any species known with most dying before they attain their largest potential mass.

How can we use mass to infer posture?
Imagine you lean forward to touch your toes. Assuming you are flexible enough, this isn't too difficult. Now imagine having a really big head, or a long neck, or big arms and try again. You would likely find yourself tipping forwards. To counter this you might be able to bend your knees as if you were doing a squat and/or sticking your butt out to help keep yourself upright. However if your centre of mass gets too far forward, i.e. beyond your ability to get your foot (and by extension your knee) under your centre of mass, you will fall forward. This could be countered by reducing the mass of the front of your body (e.g. T. rex having tiny arms), having a big tail, or becoming quadrupedal (walking on all 4 limbs and using your arms to help support your mass). This simple biomechanical concept is what we applied to Mussaurus. The models allowed us to estimate the centre of mass for the different ages, and see how different regions influence the centre of mass.

We found that in the hatchlings the centre of mass is very far forward, about the length of the femur forward of the pelvis. This is the maximal theoretical limit of a centre of mass for a biped, assuming they held their femora horizontal when walking and only moved their lower legs. This of course is incredibly unlikely, and only seen in some real oddities today like penguins (who have of course become upright, and waddle), and also ignores the reality that you cannot put your knee perfectly forward of your hip as the stomach would get in the way (but you could move it to the side of your stomach, but this would have the effect of not being able to get your knee as far forward). As such we propose that Mussaurus hatchlings are quadrupedal. Through their growth the centre of mass moves back to a position that is very plausible for bipedal animals.
Centre of mass (COM) changes through ontogeny for Mussaurus. A COM of 1 would be directly between the shoulder blades, whilst a COM would be between the pelvis. 
However, having a centre of mass that is closer to your hips does not instantly make you bipedal, but our data, combined with a previous study showing that the adult Mussaurus could not get its hands flat on the ground (Otero et al., 2017), strongly suggest it was bipedal. Therefore Mussaurus follows an human-like transition from being quadrupedal when young, but becoming bipedal when adults. This transition is associated with a relative reduction in head and neck size and a relative increase in tail size.

How does this fit in our understanding of sauropod evolution?
We know that the later sauropodomorphs, the sauropods, were quadrupedal. Their giant columnar limb bones in both their arms and legs are built to support their weight. Early sauropodomorphs are smaller with much less robust forelimbs and are likely bipedal. We know there is a transition from biped to quadruped somewhere in the group but does our study help? Many studies suggest that "ontogeny recapitulates phylogeny", i.e. where your evolutionary history is reflected in how you grow. If this was the case we would expect Mussaurus to show a bipedal to quadrupedal transition not the other way round. This shows that the evolutionary history of locomotion within the sauropodomorphs is far more complicated than it first appears.

Quick conclusion
The take home/TLDR: We used computer modelling to discover a very interesting growth sequence for Mussaurus, which not only grows at a rapid rate, but transitions from being quadrupedal to bipedal during it.


Allen V, Paxton H, Hutchinson JR, 2009. Variation in Center of Mass Estimates for Extant Sauropsids and its Importance for Reconstructing Inertial Properties of Extinct Archosaurs. Journal of Anatomy 292, 1442-1461.

Sogut BI, Celik SI, Ayasan TII, Inci H, 2016. Analyzing Growth Curves of Turkeys Reared in Different Breeding Systems (Intensive and Free Range) with some Nonlinear Models. Rev. Bras. Cienc. Avic. 18, 619-628.

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

Friday, 8 March 2019

Measuring muscle activity in birds and crocodiles

After a long slog the newest paper is out, and as the title of the post suggests we've been measuring muscle activity in birds and crocodiles:

Relating neuromuscular control to functional anatomy of limb muscles in extant archosaurs

All muscles in vertebrate bodies are activated by electrical signals, usually from nerves. These activated muscles then contract resulting in some form of movement. The electrical signals that activate the muscles can be detected by sensitive equipment using a method known as electromyography - or EMG for short. A fancy version for just hearts is often used electrocardiogram (EKG/ECG). In humans these electrical signals can now be measured by attaching skin based electrodes, but when this technology was first being developed people would use wires attached to needles they would inject into the muscle. However, these methods don't tend to work easily for lots of animals: skin based electrodes need clean, moistened, thin skin; needles need animals obliging to leave them in place! As we have been working with crocodiles (thick skin with bony osteoderms within them), and birds (covered in feathers) and neither were tame, skin and temporary injected electrodes were not options. Therefore we had to carry out surgery to directly implant wires into the muscles, and connect them to a backpack on the back of the animal that could not be damaged by the animals.

Now this might sound extreme, and invasive procedures are, but because of this all of our procedures passed through ethical approval from the universities, and the UK Home Office, with the goal of collecting the highest quality data, whilst maintaining animal welfare, and using the fewest animals. In all, the study covered work from DawnDinos with tinamou and crocodiles, as well as previous unpublished work on emu, quail, turkey, pheasant, and guinea fowl.

All of the animals were placed within enclosures (either a runway or a treadmill) and their backpacks were plugged into the computer for recording. We then measured muscle activity as the animals walked/ran, and distilled it into strides which comprise stance (toe-on to toe-off) and swing (toe-off to toe-on):

Figure designed for the paper that never made it. Showing the direction of travel and what we mean by toe-on and toe-off.

Figure 2. from Cuff et al., 2019. Representative EMG signals from emus of three ages. 
People have studied EMG in animals for a while, so why is our study interesting?
1) We provide the first data for the palaeognathous birds (the group which include ostrich, emu, tinamou, kiwi, cassowary and some extinct birds like moas and elephant birds).

Whilst this may not sound particularly important, almost all of the published bird data to date comes from a small part of modern bird diversity, (mostly the group which include chickens, quail, guinea fowl) and as such it is vital to understand whether these few species are representative of birds and how much variation there is. From the overlapping datasets, it appears that birds are pretty consistent.

Fig S8. from Cuff et al., 2019. This figure shows an averaged and rectified (all values made positive, as EMG signals are both positive and negative) signal for the lateral gastrocnemius (part of the calf muscle). Foot-on/stance starts at 0.0 on the X-axis, and ends at the vertical line somewhere between 0.4 and 0.7 when swing/foot-off starts. Hopefully, it can be seen that most birds have peaks both at the very beginning of stance (left most part of the graph), and then at the end of swing (right part of the graph).
2) We provide the first EMG data for crocodiles. Sadly we didn't get as much data as we would have liked to compare to the previously published Alligator data, but still obtained some nice data for the pectoralis, and several leg muscles. The most interesting of these is the m. transversus perinei (TP for short). The TP is an unusual small muscle the wraps around the largest leg/tail muscles in a crocodile, the caudofemoralis longus (see John's blog for a good article about it).

Figure 1B from Cuff et al., 2019. The TP is the labelled brown muscle, that wraps around the caudofemoralis longus (the blue one).
The caudofemoralis longus (CFL) is important for leg retraction (basically when the muscle contracts it pulls the leg backwards). The TP shows muscle activation similar to that of the CFL suggesting that when the CFL contracts, the TP contracts too. This suggests that the small TP may play a vital role in helping shape the CFL similarly to that of the caudofemoralis brevis and thus changing the moment arms of the muscle. We are hoping this might be confirmed by other researchers in the future.

3) We show how EMG signals change as emus grow. Well, they don't actually change that much, the overall signals are very similar, but as they get older, their signals get shorter suggesting that they've gained better control. This has been seen before in bird flapping, particularly for wing assisted incline running.

Figure 2 from Cuff et al., 2019. Filtered EMG signals from three emus at three ages, showing the signal variation in the different muscles. ILFB = iliofibularis, ILPO = iliotibialis lateralis pars postacetabularis, GL = gastrocnemius pars lateralis, ITC = iliotrochantericus caudalis 
4) There is no difference in signals between crocodiles walking on treadmills and overground/in runways. This one may not seem that surprising, and matches with published data for birds previously, but always good to know especially as most experiments are done on treadmills to keep speeds consistent.

Modified Figure 8 from Cuff et al., 2019 showing the similarities between treadmill (0.1ms-1), and runways/overground for the pectoralis and TP muscles.

5) All of the data from our study and previous published works was combined to give an evolutionary history of muscle activity.

Figure 9 from Cuff et al., 2019. Archosauria and Aves are annotated with key ancestral EMG patterns for muscles focused on in this study; simplified into “Stance” (circle filled on right half) for mainly stance phase activity (potentially with some late swing phase), “Swing” (circle filled on left half) for mainly swing phase activity, and a “Stance” circle rotated 30 degrees anticlockwise for the more pronounced earlier swing phase activity (and earlier stance phase end of activity) evident in the GL of Aves. Additional EMG data for ducks (Biewener and Corning, 2001) and pigeons (Gatesy and Dial, 1993, 1996) further bolster the results here for Aves but for simplicity are not shown.

That pretty much sums up the paper, there is obviously a lot more detail in there, and if you are interested and cannot access it from the link at top let me know and I can get you a copy.