Tissues that touch
The question. What stops one tissue from passing through another, and how hard do they press where they meet?
Nothing in the solver so far knows that two things cannot be in the same place. A biceps that shortens bulges against the brachialis beneath it and against the bone, and a muscle that crosses a joint is bent round it. Without contact the bodies of a simulated arm would slide through each other like ghosts, and every shape and force that depends on what a muscle leans on would be wrong. This chapter adds the missing push.
By the end you will be able to read a signed distance, turn an overlap into a force and share it among the corners of a brick, choose how stiff the push must be for an overlap you are willing to accept, and say how two soft bodies are kept out of each other.
How far outside?
To keep a point out of an obstacle the simulator must know, for any point, how far it is from the obstacle’s surface and on which side. The signed distance from an obstacle, written and measured in metres, is the distance from a point to the nearest part of the obstacle’s surface, counted positive outside the obstacle and negative inside.
For a ball of radius centred at there is a formula:
In words: the distance of the point from the centre, less the radius. For a ball of radius 40 mm, a point 45 mm from the centre is at mm, a point on the surface at 0, and a point 38 mm from the centre at mm: it is inside, 2 mm deep.
The signed distance has a gradient, , and it is the most useful thing about it. Move a point straight away from the obstacle and its distance grows by exactly as much as it has moved; move it sideways and its distance does not change at first. So is an arrow one unit long that points straight away from the nearest part of the surface. For a point that has got inside, it is the shortest way out.
A bone has no formula. For a shape given by a surface of triangles, the simulator works the signed distance out once, at the nodes of a regular grid laid over the obstacle, and stores the numbers. This is a distance grid. The size of each number is the distance to the nearest point of any triangle, and its sign comes from the winding number. Between the nodes of the grid the value is a weighted average of the eight nodes around the point, by the rule that carries a point inside a brick. An obstacle that moves, as a bone does, takes its grid with it.
A push in proportion to the depth
The surface of a soft body, in the simulator, is the set of points embedded in its lattice: the corners of the triangles of its skin. Each stands for a patch of skin, of area , a third of each triangle that meets at it. A surface can be given one more point at the middle of each triangle, with the areas shared out again among all the points. The muscles of the arm are given them, because two flat faces pressed together can otherwise overlap between their corners without any point noticing.
Take one such point and an obstacle. If the point’s signed distance is positive, nothing happens. If it is negative, the point has gone in to a depth , and the simulator charges it an energy:
In words: half a constant, times the area the point stands for, times the square of its depth. The constant is the penalty stiffness, in pascals per metre, and this way of keeping bodies apart is called a penalty: overlap is allowed, but it has a price, and the price rises steeply.
The force. The force on the point is minus the slope of this energy with the point’s position, as for every energy in this part. Move the point a small way . Its signed distance changes by , so its depth changes by , and the energy by times that. The force, which is minus the rate of that change, is
In words: the point is pushed along the shortest way out, with a force equal to the penalty stiffness times its area times its depth. Divide the size of the force by the area and what is left is a pressure, force on each unit of area, in pascals:
In words: the contact pressure at a point is the penalty stiffness times the depth. That is what the constant means: the pressure for each metre of overlap.
The push is always square to the obstacle’s surface and never along it. The contact has no friction.
Sharing the force among the corners. The point is not a node, and only nodes can be pushed. But the point is carried by the eight corners of its brick, at . Move corner by and the point moves by , so the energy changes by times what it would have changed had the point itself been moved by . The force on the corner is therefore
In words: each corner of the brick receives the point’s force times its weight at the point. The eight weights add up to 1, so nothing is lost or gained.
Why an energy. The chapter on balance left contact out because a wall has no energy: a body is free on one side of it and cannot be on the other. A penalty replaces the wall by a slope, steep but finite. Its energy is simply added to the potential energy of the body and its loads, and the search for the lowest point goes on as before, with a little more in its gradient and its stiffness matrix.
This is the scheme of the method the lattice came from: points embedded in the lattice, a stored distance asked at each point for rigid things, a penalty that grows with depth, and forces shared out by the weights (McAdams et al. 2011, section 7; that section was read in full, most of the rest of the paper was not). In that paper a spring is tied from each point to the nearest point of the obstacle. The simulator reads depth and direction from the signed distance itself, so that the force is exactly the slope of an energy.
Choosing the stiffness
From , a pressure is carried at the depth . So decide what overlap can be accepted under the largest pressure expected, and divide:
A worked example. A block 40 mm square rests on a flat plate under a weight of 8 N. The pressure is Pa. If its bricks are 5 mm across and an overlap of a twentieth of a brick, 0.25 mm, is acceptable, the stiffness is kPa for each millimetre. A twentieth of a brick at the largest pressure expected is the simulator’s own rule when it is given no other.
In the simulator that block came to rest with the plate carrying the whole 8 N, and with the depths of its points, each times the area it stands for, adding up to the weight divided by the stiffness: an overlap of 0.25 mm on average, as intended. No point was more than twice that deep.
There is a price at both ends. Too soft a penalty and the bodies sink visibly into each other. Too stiff, and the stiffness matrix holds numbers far larger than any the tissue put there, which makes each step of the search harder to solve, for little gain: the last section of the next worked example shows where the gain stops.
A law to check against
There is one case of two bodies in contact for which an exact answer has been known since 1882, when Heinrich Hertz published it (Hertz 1882), and it is the natural test of everything above. Two elastic balls, of radii and , are pressed together by a force . They flatten against each other over a small circle of radius , and their centres come closer by a distance . The answer is written with two combined constants:
In words: the radius of the contact grows as the cube root of the force; the approach of the centres is the square of that radius over the combined radius; and the pressure, which is greatest at the middle of the circle and falls to nothing at its edge, has the peak value , one and a half times the force divided by the area of the circle. and are the two Young’s moduli, and and the second elastic constant of the chapter on bricks, called Poisson’s ratio. This is Hertz’s law, as a textbook of solid mechanics states it (Bower 2025, section 5.4.10). The formulas are taken from the textbook, which gives the result and names its author; of Hertz’s own paper only three pages were read for this book. The law holds for a contact that is small beside both bodies, each of which is taken to behave like a flat body without end.
A rigid ball on a flat body. Let ball be rigid, which is a Young’s modulus without limit, and body flat, a radius without limit. The first term of vanishes, leaving with the flat body’s constants. Divide the top and bottom of by to get , which is when is without limit: call it . Then gives
and cubing the formula for gives , so that
In words: the force needed to press a rigid ball a depth into a flat elastic body is four thirds of the combined modulus, times the square root of the ball’s radius, times the depth to the power one and a half. Twice the depth takes times the force, because the contact grows as the ball goes in.
A worked example
A rigid ball of radius 40 mm is pressed 1 mm into relaxed muscle, with the shear modulus of 5 kPa and the bulk modulus of 10 MPa used throughout this part. The chapter on bricks gave Young’s modulus from those two, and from it gave .
| Quantity | Calculation | Result |
|---|---|---|
| Young’s modulus | 14.9975 kPa | |
| Poisson’s ratio | 0.49975 | |
| Combined modulus | 19.99 kPa | |
| Radius of the contact | 6.325 mm | |
| Force by Hertz’s law | 0.1686 N, or 168.6 mN | |
| Peak pressure | 2,012 Pa | |
| Penalty for an overlap of 0.05 mm there | 40 kPa per mm |
The simulator’s block for this example is 48 mm square and 24 mm deep, on bricks of 4 mm, resting on a smooth table. With the penalty of the last row it pushed back with 182.0 mN, 8 % more than the law, and its surface was up to 0.091 mm inside the ball.
Both differences have plain causes. The law is for a body without end, and this block is only 7.6 contact radii wide and 3.8 deep, with a rigid table under it where the law has more tissue to give. And the overlap is nearly twice what was asked for because the edge of a brick is a straight line between its corners. A straight line 4 mm long, laid against a ball of radius 40 mm with both ends touching, stands off it in the middle by mm. A surface made of such pieces cannot lie closer to the ball than that, however stiff the penalty: the overlap that is left is made of what the penalty lets in and what the bricks cannot follow.
How near to Hertz’s law
To separate those causes, the simulator pressed the same ball into larger blocks than a laboratory can solve while you wait, to a depth of a hundredth of the ball’s radius, with a penalty set to let Hertz’s peak pressure in by 2 % of that depth. The blocks were as deep as their half-width.
| Half-width of the block | Bricks | Force ÷ Hertz’s force | Deepest overlap ÷ depth pressed |
|---|---|---|---|
| 6 contact radii | half a contact radius | 1.092 | 4.3 % |
| 6 contact radii | a quarter of a contact radius | 1.069 | 2.6 % |
| 8 contact radii | half a contact radius | 1.068 | 4.3 % |
| 12 contact radii | half a contact radius | 1.044 | 4.3 % |
The excess over the law falls as the block grows, from 9.2 % to 6.8 % to 4.4 %, and as the bricks shrink, from 9.2 % to 6.9 %. So the agreement reached is 4.4 %, on the largest block tried, and every sign is that what remains belongs to the size of the block and of its bricks and not to the contact. No closer agreement was reached, and none is claimed.
Try it: a ball pressed into a block
The block is drawn cut through its middle, so that the dent can be seen. Only a quarter of it is solved; the rest follows by symmetry.
- Check the worked example. With the ball pressed in 1 mm and a penalty of 40 kPa per mm, Hertz’s law gives 168.6 mN, a contact radius of 6.325 mm and a peak pressure of 2.012 kPa, and the penalty allows 0.050 mm at that pressure. The block pushes back with 182.0 mN, 1.080 times the law, and its deepest overlap is 0.091 mm.
- Predict, then check. Halve the penalty to 20 kPa per mm. The allowed overlap doubles to 0.101 mm. What happens to the overlap found, and to the force? The overlap rises to 0.121 mm, and the force falls to 176.3 mN: the ball has sunk into the skin a little without denting the block as far.
- Stiffen it. Set the penalty to 80, then to 200 kPa per mm. The allowed overlap falls to 0.025 and then 0.010 mm, but the overlap found only to 0.068 and 0.043 mm: the 0.05 mm that a 4 mm brick cannot follow does not go away. The force rises to 185.0 and 186.5 mN.
- Press deeper. Set the penalty back to 40 and the depth to 2 mm. By the law the force should be 2.83 times that at 1 mm: 476.8 mN. The block gives 559.4 mN, 1.173 times the law. The contact circle is now 8.9 mm in radius, more than a third of the block’s half-width, and the block is far from endless.
- Press lightly. Set the depth to 0.2 mm. Law and block agree to 1 %: 15.08 and 14.95 mN. Here the radius of the contact, 2.8 mm, is less than one brick.
- Fill in the curve. Press Play. The ball is pressed in from nothing, a tenth of a millimetre at a time, and the block’s force is drawn beside Hertz’s curve. The second plot holds the recorded results of the table above, with this block as the black dot.
Two soft bodies
A rigid obstacle has one signed distance, worked out once. A soft body is a different shape at every moment, and working its signed distance out afresh each time would cost far too much. The published method has an answer, and the simulator uses it (McAdams et al. 2011, section 7): ask where the point is in the other body’s undeformed shape.
Call the bodies and , and take a point of ’s surface. The steps are these.
- Find the brick. Look for a brick of , in the shape has now, that contains the point. If there is none, the point is outside and nothing happens.
- Find the point’s place in the brick. A point in a brick sits at three numbers , and , each between the brick’s two faces, which fix its eight weights. The simulator finds the three numbers for which , with the brick’s corners where they are now, is the point. That is three equations in three unknowns, solved by Newton’s method in four or five steps.
- Go back to the undeformed brick. The same three numbers, used with the corners of the brick in ’s reference shape, give the place where that bit of ’s tissue was before anything deformed.
- Ask the distance there. has a distance grid for its reference shape, worked out once. Its value at says how far under ’s skin that bit of tissue lies. If it is negative, the point of is inside , to that depth, and the penalty of this chapter applies.
The tissue of has carried the point’s place with it, so the question “how deep in is this point?” is answered in the one shape of for which the answer is cheap.
Equal and opposite. The energy depends only on where the point of is in relation to the tissue of ’s brick. Move the point by , or move all eight corners of the brick by , and that relation changes in the same way. So if the force on the point is , the brick receives , shared among its eight corners by the point’s weights in it:
In words: whatever pushes the point of out pushes the brick of back, corner by corner, with the same force reversed. The weights add up to 1, so the two bodies push on each other equally. In the simulator’s check on two blocks pressed together, the contact forces on all the nodes of both added up to nothing, and so did their turning effects, to within the rounding of the arithmetic.
The points of are tested against , and the points of against , so that neither body’s skin is favoured. This two-way reading of points against the other body’s surface has a fault on surfaces whose triangles do not match, which Surfaces that touch everywhere shows by the patch test. Two equal blocks, one on the other under 8 N, carried exactly that weight across their faces, and the pile shortened as one bar of twice the height would, plus the overlap, to within 1 %.
Shapes that overlap before anything is solved
The atlas was drawn, not solved, and its bodies overlap. The surfaces of the long head of the biceps and of the brachialis beneath it lie up to 2.1 mm inside each other, and those of the two heads of the biceps 1.2 mm (measurements made on the atlas surfaces). Switch a penalty on at full strength in such a state and the first step of the search meets a force large enough to throw the surface out in one bound, bricks and all.
The remedy is to forgive the overlap at first and withdraw the forgiveness slowly. The depth is counted from an offset , in metres, inside the surface:
In words: a point is charged only for the part of its depth beyond the offset. Start with the offset equal to the deepest overlap there is, so that nothing touches. Solve. Reduce the offset a little and solve again, each time from the shape just found. When the offset reaches zero the contact is complete, and no single solve had far to go.
In the simulator’s check of this, a block was started with a rigid ball already 3 mm inside it, more than half of one of its 5 mm bricks. The offset was set to the overlap and taken to zero over six solves. Every solve reached balance; at the end no point of the block was more than half a millimetre inside the ball, and no brick had lost more than a tenth of its volume.
Try it: two cylinders between plates
Two soft cylinders lie one on the other between two rigid plates. Their surfaces are kept out of the plates by the stored distance of a plate, and out of each other by the four steps above, each cylinder’s points against the other. The penalty is 40 kPa per mm throughout: 10 kPa at a twentieth of a 5 mm brick.
- Check the balance. With the plates 1 mm closer than the cylinders’ combined height, the lower cylinder presses on the lower plate with 18.16 mN, the cylinders press on each other with 18.16 mN, and the upper cylinder presses on the upper plate with 18.16 mN. Each cylinder has two forces on it, and they must be equal. Each is 19.54 mm high where it was 20 mm, and 20.14 mm wide. The two heights add up to 39.07 mm, the 39 mm between the plates plus the overlaps: 0.034 mm at each plate and 0.032 mm between the cylinders.
- Predict, then check. Double the squeeze to 2 mm. Does the force double? It rises to 50.91 mN, 2.8 times as much, because the flattened patches have grown.
- Squeeze harder. At 3 mm the force is 83.95 mN, each cylinder is 18.60 mm high and 20.52 mm wide. The tissue that leaves the height goes to the width, as the chapter on volume said it must.
- Start from an overlap. Leave the squeeze at 3 mm and choose “overlapping: the overlap is let out”. Press Step once. The plates are already 3 mm in, the cylinders are drawn 3 mm into each other, and the contact between them forgives 2.75 mm of it: the force is only 3.5 mN. Keep pressing. After twelve steps the offset is zero and the force is 83.95 mN, with each cylinder 18.60 mm high: the shape that closing the plates gave. The plots draw this run as a second curve, against the plates’ closing less the overlap still let be. It keeps close to the curve of the closing plates and ends on it.
- Watch the other way. Choose “just touching” and press Play to see the plates close in.
Check against measurement
No measured contact pressure or contact force between tissues was read for this book, so nothing here has been compared with a living arm. What was compared is the simulator with an exact result of the theory of elasticity, Hertz’s law, to 4.4 %, and with the balance of forces, which holds to within rounding.
What this model leaves out
- Friction. The push is always square to the surface. Muscles slide over each other and over bone with nothing to hold them back. Stuck, sliding, or free to part adds the bounded shear of the loose tissue between muscles, and says why the friction of dry surfaces does not describe it.
- Everything between the points. Only the points are tested: the corners of the skin’s triangles and, where they have been added, the triangles’ middles. A sharp edge of one body can pass between the points of another’s skin and never be noticed. Surfaces that touch everywhere tests the whole surface, and Even triangles gives it triangles of one size.
- Points on the outside of the other body’s lattice. A point is tested only when it lies in a brick of the other body. Where two bodies end flush with each other, as the two cylinders do, the points on that shared end lie on the outer faces of the other body’s bricks, and rounding decides whether they are found. The laboratory reads its cylinders’ heights at the middle of their length for that reason.
- A body against itself. A muscle folded over on itself would pass through itself; a body’s points are not tested against its own bricks.
- A little overlap, always. A penalty carries pressure only by letting something in. The overlap can be made small and cannot be made nothing. Barriers that never let surfaces cross removes it, by an augmented Lagrangian and by a barrier.
- Bone that is moved by the push. The obstacles here stood still. A muscle pressing on a bone also pushes the bone, and a bone that moves takes its distance grid along. Tissue and skeleton together is about solving the two together.
Summary
- A signed distance says how far a point is outside an obstacle, and is negative inside. Its gradient points along the shortest way out. For a shape of triangles it is stored on a grid.
- Each point of a body’s skin that is inside an obstacle is charged . It is pushed out with the force , shared among the corners of its brick by its weights there. The contact pressure is .
- The penalty stiffness is the largest pressure expected divided by the overlap that can be accepted: a twentieth of a brick, unless told otherwise.
- A rigid ball pressed into a block met Hertz’s law, , to within 4.4 % on the largest block tried and 9.2 % on the smallest.
- Between two soft bodies, a point of one is traced back to the undeformed shape of the other and its depth read there; the two bodies receive equal and opposite forces. An overlap that is there at the start is forgiven by an offset, which is then reduced to zero over several solves.
Next: a muscle that only leans on its neighbours moves nothing. It moves a bone through the places where it is fixed to it: Tissue pulling on bone.