Elliptical Fourier Analysis
Pedipalp outlines were analysed using elliptical Fourier analysis (EFA).
EFA uses the principle of conventional Fourier analysis, which states
that the xy coordinates of a circle or simple ellipse can be
described by a set of sine and cosine waves referred to as harmonics.
During the analysis, complex shapes are described by a series of
‘epicycles’, where a point moves around an ellipse of harmonic nwhich in turn moves around the perimeter of a larger ellipse of harmonicn -1 and so on, creating a series of moving ellipses which ‘draw’
out the prospective shape. A shape traced by a number of moving ellipses
can thus be described by a series of sine and cosine waves, which are
themselves described by a series of harmonic coefficients. Each harmonic
is essentially layered on top of each other, with each harmonic
describing a further level of shape complexity. As further harmonics are
added to the model, the harmonics produce an outline that is closer to
the original shape and captures more of its complexity, with a
hypothetical harmonic model containing infinite harmonics drawing out an
exact replica of the original shape.
Binarised pedipalp images were imported as JPEGs into R, and were
subsequently converted into a series of 10000 equally spaced xycoordinates representing each outline. Outlines were rotated such that
their principal axes aligned with the global x-axis, and then centred
with their centroid at the global origin (0,0). The effect of scale was
also removed from the analysis by normalising all outlines to centroid
size, the square root of the sum of squared distances of all the outline
points f an object from their centroid or central point. A Procrustes
fit was also required to align shapes. This method of alignment is often
employed in studies that use elliptical Fourier analysis to quantify
shapes with few major protrusions such as orca fins, human crania and
posterior lobes of Drosophila (Friess & Baylac, 2003; Takahara
& Takahashi, 2015; Emmons et al., 2019). Despite a workflow intended to
avoid alignment via landmarks (due the problems of homology), pedipalps
with few large spines or protrusions aligned solely through principal
axes often appeared flipped about their long axis relative to other
pedipalps, this is phenomenon has been previously documented for shape
with high aspect ratio shapes (Bonhomme et al., 2014). To overcome this
issue, three landmarks were assigned to the femoral segments, and four
to the tibia on the proximal and distal end points of the pedipalp.
These landmark points did not include pedipalp spines and thus did not
encounter the issue of homology (see Supplementary Material S3 for
location of landmarks). The Procrustes fit between these numbered
landmarks prevented pedipalps from flipping.
EFA was carried out using 32 harmonics, as this number was found to
describe 99.9% of shape complexity of the original outline across the
sample, in both tibia and femur segments. From the resulting harmonic
fits, we calculated shape complexity. This was achieved by comparing
perimeters, either between EFA shapes of contrasting harmonics.
Comparing boundary measures, such as perimeter, is a tenet of many
methods of estimating shape complexity (Chambers et al., 2018). The
first metric calculated is a low perimeter ratio that here we term
‘gross complexity’. This is calculated by dividing the perimeter of the
outline created by fitting a complex 20th harmonic
model, by the perimeter of a simple 4th harmonic model
(see Figure 1), such that high values indicate high levels of gross
complexity. Comparing 4th and 20thharmonic fit models has previously been used to quantify overall shape
complexity in studies of other biological structures (Rowe & Arnqvist,
2012).