Hair and hat
Nine hairdos, seven kinds of headwear – and underneath exactly two constructions for everything that grows on the head. That is the biggest simplification of this edition, and it carries almost the whole chapter. What sits on the head goes two other ways: the hat as a figure, the beanie as a body in the depth buffer, the helmet as a body with a hole in it. And the full beard a third: it is too thin to be measured.
All masses are THE SAME shell over the skull, with a different hairline, a different thickness and different trimmings at the edge. Except the one that is not a shell but a sphere: the afro.
Two kinds
A mass is a shell: the head's surface is sampled above a hairline, and every point gets a thickness along its normal. The outline of that inflated surface is the outline of the hairdo. Because this happens in spherical coordinates and not in pixels, a side parting travels correctly with the rotation instead of sticking to the picture.
Accessories are individual strokes on the scalp. No outline, no fill, no hole for the face – a few curls on the crown and done.
| Kind | Values | What gets built |
|---|---|---|
| Mass | haube, pony, seitenscheitel,
lockenwolke, igel, zoepfe,
dutt, afro, punk, plus the
kappe |
Point cloud above the skull, outline, fill, hairline. The punk builds its cap directly (edge as a ring at one height, the head outline offset above it) and puts a fan of flames in space on top |
| Accessory | flaum, locken, stacheln,
antenne |
a few strokes on anchors of the scalp |
What is deliberately missing: long hair that falls below the temples and hangs beside the cheeks. It calls for an inner boundary along the cheek, and that is half the effort of the whole geometry. Instead the hairline is clamped above the face – then the inner boundary is always the hairline itself. Braids therefore hang behind the head, not beside it.
The hairline
haaransatz(dna, opt) returns a function: for every
longitude u the height v at which the hair
begins. Lower in front than at the back, with a wave at the temples.
Everything else – teeth, wave, tilt, a fixed height for the hat – are
attachments on that one base line.
The lower bound is the clamp
(ansatzKlemme). Hairline height and eye position come
from independent draws and know nothing of each other; without the
clamp the hairline slips below the eyes and the hairdo covers half the
face. Where it lies is rolled per head: sometimes a little above the
brow, sometimes down below the eye – hair may touch the eye, and a
strand grazing the eye's edge is a hairdo. At the temples it may go
lower: there it covers nothing, and a long strand at the temple gives
a hairdo its direction.
The teeth are shares of the space between base line and clamp, not fixed amounts. As fixed amounts they almost always hit the clamp and were sawn off flat – every fringe wore the same trapezoid on the forehead. As a share a tooth stays a triangle. The trapezoid still exists, but as a variety: some heads get teeth that want to go deeper than the space allows, and the clamp cuts them off – a straight-cut fringe. The tip does not sit in the middle of its tooth, but off-centre; centred tips always hung exactly over the nose when there were three teeth.
Symptom: at the side one tooth fell through the others, and the fill got a hole at that spot.
Cause: the clamp jumped in steps at 0.85 and 1.05, and by an amount larger than the spacing of two sample points of the hairline. Between two points the line plunged downwards as a thin wedge and crossed the outer edge on the way.
Fix: smooth instead of stepped
(t*t*(3−2t)). The statement holds generally: a jump in
a boundary function is always a hole in the surface built from it.
The fall at the temple
Towards the sides the hairline sinks, the hairdo hangs down beside the eyes and frames the face. Without it the hair ends above the temple in a diagonal cut and the head wears a cap.
This is explicitly not a tooth. A tooth at the silhouette is a narrow tongue that fights the outline in every rotation; a soft fall is a lobe with a round tip that only tips towards the centre when the head turns. How strongly it falls is rolled per head: not at all, half, fully. A sheet on which every hairdo hangs down equally far is a haircut, not a scatter.
The teeth
Two to five tips, each of a different depth and width, and one of them the deep one – otherwise they are all mediocre. A smoothly cut fringe is a bathing cap; the teeth turn it into hair that somebody cut.
Symptom: a thin strip of hair ran down the edge of the head at the temple, and it wobbled with every rotation.
Cause: the deep tooth was an edge tooth. There the shell is thin and lies close to the silhouette – a deep tooth at that spot is no longer a tooth but a narrow tongue over the edge, and every head rotation becomes a fight between outline and hairline.
Fix: two caps. The two edge teeth stay at 0.24 at most (a fixed amount, not a share: this is about the silhouette, and that is as large as the head), and the deep one moves inwards. And the arc of teeth reaches to ±1.4, not all the way to the silhouette – the outer tips used to lie exactly on the edge there.
The thickness
The thickness runs out at the hairline, not over the full height. Two mistakes lie close together here, and you can see both from a distance.
Symptom: a horizontal wedge stuck out of the head at the side, roughly at eye level.
Cause: the shell stood at full thickness along its lower edge. Because it is inflated radially outwards, that shows up at the silhouette as a step.
Fix: only the last stretch above the hairline gets
thinner (0.4 in v, smoothed to 28 %). The other mistake
lies right beside it: if the thickness runs out over the full
height, the hairdo is flat at the sides and sticks to the skull like
wet hair.
In the same function stands the second number you cannot guess:
nu = 144. With 56 longitudes the narrow lobe at the
temple had gaps in the angular bins of the
outline, the arc broke off, and the fill
ended above the hairline. It is still only a few thousand points – a
fraction of the skull.
The region
Two curves become a polygon: outside the outline of the cloud
(bogenUm: −PI/2, hinter: kontur), inside
back along the visible hairline. That sounds like two lines and is the
place where most hairdo bugs have lived. masseZug is
therefore exported – this diagnostic picture belongs on a docs page
rather than in a throwaway test file.
Symptom: under strong rotation the drawn hairline continued across the cheek as a thin thread beside the fill.
Cause: outer edge and hairline come from two sources. Under strong rotation and with a deeply hanging tooth, the hairline ends further out than the outline; the polygon then closes across a chord, and the fill stops there.
Fix: stutzeAnsatz – whatever lies
beyond the outline is thrown away. Only at the ends; in the middle
the line belongs where it is.
Symptom: the tip of the hairdo was missing at the temple, or a thin spike hooked back into the face there.
Cause: the join was set at the narrowest place. But on the tongue at the temple, outline and hairline lie close together along the whole stretch – the minimum hits some arbitrary point in the middle of it.
Fix: cut at the latest narrow place, not at the narrowest: the last point below the bound of 0.055. That keeps the tongue and throws away only what still hooks around behind its tip. The difference between the two lines is the entire hairdo.
Symptom: on a turned head the hairdo hung down on the far side as a lobe reaching ear height, with an almost horizontal lower edge; the head contour ran visibly through it. Conspicuous under a hat, where the shell is thin.
Cause: the outer edge is a radial outline around the head centre – per angular bin the farthest visible point of the shell. When the mass hangs low on the far side, the bins pointing diagonally down look right through the mass, and the farthest point there is the hairline itself, the flank of a spike. The edge bends inward at the temple and runs along the spike; the seam cuts at the latest close spot and keeps exactly this inward run.
Fix: stutzeAussen trims the outer edge
from both ends by everything that is close to the hairline
and clearly inside the head contour – “close” meaning one
shell thickness, since the inward run is the inflated flank, not the
skin. Real silhouette sits on
the skin plus thickness, i.e. outside the contour – the hedgehog's
tongue survives.
Symptom: where the outer edge went over into the hairline, a straight edge sat across the temple.
Cause: the outer edge is the silhouette of the inflated shell, the hairline lies on the skin. Between the end of one and the start of the other stands the full thickness of the shell, and the polygon closes it with a chord.
Fix: rundeZipfel inserts an arc at
both ends that continues the direction of the outer edge and swings
into the hairline. A hand does not draw a cut there but a lobe with
a round tip.
Plus a third, smaller decision: the hairline is sampled a little way
beyond the visibility limit (rand = 0.06).
At the temple it hangs low, and the outermost point of the hairdo lies
in that direction already on the far side – if the line stopped at the
visibility limit, a long thin gusset would remain. But only a little
way: if the sampling runs far out, the hairline wraps around the
silhouette and runs back across the face as a wedge.
The full beard is drawn, not measured
A full beard is the same arrangement as a hairdo, mirrored: a mass below a line instead of above it. The beard line says where the shaving stops, the mass hangs beneath it, strands lie on top. So the obvious route was to reuse the same machinery – cloud, outline, seam. It was the wrong one, and what it failed on marks the limit of the method above.
The radial outline works for masses that are THICK and lie star-shaped around the head centre. A thin coat does not need it at all: its silhouette IS the skull's, offset outward by its own thickness.
Symptom: the beard's edge was crooked – a notch at the cheek, a spur at the neck, and turning one away produced the other.
Cause: umriss takes the farthest cloud
point per angular bin around the head centre. For hair every ray meets
the edge exactly once. A beard is a narrow band around the jaw: at the
cheeks the rays graze it almost tangentially, bins are left empty and
filled in from their neighbours; at the chin several latitudes pile
into one bin. What comes out is a staircase – and the four repairs at
its ends (trimming, seam, crossing, lobe) each leave a spur of their
own.
Fix: the edge is no longer measured. The head contour is available anyway; between the two corners it is pushed outward radially by the beard's thickness, and the beard line runs back along the skin. Both end in the same two points, so the region closes exactly. No bins, no smoothing, no seam – and no point cloud: the beard saves the four thousand points a hairdo costs.
The two corners are the key. They sit where the beard
line crosses the silhouette – found by walking outward from the
most-facing point of the line in both directions until the sign of
nz flips, then bisecting. Not from the outside in: behind
the ear the line crosses a second time, and taking the first and last
flip wraps the beard halfway around the head under strong rotation.
The thickness is not uniform. A beard hangs: under the chin it stands out farthest, at the cheeks it lies flat. That is measured not by position along the arc but by the direction of the edge point – how much of it points downward. This way the distribution turns with the head instead of sticking to the same spot on the arc.
At its end the edge runs out into points, and by the same grammar as the hairline: teeth along the arc, each with its own width, its own depth and a tip that does not sit in the middle of its tooth; one becomes the deep one, and the deep one is never the outermost. It is done as a factor on the thickness rather than as a curve of its own: that keeps the direction the contour's normal, so the edge cannot fold over itself.
The same grammar is not yet the same handwriting, though. A head with a
toothed fringe and a round beard still has two hands at work, even
when both edges are built by the same formula. So the
hairstyle has a say in how the beard runs out –
haarKante in haar.ts, right next to the
switch that builds the hairstyles, so the two lists cannot drift apart:
| Edge | Hairstyles | What the beard makes of it |
|---|---|---|
zacken | bob, fringe, side parting | angular, few and long: facets with large angles, the count taken from the hairline's tooth stream |
kraus | curl cloud, afro | round: few, shallow, wide lobes on a calm base – a curl's unrest is round, not toothed |
glatt | braids, bun | round and barely cut in: a trimmed beard for a tidy hairstyle |
keine | bald, fuzz, antenna, curls, spikes, crew cut, punk | no edge to take measure from – a graphic rim, sometimes a free roll |
Two things about this were wrong on the first attempt, and both are instructive. First the shape: the beard was given the hairline's tooth count but round lobes to go with it – straight flanks and sharp notches above, bulges below. Nobody sees the number, everybody sees the shape. So the angular-or-round decision comes before any counting, and the angular edge builds its teeth the way the hairline does: across the full cell, with every notch on one line. Notches that sit at different depths depending on their neighbours make a wandering polygon – corners without rhythm.
Second the count, and that was guessed wrong twice. Too few (factor 1.35, arc length against forehead width) leaves two effective teeth across the whole beard. Too many – the attempt to get equally sized teeth in the picture, factor 2.5 – gives a comb of small teeth, and a comb is a different hairstyle. What characterises a bob is few long straights with large angles: one calm edge and one cut that counts. Making the teeth small in order to have many of them loses exactly those straights. It now sits at about 1.7, and one tooth stands out clearly rather than slightly.
What gets counted is segments, not teeth: what you see are the straight pieces of the edge, and about half of them lie in the picture. Measured across twelve thousand heads, visible segments along the lower quarter of the arc:
| Edge | p10 | median | p90 |
|---|---|---|---|
zacken | 5 | 7 | 8 |
keine | 2 | 3 | 4 |
kraus | 2 | 4 | 5 |
glatt | 1 | 2 | 2 |
Only a mass can answer
A hairstyle that is a shell over the skull has an edge with a handwriting – toothed, wavy or cut straight – and the beard can copy it. Trimmings have none: spikes, curls, fuzz and antenna are single strokes on the scalp, they have no edge at all. And caps do have one, but not one of their own: crew cut and punk are a thin shell running smoothly around the skull – the same edge as a bald head, which is to say none.
An earlier state counted spikes, crew cut and punk as a kind of their
own, spitz, and gave them a saw of nine to fourteen teeth.
That was a property of the hair, not of its edge: the
spikes stand off the head, they cut nothing in. A head with spikes
needs the same calm beard as a bald one.
For those heads the rim turns graphic: a calm, even shape that belongs to nobody. The scatter sits in the choice of shape, not in a wobble inside one – equal teeth at equal spacing are a statement, slightly unequal ones are a mistake. Four kinds, measured across twenty thousand heads:
| Kind | Share | Shape |
|---|---|---|
| smooth | 23 % | no teeth at all, the rim is the offset outline |
| one | 29 % | a single point in the middle, nothing else – no lowered base |
| even | 28 % | three to six identical teeth along the arc |
| free | 20 % | not graphic at all, but the free roll of the round edge. A bald head is no reason for order; sometimes a beard is just a beard |
How sharp is up to the hairline
The edge says which kind of unrest the beard gets; it does not
say how sharp. Two heads with a fringe can have a flat, wavy hairline
and one with deep pointed notches, and the beard should follow both –
otherwise the coupling is only half done. haarSchaerfe
measures the flank of the deepest tooth: depth per
half cell. Both count, deep and narrow – two deep teeth across the
whole forehead are blunter than five half as deep. Out comes a number
between 0 and 1; at the beard it drives how far the tip stands out and
how deep the notch cuts.
So the two cannot drift apart, the measurement reads the real
roll of the hairline rather than a rebuilt one: zackenWurf
in schale.ts is pulled out of the hairline for that and
used by both – the same move as with zackenZahl. Two
copies of the same four rolls drift apart the moment somebody turns one
number.
And then the depth, which together with the count makes the angle: the flank rises by the depth per half cell, so one more tooth helps exactly as much as one more millimetre of depth. At the hairline the teeth are fractions of the space between base line and clamp, and they nearly use it up. At the beard they hung on a chain of roll, edge factor and floor and ended up standing out a good third of the thickness – measured, not guessed. So the angular edge normalises its rolls against its own deepest one: the whole spread stays, the scale comes from the beard. The notch takes away nearly half the thickness, the deepest tooth stands out by twice that.
Symptom: the teeth were computed, rolled and measurable in the profile – what you saw was an egg with a straight cut across its lower left.
Cause: curvature. The hairline sits on an almost straight forehead; the beard's edge sits on an arc that turns some thirty degrees across one tooth. A triangle filling its cell rises more gently than that – the curvature eats the point and what remains is the straight flank.
Rule: on a curved edge the point must rise more
steeply than the edge turns. The same depth across a quarter of the
cell, the rest of the cell staying the round contour. And the stroke
must be drawn eckig – the Catmull stroke rounds every
point away again.
Symptom: the light strands on the beard's mass all converged on a single point below the chin. The beard read as a sliced melon.
Cause: a strand runs along its meridian, and meridians converge towards the pole. For hair that is right – hair really does converge at the crown. At the lower pole it is wrong.
Fix: StraehnenOpt.spreiz. The strand
moves outward by cos v₀ / cos v, exactly the factor by
which its latitude narrows. At 1 it keeps its distance from its
neighbours, at 0 it behaves like hair. The beard uses 0.8 and stops
short of the pole – it narrows downward, but it does not end in a
point.
The afro is a sphere
Every other mass is skull plus thickness and inherits its shape: a boxy head gets a boxy hairdo. With the afro it is the other way round. The hairdo has a shape of its own, and the skull is inside it.
So the thickness is not given but COMPUTED: enough that the outer surface lies on a sphere around the head's centre. Where the skull is wide, the hair is thin. That is why the afro looks the same on a long head and on a round one – unlike the curl cloud, which becomes long on a long head.
The computation
What is wanted is the distance along the normal to
the target surface – because it is exactly along the normal that
wolke() inflates the point. As long as the sphere is
centred on the head's centre, that is the same as "target radius minus
head radius". If its centre sits higher (hoeher), it is
not: then it is the intersection of a line with an ellipsoid, that is
a quadratic equation. The positive root is the exit outwards; if the
head point already lies outside, the minimum thickness applies, or the
hairdo would have a hole there.
With tapering (keil) the width of the target surface
depends on the height – and you only know that once you know the
distance. The equation then has no closed form.
Three passes are enough: the tapering is smooth, and
the first shot (width at skin height) is already close. Without
tapering the loop settles after the first pass on the same value as
before.
Symptom: instead of a sphere, a wide cap with an edge all around sat on the head.
Cause: the mass ended at the hairline. The hairline is the line on the forehead – if the mass stops there, there is no hair beside the cheeks.
Fix: a second lower edge (massen
against unten). It falls towards the sides down beside
the cheeks. It is never visible – it lies behind the head surface,
and what sticks out is the ring of hair around the face.
Six kinds instead of one range
kugel, turm, wolke,
kurz, dreieck, pilz. A wide
range would be the more convenient way and the wrong one: uniformly
distributed values almost all land in the middle, and a sheet of
nothing but medium-sized afros is a stencil. The same reasoning stands
behind the widths of the curls and behind the kinds of hat.
| Kind | What defines it |
|---|---|
kugel | goes as far as the cell allows and hangs down low – only then does the silhouette close into a circle |
turm | the same sphere, but its centre sits above the forehead; narrower, or it would stick out of the top of the cell |
wolke | wider than it is tall and distinctly more lumpy |
kurz | sits close and ends above the ears |
dreieck | widest at the jaw, narrow towards the top – with a low bottom edge, or only the tip would remain |
pilz | the inverted triangle: sweeping on top, narrow towards the temple |
What runs differently for the afro
The afro does not need the join – and must not have it. With every other mass, outline and hairline converge at the temple; with the afro they lie half a head apart. The join would find no pair there and would cut somewhere arbitrary. Instead the outline for the fill is clipped to the stretch above the hairline, and the region closes across two radial chords. Radial is the condition: a chord from the temple end to the low-hanging end of the arc would run across the cheek – and this fill lies in front of the face.
Symptom: with an afro that only showed on one side, a line lay across the face, roughly at mouth height.
Cause: the lower edge of the mass hangs low at the back and projects inwards when seen from the front. It occupies the lower angular bins with a small radius; the outline then runs all the way around the head. Previously only the longest run outside remained – that was a single flank, and the fill closed from there with a chord.
Fix: ausserhalb. What is taken is the
stretch from the first to the last point outside the head contour.
In between nothing is deleted but clamped to the
contour: where the hairdo does not stick out past the head, its edge
follows the head's edge.
Symptom: at the sides, roughly at ear height, the hair stopped abruptly – with a horizontal edge and a filled tab standing in mid-air next to the cheek. And this at a place without any special zone: there the mass sits safely behind the head and could simply run out.
Cause: that is where the sphere dips under the head
contour, and behind the head it no longer counts towards the outline
(see hinter in umriss). The
last angular bin with visible mass therefore does not sit on the
contour but still a stretch short of it: at a bin width of just under
four degrees the outline drops by more than a tenth of a head radius
there, and the whole piece between the last bin and the contour is
missing. So the edge broke off next to the cheek – and because the
fill closes it with a chord between its two ends, the break became a
filled tab. Exactly the chord the source note claimed lay inside the
head and was never to be seen.
Fix: laufeAus. Each end gains one more
bin, one angular step further and with the contour as its radius. The
edge now ends at the head's edge instead of beside it, and the chord
lies inside the head again. Just inside the contour,
not exactly on it: the stroke wobbles, and a wobble on the edge would
be a tab again. An edge that already runs all the way around is left
alone – there the next bin holds not the head but the other end, and
the run-out would cut a notch into the hairdo.
For the roughening of the edge, the fringes and the curls inside the mass the same rule holds as for any trimming on a silhouette: they hang off the angle, not off the point index. The outline comes from angular bins and travels one point further with every small rotation – hung off the index, the roughening would run once around the head with every breath. The three harmonics have integer frequencies so that the edge closes all the way round; a fractional frequency would give a jump at ±π.
And all the rolls fall BEFORE the visibility test. Otherwise a curl that is just turning away drags the whole stream behind it, and with every small rotation all the following ones change size – a flickering pattern.
The edge is the curl
The predecessor laid a chain of bales on a smooth edge. Because the edge ran through underneath, that read as beads on a string, not as hair. Here the edge itself becomes a sequence of coils, all sheared in the same direction so that the crests overhang like twisted strands. Inside every coil lies an open spiral – only that turns the bulge into a curl. A closed ring would read as a hole.
Symptom: the edge of the curl cloud looked like the toothed hairdo it is supposed to differ from.
Cause: a sine arc runs out flat at both ends and meets its neighbour in a point.
Fix: a semicircle. It stands vertical at its ends – every coil is a round bulge with a notch beside it. Plus a small inset between the coils: without it they stand on a smooth base line and the edge merely undulates.
Here too two size classes instead of one wide range (a quarter thick coils among thin ones), a hero curl distinctly larger than the others, and a tilt to one side – a hairdo has a side with more on it.
The hairline of the curl cloud gets the same coils,
only bulged inwards (richtung: -1), in the same shear as
the outer edge and divided MORE COARSELY (teilung: four
to five instead of nine to thirteen over the length): a few round
bulges hanging onto the forehead. Underneath lies the calm wave, not
the teeth – teeth under the bulges were points between curves, a saw
with a ruffle; the fine division of the outer edge at small scale read
as a ruffle without a saw. Only few, large coils are curls.
The hat is a body
The hat goes the same way as the beanie: crown and brim are two surfaces of revolution, each from a profile, shrunk onto the skull, and the depth buffer says what is seen. Before, it was a figure made of rings whose outline was constructed by hand – the convex hull of the crown with the front foot arc as its floor, the brim in two halves by view direction, the rear half before the head surface. Each of those rules was right as long as it was right, and each had to be found on its own. Two bodies, because both need their own edge: the brim its outer edge all round, the crown its silhouette where the brim does not cover it.
The brim has a felt thickness (0.03): two rows in the
grid, outer edge top and bottom. Without it it is an ellipse without
height, and seen exactly edge-on it collapses to a line. Towards the
foot of the crown it rises as a ledge up to the foot's height
and reaches a little into the crown wall; its inner edge lies inside
the skull. The tilts – schwung towards the rim,
kippe front against back, the delle in the
lid – are applied to the grid afterwards, per angle; they hang on the
angle in the head, not on the view.
It is shrunk onto the skull, not onto skull plus hair
– the same decision as with the beanie. The old hat measured the skull
with the hair (haarPolster) so that it would not
hang in mid-air beside the hairdo; over an afro that made it a lid on
a sphere. You put a hat on the head and the hair gives way: it is
stuffed into the crown with the same rule as under the beanie
(stopfeUnter, the crown as the cap) and spreads out again
in a cone under the brim. Unlike under the beanie, all the
masses are drawn under the hat – only the trimmings (curls, spikes)
are not, they would poke through the crown. The shells under hat and
beanie are dense (40 rings): coarse, there was a step between two
rings that swallowed whole sides of the hairdo seen from the front.
Five kinds, and why the axes are coupled
fedora, trilby, sonne (sun hat),
zylinder (top hat), eimer (bucket). What
matters is the coupling of crown height and brim
width: a tall crown with a wide brim becomes a mushroom, a flat crown
with a narrow brim disappears between the ears. So the kind is rolled,
not each axis on its own.
Add the sitz: now and then the hat perches on top of the
head instead of sitting. Higher up the skull is narrower, so the same
hat becomes smaller by itself. Its brim then measures against the
head and not the narrow foot of the crown – otherwise it
would vanish behind the temples, and a hat without a visible brim is a
bucket.
What the buffer draws
The surface is a region border from the buffer – and one for crown and brim together. Filled separately, a thread of paper remained at the seam: the misprint offsets each surface on its own, and two smoothed borders never lie on top of each other. The strokes are rings of the grid with the covered pieces cut out – not the region border as a stroke, which would run along the head contour at the back and draw it twice. Under the band there is no line: the band separates crown and brim, and the two would almost always lie close together. The crown edge is only stroked where it does not run along brim cells.
The outer contour of the brim is its silhouette, not the top edge alone: the brim is a disc with thickness, in the picture two ellipses offset by that thickness, and its outline is the outer hull of the two. Which one that is at a given place is a question for geometry – whichever point lies further from the centre – not for the depth buffer. One in front, the other behind, with exactly two switches in between. The buffer keeps its real question: whether this piece of edge is visible at all. The rear outer edge runs from the tip backwards until it disappears behind the crown – in the picture the side of the brim's top face, ending at the band. That it lies behind its own brim does not count as covered: the brim reads as a band, and a band has sides. Behind the crown – between its image edges – it stays away, otherwise the rear contour would run straight across the brim.
Unlike with the beanie, the hair is in the buffer.
Under the crown it can never lie in front of the hat – but under the
brim it can: if you see its underside (head tilted back), the mass
continues below the foot of the crown in front of the inner
part of the brim, and the brim has to step back there. That holds for
every hairdo, not only the afro. So that the hair does not grow out of
the underside beside the crown, it stays pulled into the skull down
to below the ledge (saumUnten).
And the hat draws one line per edge – the only thing on the head that does. Its area comes from the buffer, its strokes from the grid rings; the two curves of the same edge never quite coincide. Every faint secondary line therefore sits beside its cloth rather than on it, and reads as a construction line. So these are gone: the second, offset pencil layer of the big contours (on a straight brim edge it becomes a displaced double line), the thin stroke of the felt thickness below the brim edge, the lid edge on top of the crown, and a band edge without its band area. Plus half the wobble: a felt hat has a cut edge and a pressed crown – with hair and wool the unrest is the drawing, on the hat the same wobble read as badly aimed.
Symptom: the brim contour was a saw at the sides, a barb at the tip, and broke into short pieces in between.
Cause: three of them, and all three looked like a shaky pen. First, the depth buffer decided which of the two brim edges is the silhouette – it answers in cells, and where the disc grows thin in the picture its answer flipped from step to step: the contour zigzagged between the ellipses by the felt thickness. Second, the same flickering test tore the line into pieces, and remainders under three points fell away entirely. Third, the curve through the points was a uniform Catmull-Rom: the ring has 64 equal steps in angle, which project to image steps of one hundredth at the tip and eight next to it, and the curve overshoots on those.
Fix: determine the silhouette geometrically (the
point further from the centre); bridge holes of one or two steps
instead of cutting; and parameterise the curve centripetally – that
provably produces neither cusps nor self-intersections
(stift.ts#catmull).
Symptom: between crown and brim a thread of paper showed through, even on the bald head.
Cause: two surfaces, two region borders, misprint twice – the offset pulled them apart. Before that: the ledge ended lower than the foot, and from below you looked between foot and brim onto the hair.
Fix: fill crown and brim as one region; the ledge up to the height of the foot and overlapping into the wall.
Symptom: the contour of the brim stood only at the front; at the sides the thin felt stroke remained. The sides of the top face were missing entirely.
Cause: the contour asked for the top edge, and from slightly below that is behind its own underside at the sides – correctly covered. The sides hung on the visibility of the crown foot, and from below that lies behind the ledge.
Fix: draw the silhouette (top edge, else bottom edge), and the rear edge outside the crown's width despite its own brim in front. A detour that cost time: a straight line from the crown corner to the brim tip – wrong anchor, straight over an arc; the real edge has the arc of the surface and ends at the band by itself.
Symptom: the hat band did not read as a band but as a dark stripe under the brim.
Cause: it sat on the foot of the crown – exactly where the brim attaches, and was half covered by it.
Fix: a little higher up the crown, as a
surface with two edges instead of a thick stroke, in a
darker tone of the same cloth (stoffTief) – a colour of
its own would be a second garment on the head.
The beanie is a body
The woollen beanie went this way first, the hat followed it. Every hairdo is a shell, the skull plus a thickness. For hair that is right – a boxy head gets a boxy hairdo. A garment has a shape of its own: a beanie sits on a long egg differently than on a round head, and is still the same beanie. So it is a surface of revolution from a profile, a finished body that you push onto the head until it sits. And it covers instead of cutting: what lies beneath it is not computed away beforehand, it loses in the depth buffer.
The surface of revolution
A profile in (radius, height): at the bottom the roll of the cuff as a half-round, set on at the inside, bulging, rounded at the top; above it the crown as a dome with a long nearly straight wall and a short rounding on top – a hemisphere would be a bathing cap. Turned about the vertical axis, with separate half-axes for x and z, because a head is an egg and not a cylinder. Because these are triangles and not points, the surface has no gaps however coarsely it is divided: a handful of profile points carries a whole beanie.
Then it is shrunk onto the skull: every point moves outward until it clears what lies beneath it. That "beneath" is an obstacle table – the largest radius of the skull cloud per height and longitude, read over a small window of neighbouring cells so that a piece of cloth does not cut into the bulge below. The profile radius is a distance from the head surface, not a multiple of a base width: a common factor per longitude would come from the narrowest place of the profile, and the belly of the cuff, which has air anyway, would be inflated a second time – a mushroom instead of a beanie. Above the head there is no obstacle any more; there the profile alone carries, and that becomes the dome.
It shrinks onto the skull, not onto skull plus hair. A beanie that grows around the hairdo becomes a tent over an afro. You do not put a beanie on the hair, you pull it over the head, and the hair gives way. The allowance (0.055) is still not zero: there is always something under the wool.
The difference from an attachment on a latitude is the reason for the whole thing: the same latitude lies far up on a long skull, where it is already narrow, and a beanie that starts there becomes a plate with a frill. A height in head space always lies where it lies. The pompom is a small body of its own at the topmost point of the beanie – whatever hangs on a point of the beanie rides with it when nodding, instead of wandering from the skull's crown to the edge of the crown outline, as it used to.
The depth buffer
Everything else in this geometry answers the question "what covers what?" with a statement about head space – a plane below which there is no more hair (the old hat lid), a threshold behind which a point counts as covered, two passes for behind and in front. That is right as long as the statement is right, and each one had to be found by hand. The buffer asks differently: it rasterises the bodies with their depth into a grid (176 × 176 cells, two hundredths of a head per cell, finer than the pen's wobble) and lets the frontmost win at every image position. Whoever then wants to know whether a point is visible compares – it does not guess.
It is deliberately small and runs on the CPU: the pen runs there, and a buffer on the graphics card would have to be read back for every question. And it is not an image. It is never drawn. It answers three questions – what lies in front at this spot, where does a body's region end, is this point free – and the answers go to the pen as curves. The edge of the beanie's region becomes fill and outline stroke from the same path; the ribs are one family of meridians over the whole profile, and which piece you see is what the buffer says: a stroke that runs behind something is cut into pieces, not masked out. That is why every visible piece keeps its ends and its taper. And with that the old rule "the cuff edge must be the widest place" falls away – it came from the outline construction, not from the beanie; now the roll may bulge and the edge above it be narrower, and that is exactly what a cuff looks like.
Only the beanie, the pompom and the skull stand in the buffer – the skull as a coarse grid (36 × 40) and only as an occluder: the beanie runs around behind it, and without it its back would slap into the face as a flap. Its drawn contour still comes from the outline. The hair is not in it: it is stuffed under the beanie and can lie in front of it nowhere. Cost: about 1.9 ms per head with a beanie against 0.6 without.
The hair under the beanie
The hairdo takes its line from the headwear, not the other way round.
Only afro, fringe and curl cloud are drawn under the beanie at all
(UNTER_MUETZE_SICHTBAR) and stuffed into it; every other
hairdo under the beanie is a head without hair. The hard case is the
afro: a sphere the head sits inside, wider than any beanie. Covering it
is not enough – it would stick out all round below the edge, and the
beanie would sit on top as a lid.
stopfeUnter stuffs the hair into the cap – under the
beanie as under the hat crown, both a Stopfbau. Inside
the beanie every point lies at most on its inner side, well inside
(hem 0.14, lid 0.3 below the crown tip): what the hairdo puts
on its silhouette – curls, fringes, spikes – stands up to 0.14
above it and would otherwise stand beside the crown. Below the cuff
edge the mass may only grow inside a cone that starts
at the skull and widens downward; further down everything stays as it
was – the wreath around the ears is why you can still tell the head's
hairdo. The cone is steep at the front and sides (0.5) and shallow at
the back (2.2) with its foot midway between skull and edge: at the
back the hair visibly comes out from under the edge and the edge still
stands above it; at the front and sides it lies against the head under
the edge and falls away from the beanie's corner, with head contour
visible in between. What the stuffing moved is also not set
individually onto the surface (Schale.frei): a curl on the
old width would stand beside the beanie. The afro's edge stroke runs
only where mass stands above the head; the curl cloud's curls are
damped where the edge lies against the head.
Symptom: the afro lay as a bonnet over the crown, the beanie was only its cuff any more.
Cause: the first attempt let the hair gain in height what it lost in width. The points rose with the width of the cuff edge up to the crown, where the beanie is narrower, and stood in front of it there.
Fix: width decides, height does not get added. And the obstacle table is a maximum over neighbouring cells – at the crown, where the beanie narrows with every row, it is too wide; so also ask one row higher.
Symptom: an empty sector between two rings of the shell, the arc breaks; from the front half the hairdo is missing, when nodding it is there.
Cause: a band of fixed height under the edge turned a wide hairdo into a horizontal step. The radial outline sees no step.
Fix: a cone has no step. Plus the afro sphere under the beanie with 40 rings instead of 16 – coarse, there was already a step between two rings.
Symptom: with the head looking up, hair formed a horizontal step beside the beanie's corners, at edge height. The rear part slid lower, as it should – but you could not see it.
Cause: the visible top edge was hair at the front and sides directly under the edge, standing in front of the rear part. Two hours went into the rear part, which was already right.
Fix: at the front and sides the cone's foot at the skull and cone 0.5, the back unchanged, transition over about 40° behind the side. And the lesson: with "front" and "back", first check with a probe which points draw the edge – then talk.
The helmet takes something away
The open-face helmet is the fifth construction and the first that TAKES something away from the face. Band, cap, hat, headphones and beanie sit on the head and let it stay a head. The helmet replaces the silhouette: what you see is the shell, and the face looks out of its opening.
It is built like the beanie – a surface of revolution in head space, hidden by the depth buffer, fill and edge from the same run. Exactly one thing is new, and it is the whole helmet: its lower edge depends on the longitude. In front it sits above the brow, at the sides and back below the ear, and in between it stands almost vertical. That edge is the cheek of the opening.
A surface of revolution cannot do this by itself: its profile knows height and radius, not longitude. So it is built complete and then cut off – per column, the rows below the edge are pulled onto the point where the column crosses it. The body now ends where it should. The opening is not a mask, it is the place where no shell is left in the buffer.
Inflate, do not shrink
schrumpfeAufHindernis pushes every point outwards on its
own until it clears whatever lies beneath it. For wool that is right –
fabric drapes, and a beanie on a boxy head is boxy. A helmet
does not drape. It is rigid, and a rigid object that yields
point by point is no longer rigid.
So: one factor for the whole shell, the largest any point needs. Only the window between brow and crown is asked, and both limits cost an attempt each – see the traps below.
The air all around and the height of the dome are two
values, not one. Coupled, the dome stayed flat: you cannot pile up
material at the sides without the cheek pieces standing off, but you
can above the crown – and that is exactly where it is decided whether
a sphere sits on the head or a close-fitting hood. The helmet is the
only headwear besides the hat that changes the head's space
requirement; helmRaum reports it.
The centre stripe
The helmet is the first industrial object in this drawing. Everything else grows and wobbles; a helmet is allowed to carry a decal. One survived: the centre stripe from the brow edge over the crown to the rear edge. A star on the side of the shell was here too once, spanned in the tangent plane of the mesh. It renders cleanly nowhere – the shell curves most sharply there, a flat star sits crooked on it, and near the silhouette it hangs half off. A decal you can only show in one pose out of six is not a decal.
The stripe is a surface, not a stroke. The first attempt drew it as a very wide run along the front meridian – and a run is a line with width: its edges stay parallel to the centre line in the image, they do not follow the curvature. The wider it got, the more it read as lying above the dome rather than on it, and at the crown it tapered off, because the pen draws an end where the surface has none. A stripe on a shell is a piece of that shell: its own body made from the columns around the front meridian, set a hair outwards, with its own id in the buffer. Fill and edge come from the region boundary, exactly as for the helmet itself. Making it wider now means: more columns – and the count must be even, or the stripe sits half a column off the meridian.
Two bodies, front and back, sharing one id. At the pole all columns run into one point, so they connect there – and because the region is therefore a single one, the boundary walk finds both halves.
And the stripe ends above the helmet edge, not on it. Running all the way down, it butted straight into the opening at the front, and the decal turned into a wedge pointing at the face. A piece of shell between the end of the stripe and the rim is the difference between a stripe stuck on and a helmet painted in two colours. Same edge function, just set higher – then the end follows the edge everywhere, front and back.
And the edge of the stripe does not come from the raster. The region boundary is accurate to one buffer cell, smoothed, and printed with an offset – right for a colour fill, soft for an edge, and soft is wrong here: the stripe is the only part of this head that depicts a paint job, and a paint edge is sharp. So: both. The fill still comes from the region, because only the raster knows which part is hidden; over it lies the outline of the section taken from the mesh points themselves – down the left column, along the end edge, up the right column. That is exactly the division of labour of the press: colour soft, line sharp. The fill stays dry, because it meets its own edge.
What the helmet takes with it
The hair is tucked under it like under the beanie, using the complete shell as the obstacle, not the cut one: aligning hair to a shell with an opening would squash it to zero in front of the face – invisible, but a dent you see again from the side. The ears go, as under headphones, and the earring with them: an ear coming out of the shell is a hole in the helmet. The beard stays and comes out below the edge – a hard machine edge above a hand-drawn beard edge is the contrast that made the open-face helmet worth choosing over the full-face one. Braids, bun and punk it does not take.
Symptom: a flat cap in the shape of the head, read as a flying cap rather than a helmet.
Cause: point-by-point shrinking. The helmet inherited the shape of the skull, so it no longer had one of its own.
Fix: one factor for the whole shell. The shape is in the profile, the size comes from the head.
Symptom: helmets wider than half the sheet cell, with the face as a postage stamp underneath.
Cause: the factor came from a fraction whose denominator is the radius of the shell – and at the pole that goes to zero. One point is enough to blow up a maximum.
Fix: only ask points below the crown. Above it the profile alone carries.
Symptom: the shell stands off all around the head.
Cause: the lowest profile point sits between ear and mouth, where the cheek is widest. Trying to clear it with the padding widened the whole shell by a quarter.
Fix: the helmet clears the skull cap, not the jaw. An open-face helmet rests against the head down there; it needs no air.
Symptom: the lower end of the centre stripe had two spikes reaching far past the rest.
Cause: schneideAb derived a column's
longitude from its index: (i / nu) · 2π. For a
full surface of revolution that is the same thing – which is exactly
why it was written that way. But the stripe is a section of eleven
columns, and across eleven columns that fraction went all the way
around the head. Two columns got the height of the brow edge, the
rest that of the nape.
Fix: take the angle from the coordinates, not from the index. And the lesson: a formula that reads the index as an angle only holds while the body is the whole circle.
Symptom: the second line along the opening ran as an arc straight through the face.
Cause: only the depth test was asked. Above the opening there is skin, and it stands far behind the ring – so the test let it through.
Fix: two tests, as with the hat. The buffer says
whether something is in front; the id says whether there is any
shell at this pixel at all (beschnitten).
Behind and in front
Whatever hangs behind the head is drawn BEFORE the head surface and covered by it. That is the whole trick for "behind" – no mask, two passes. Beanie and hat ask the depth buffer instead.
It carries the braids, the full afro sphere and the headphones. With the headphones the division runs through the middle of the figure: at the back the whole band and the far cup, at the front the near cup and those pieces of the band whose skin faces the viewer. Without that division the far cup lay in the middle of the face at every rotation.
With the afro the rear pass is more than an appendage: there the full sphere is drawn, which the head then covers again in the middle. A region made only of outline and hairline would leave two gussets open at the temples – exactly where an afro is fullest, the sheet would show through.
The space requirement
Up to here space was not a question: everything a head wore stayed near it. A hairdo that brings its own shape can be wider than the head is tall. Whoever does not know the space has two bad options – the hairdo runs into the neighbouring cell, or all the heads are made smaller as a precaution.
So the style declares what it needs. Three things do that:
hutRaum (brim and crown), duttRaum (the knot
sits on top and may be large) and kugelRaum (the afro,
bumps and fringes included). How the caller deals with that – and why
it prefers shrinking the whole sheet over shrinking a single head – is
in the chapter The sheet.