Joint surfaces: fitting shapes to bone
The question. A scan gives a bone as thousands of points joined into small flat triangles. How is that turned into a joint surface that a simulator can press another surface against?
Contact between cartilage layers is decided by tenths of a millimetre. The simulator has to know, for any point near a joint surface, how far it is from the surface and in which direction, and the answer must change smoothly as the point moves. A surface of flat triangles answers with a jolt at every edge. A smooth shape described by a few numbers answers exactly. Those numbers have to be found from the scan.
By the end you will be able to fit a line, a circle and a ball to measured points, describe a joint surface as a curve turned about an axis, and say what a fit’s error does and does not tell you.
Why not use the triangles?
The humerus of the anatomy atlas behind this book’s arm (BodyParts3D) is a surface of 3,784 flat triangles. On the trochlea its corner points lie between 2 and 3 mm apart: the 142 of them used later in this chapter share about 1,000 mm² of surface. Three things make such a surface a poor joint surface.
- Its facets are larger than what matters. The cartilage on the trochlea is about 1 mm thick, and the overlaps that decide the contact force are tenths of a millimetre. A flat facet 2 mm across cuts inside a curve of 10 mm radius by 0.05 mm at its middle, and the direction it faces is wrong by up to 6° at its edges.
- Its slope jumps. As a point slides across an edge from one triangle to the next, the direction to the surface changes at once. A contact force that follows that direction changes at once too. The search for balance in a later chapter relies on forces that change smoothly.
- It carries the scan’s roughness. Every point of a scan is a little off. A smooth shape fitted to many points averages their errors out.
A smooth shape also says something. “A ball of radius 10.3 mm” can be compared with other elbows. Ten thousand coordinates cannot.
The best line through points
All fitting in this chapter rests on one small problem: the straight line that passes closest to a set of points.
Take points and a line , with slope and with the value of where is zero. The misfit of a point is how far it lies above the line:
No line passes through every point, so some misfits must be left over. The method of least squares chooses the line for which the squares of the misfits add up to the least:
In words: square each misfit, so that points above and below the line both count against it, add the squares, and make the total as small as it can be. This is the usual way to fit a formula to more measurements than it has unknown numbers (Driscoll and Braun 2022, section 3.1).
depends on the two numbers and . It is a bowl-shaped landscape over them, and at the bottom of a bowl the ground is level in every direction: both partial derivatives are zero. Work them out one at a time. The derivative of a square is times the derivative of .
Step 1: change . Raising by one unit lowers every misfit by one unit, so
In words: the misfits of the best line add up to zero. Writing out the misfits and collecting terms gives
where is short for , and likewise for the other sums.
Step 2: change . Raising by one unit lowers the misfit of point by , so
Step 3: solve the pair. Multiply the equation of step 2 by , multiply the equation of step 1 by , and subtract the second from the first. The terms in cancel:
In words: four sums over the points give the slope, and the slope gives . Nothing has to be searched for. That is the mark of a linear fit: the unknown numbers appear in each point’s equation only multiplied by known numbers, and the best values come out in one step.
From a line to a circle
A joint surface is curved, but one trick turns a circle into a line.
Suppose the points lie near a circle whose centre is known to be somewhere on a given straight line, the axis, at an unknown position along it, with an unknown radius . Give each point its position along the axis and its distance (rho) from the axis. By Pythagoras’ theorem a point on the circle satisfies
Multiply out the first square and move the terms that contain unknowns to the right:
In words: for a point on the circle, the quantity , which can be computed from the point alone, is a straight-line function of . Its slope is and its value at is . So plot against , fit the best line, and read off
A circle whose centre may be anywhere in the plane, at , works the same way with one more unknown: . A ball in space has one more again. Each is still linear in its unknowns, and the same reasoning gives three or four equations in place of two. The simulator solves them by machine (biomech::fit in crates/biomech/src/fit.rs).
One caution belongs with the trick. What the line fit makes small is the misfit of , a squared distance. For a point near the circle that is very nearly times its distance from the circle, so the two agree closely when the scatter is small compared with the radius.
A worked example
Four points are measured on the outline of a ball whose centre lies on the axis. Each is recorded to a tenth of a millimetre.
| Point | (mm) | (mm) | (mm²) | ||
|---|---|---|---|---|---|
| 1 | −8.5 | 4.9 | 96.26 | −818.21 | 72.25 |
| 2 | −3.5 | 9.7 | 106.34 | −372.19 | 12.25 |
| 3 | 3.4 | 9.3 | 98.05 | 333.37 | 11.56 |
| 4 | 8.5 | 4.9 | 96.26 | 818.21 | 72.25 |
| Sum | −0.1 | 396.91 | −38.82 | 168.31 |
| Quantity | Calculation | Result |
|---|---|---|
| Slope | −0.1717 mm | |
| Value at zero, | 99.223 mm² | |
| Centre | −0.086 mm | |
| Radius | 9.961 mm |
The misfit of each point is its distance from the fitted centre minus the fitted radius. For point 2 the distance is mm, so its misfit is mm: it lies outside the fitted circle. The four misfits are −0.225, +0.322, −0.030 and −0.076 mm.
One number sums them up. The root-mean-square misfit is found by squaring the misfits, taking the mean of the squares and taking the square root: mm. It is the typical size of a misfit, with large ones counting for more.
Try it: a circle through measured points
The points in the lab were made by placing them on a circle of radius 10 mm centred on the axis, moving each one towards or away from the centre by a made-up error, and recording it to a tenth of a millimetre.
- Check the worked example. The four points are those of the table. The line has slope −0.172 mm and value 99.22 mm² at zero. The fitted centre is at −0.086 mm, the fitted radius is 9.961 mm, the root-mean-square misfit is 0.200 mm and the largest is 0.322 mm.
- Remove the errors. Set the largest error to 0. The fitted centre is at 0 and the radius is 10.015 mm. The misfit of 0.019 mm that remains comes from recording to a tenth of a millimetre.
- Use more points. Put the error back to 0.3 mm and set the number of points to 40. The centre moves to −0.003 mm. The radius is 9.944 mm: with these particular errors, which happen to pull inward more than outward, more points do not bring it back to 10. A fit cannot remove an error that all the points share.
- Predict, then check. Choose the second set of errors, keep 40 points, and note the centre, 0.055 mm, and the radius, 10.068 mm. Now narrow the arc to 20°, so that all the points sit on top of the circle. Which will suffer, the radius or the centre? The radius is still 10.067 mm. The centre has moved to 0.299 mm. Every point on top of the circle is about one radius from the axis wherever the centre lies along it, so the points fix the radius well and say little about the centre.
- Press Play to narrow the arc and widen it again, and watch the fitted centre on the second plot wander as the arc shrinks.
Step 4 is a warning for what follows. A fit answers well only the questions that the points bear on, and the root-mean-square misfit does not show which those are: it is 0.15 mm for the wide arc and 0.16 mm for the narrow one.
A curve turned about an axis
The trochlea is a spool: a surface of revolution. Such a surface is described by two things.
- An axis: a straight line fixed in the bone.
- A profile: the radius of the surface at each position along the axis.
Every point in space has a position along the axis and a distance from it. The point is on the surface when , outside it when is greater and inside when is less. Seen this way the whole surface collapses to a single curve in a flat picture, with across and up. Familiar shapes fit the same picture. A cylinder is a level line. A ball centred on the axis is a half circle, which is why the circle of the worked example was called the outline of a ball.
For the trochlea the simulator writes the profile as a polynomial: a sum of powers of the position,
In words: the radius is a constant, plus a part in proportion to position, plus a part in proportion to its square, and so on up to the sixth power. Here is the position along the axis rescaled to run from −1 at the medial edge of the joint surface to +1 at its lateral edge. The highest power is the polynomial’s degree. The numbers to are unknown, but each appears only multiplied by a known power of . So this too is a linear fit: the least-squares reasoning of the line, carried through for seven unknowns in place of two, gives seven equations that are solved in one step.
Finding the axis
One thing is left: where is the axis? It does not enter linearly. Tilt the axis and every and every changes in a way that involves sines and cosines of the tilt.
The simulator’s model builder finds it by search (crates/arm_builder/src/elbow.rs). It starts from the hinge axis of Stage 3. For a trial axis it fits the trochlea’s profile and, with the same axis, a ball for the capitellum whose centre must lie on the axis, as in the worked example. It adds up the squared misfits of both. Then it tilts and shifts the axis a little and keeps any change that makes the total smaller, until no small change helps. The search has four numbers to adjust: two tilts and two sideways shifts.
Two choices are made by hand before the search, and they are part of the result.
- Which points count. The humerus has points everywhere, and only some lie on the joint surfaces. The builder takes the points of the lower end of the bone that lie within stated distances of the Stage 3 hinge axis, leaving out the hollows above the joint surfaces. These windows were set by looking at where the points lie.
- Which points are dropped. After a first fit, points more than 1 mm from the fitted surfaces are left out and the fit is repeated, twice, so that a few stray points do not steer the axis.
The fitted surfaces of the humerus
The result, for the humerus of the atlas, is one axis and two shapes about it.
| Trochlea | Capitellum | |
|---|---|---|
| Shape | profile of degree 6 turned about the axis | ball centred on the axis |
| Points fitted | 142 | 85 |
| Root-mean-square misfit | 0.26 mm | 0.41 mm |
| Size of the bone surface | radius 12.6 mm at the medial edge, 7.8 mm in the groove, 9.5 mm at the lateral edge; 19.4 mm wide | radius 10.34 mm |
| Cartilage added | 0.96 mm | 1.08 mm |
The fitted axis lies 2.67° from the hinge axis of Stage 3 and passes 0.45 mm from the centre that hinge turned about. The centre of the capitellum’s ball is 14.9 mm along the axis from the point nearest that centre, towards the lateral side.
The scan shows bone only. The joint surface is the cartilage, so each shape is moved outward by the mean thickness of the cartilage measured on that surface in 20 elbows of elderly donors: 0.96 mm for the trochlea and 1.08 mm for the capitellum (Miyamura et al. 2019, Results). The cartilage surface of the capitellum is therefore a ball of radius 11.42 mm. The atlas has no cartilage of its own to measure.
Try it: the fitted surfaces against the bone
The lab draws the picture described above: position along the fitted axis across, distance from the axis up. Each purple dot is one of the points of the atlas humerus that the fit used.
- Check the table. With degree 6 the readouts give 142 points and a misfit of 0.257 mm for the trochlea, with radii of 12.65, 7.80 and 9.46 mm, and 85 points, a radius of 10.34 mm and a misfit of 0.409 mm for the capitellum.
- Try a cylinder. Set the degree to 0. One radius must serve the whole surface: 10.47 mm, the mean of the points. The misfit is 1.79 mm and the worst point is 3.03 mm away. A cylinder is the simplest surface a hinge could turn on, and it misses the spool’s rims and groove entirely.
- Predict, then check. Raise the degree one step at a time: 0.98, 0.59, 0.48, 0.31 and 0.257 mm at degree 5. What will degrees 6 to 8 gain? Almost nothing: the misfit is 0.257 mm at degree 6 and 0.254 mm at degree 8. The curve of misfit against degree has gone flat.
- Read the second plot. At degree 6 the misfits of the individual points scatter between −0.8 and +0.7 mm with no pattern along the axis. At degree 2 they show a clear wave: the shape is still wrong.
- Press Play to step through every degree in turn.
What the fit error means
Step 3 shows the two things a fit error is made of. While the misfit falls as the degree rises, the shape was too simple. When it stops falling, what remains does not belong to the profile: the roughness of the scan, and whatever in the bone is not round about one axis. A quarter of a millimetre is the size of that remainder for this trochlea.
Raising the degree further would go on shrinking the misfit a little, by letting the curve wriggle after single points. A polynomial of high enough degree would pass through every point and describe the scan’s errors faithfully (Driscoll and Braun 2022, section 3.1). The degree is chosen where the misfit stops falling.
A fit error does not measure everything.
- It says nothing about points that were left out. The windows and the 1 mm rule decided which points count. The error is reported for the points they selected.
- It does not say how well each fitted number is known. The circle lab showed a radius found well and a centre found badly with the same misfit.
- It does not say that the scan is right. A fit to the atlas describes the atlas.
Surfaces the model builds: the ulna and the radius
The joint surfaces of the forearm bones are not fitted to bone. The reason is in the atlas, and it has to be stated plainly.
The fitted trochlea can be used to measure the atlas ulna. Of the ulna’s surface points, 59 face the trochlea; they cover half a turn about the axis, as a notch should. In the pose in which the atlas shows the arm, those points lie 3.96 mm outside the bone surface of the trochlea on average, and anywhere from 1.09 to 6.49 mm. The cartilage of the two bones together is 1.87 mm thick (Miyamura et al. 2019, Results). So the atlas leaves twice the room that cartilage fills, and unevenly. The top of the atlas radius is farther off still: 7.95 mm from the bone of the capitellum on average, from 5.17 to 10.57 mm, where the cartilage is 1.85 mm thick. Those are means over the whole joint. Fat-suppressed MRI of three donated arms in the open MULTIS data (Erdemir et al., MULTIS) shows the two layers between the olecranon and the back of the trochlea together 1.5 mm thick (1.1 to 1.8 mm from slice to slice), close to Miyamura’s 0.78 + 0.82 = 1.60 mm for that part of the joint.
The notch itself has the right shape. If the atlas ulna is moved as a rigid body by 2.5 mm and turned by 6.2°, its notch points come to lie at one distance from the trochlea, to within 0.48 mm root-mean-square. The forearm bones of the atlas are simply not seated on the humerus. The atlas was built from magnetic resonance images of one man, and its details were then filled in by medical illustrators working from textbooks, atlases and models (Mitsuhashi et al. 2009, construction process). The gap between its bones is not a measurement of a joint.
The model therefore keeps the atlas pose of the forearm and builds the forearm’s joint surfaces as mates of the humeral ones:
- the notch of the ulna is the trochlea’s cartilage surface again, moved outward by a small gap, over the half turn and the width that the atlas ulna covers, and fixed to the ulna;
- the dish of the radius is a ball about the capitellum’s centre, larger than the capitellum’s cartilage surface by a small gap, over the part that the head of the atlas radius covers, and fixed to the radius.
The gaps are 0.26 mm and 0.41 mm: for each pair, the fit error of its humeral surface. They are a choice. Stage 4 shows how much depends on it.
The seated elbow. A second elbow is built beside this one, with the forearm bones moved onto the humerus as the cartilage would seat them; the chapters of this part run the atlas elbow above, and the seated one is an option. Its surfaces differ in three ways.
- The notch runs on past the bony tips by the cartilage that covers them: 6° at the olecranon and 9° at the coronoid, the medians of MRI of 39 healthy elbows (Giannicola et al. 2015; only the abstract was read). The notch then spans 206° about the axis.
- The trochlea has a lateral flank. Past the crest of its lateral ridge the atlas trochlea is not a solid of revolution: it climbs behind and falls in front into the groove beside the capitellum. The seated elbow fits that flank as a shape that changes with the angle about the axis, to 0.37 mm root-mean-square; between its crests the trochlea is the profile turned about the axis, as above.
- The notch’s width. On CT of the same three MULTIS arms the bony notch reaches 1.03 to 1.35 times its groove’s radius lateral of the groove; the atlas ulna, and so the model’s notch, stops at its trochlea’s lateral crest, 6.7 mm lateral of the groove. A notch widened to the donors’ mean, 1.18 times the radius, is built as an option and is off: widened, it brought no comparison into its measured band and lost two, and its surface beyond the atlas ulna would be constructed, not measured.
Two consequences follow. First, in this model the two surfaces of each pair fit each other perfectly, which real joint surfaces do not. In real elbows the notch is reported to be a little deeper than the trochlea, so that the two touch at the notch’s edges first and towards its middle as the load grows (Eckstein et al. 1995; only the abstract was read). Second, everything this part of the book says about the ulna’s and the radius’s joint surfaces is said about constructed surfaces. Only the humeral surfaces are fitted to bone.
Check against measurement
The fitted radii can be compared with radii measured on other people’s bones.
| Radius of the bone | This fit | Measured | Source |
|---|---|---|---|
| Trochlea, medial rim | 12.6 mm | 10.7 ± 0.9 mm; 12.6 mm | Zou; Giannicola |
| Trochlea, groove | 7.8 mm | 7.6 ± 0.7 mm; 8.5 mm | Zou; Giannicola |
| Trochlea, lateral rim | 9.5 mm | 9.5 ± 0.9 mm; 10.5 mm | Zou; Giannicola |
| Capitellum | 10.3 mm | 11.6 ± 1.4 mm | Sabo |
The first measured values are half the diameters measured on bone models of ten young adults made from scans, with half their standard deviations (Zou et al. 2022, Table 3). The second are half the mean diameters of 78 elbows of healthy adults measured by magnetic resonance imaging (Giannicola et al. 2017; only the abstract was read). The capitellum’s is its radius of curvature in the plane of bending in 50 elbows from donors (Sabo et al. 2011; only the abstract was read).
The groove and the lateral rim agree with the first study to within one standard deviation, and the medial rim agrees with the second. The medial rim is two standard deviations larger than in the first study, and the capitellum is one standard deviation smaller than measured. The two studies of the trochlea differ from each other by as much as the fit differs from either. The atlas humerus is an ordinary humerus by these measures.
The axis can be checked too. X-ray pictures of eight elbows placed the bending axis through the centres of the arcs of the trochlea’s groove and of the capitellum (London 1981; only the abstract was read). The fitted axis is a line of that kind: the line about which the trochlea is round, passing through the centre of the capitellum’s ball. It differs from the Stage 3 hinge axis by 2.67°, which is within the 2.6° to 5.7° by which the turning axis of a real elbow wanders during one bend (Bottlang et al. 2000, Table 1).
What this model leaves out
- The true shape of the forearm’s joint surfaces. They are mates of the humeral surfaces, as described above. Stage 4 reports what follows from that.
- Cartilage of uneven thickness. One mean thickness is used for each surface. Measured thickness varies across a surface: on the trochlea from 0.82 mm at the back to 1.12 mm underneath (Miyamura et al. 2019, Results).
- Departures from roundness. The trochlea is taken as exactly round about one axis and the capitellum as exactly a ball. The capitellum of real elbows is reported to curve differently in two directions, with radii of 11.6 and 14.0 mm (Sabo et al. 2011; abstract only). The misfits of 0.26 and 0.41 mm contain whatever of this the atlas bone has.
- Other people. The fit describes one constructed adult man. Fitting the arm to a person returns to this.
- What the surfaces do when pressed. A shape alone carries no force. That is the next chapter.
Summary
- A joint surface is described by a smooth shape with a few numbers, found by least squares: the shape for which the squared misfits of the scanned points add up to the least.
- The best line comes from four sums. A circle centred on an axis becomes a line when is plotted against ; balls and polynomials are fitted by the same reasoning with more unknowns.
- A surface of revolution is an axis and a profile. The trochlea of the atlas humerus is a profile of degree 6 with a misfit of 0.26 mm; the capitellum is a ball of radius 10.34 mm with a misfit of 0.41 mm, centred on the same axis.
- A fit error mixes the shape’s shortcomings with the roughness of the scan. It says nothing about points left out or about how well each fitted number is known.
- The joint surfaces of the ulna and radius are constructed as mates of the humeral surfaces, because the forearm bones of the atlas are not seated on its humerus.
Next: two smooth surfaces, each with a layer of cartilage, are pressed together. How hard do they push back? Cartilage in contact.