workshop private

← all creations

Amber

sprites · created 2026-09-17

128×80 pixel signalised approach at dusk with three loops — a driver who can stop, one who can clear, and one who can do neither. The band of road where no lawful action exists turns out to be the missing seconds of yellow printed onto the asphalt — 26.2 m behind a 3.0 s yellow at 45 mph, and 1.30 s wide no matter how fast you cross it.

physicssimulationpixel-artcanvas

Yellow comes on. You are somewhere on the approach, doing whatever you were doing, and you now have exactly two lawful options. Each one is a distance.

To stop, you need to notice, decide, move your foot, and then brake — so you need v·t + v²/2a of road, where t is perception-reaction time and a is a deceleration you would actually choose. Call it Xs.

To go, you need to reach the stop bar before the light goes red, so you need to be no further back than v·y.

Nothing requires those two to meet.

The band between them

If v·y < Xs there is a stretch of road between the furthest point you can clear from and the nearest point you can stop from, and a driver who happens to be standing on it when the yellow comes on has no lawful action at all. That is the Type I dilemma zone. It is not a driver problem, or an attention problem, or a problem that a sign fixes. It is a length of road that the signal’s timing brought into existence.

Its length comes straight out of the two distances:

zone = Xs − v·y = v·(t + v/2a − y)

and the bracket is the ITE change-interval formula — t + v/2a, the yellow this approach needs — minus the yellow somebody actually set. Which means the time a car spends crossing the band is

zone / v  =  (t + v/2a) − y  =  required yellow − set yellow

and the speed cancels. The dilemma zone is the missing seconds of yellow, printed onto the asphalt. Half a second short is half a second of trapped driving on a 25 mph residential street and on a 60 mph arterial alike; the band stretches with speed, but exactly as fast as the car crossing it speeds up.

What the yellow has to be

Every number below is t + v/2a at the ITE values: a 1.0 s perception-reaction time and 3.05 m/s² — ten feet per second squared, which is a third of what a dry tyre will give you. That is deliberate. The formula asks what a driver will comfortably do, not what the car can survive.

approach speedm/sreaction legbraking legrequired yellow
25 mph11.181.0 s1.83 s2.83 s
30 mph13.411.0 s2.20 s3.20 s
35 mph15.651.0 s2.57 s3.57 s
40 mph17.881.0 s2.93 s3.93 s
45 mph20.121.0 s3.30 s4.30 s
50 mph22.351.0 s3.67 s4.67 s
55 mph24.591.0 s4.03 s5.03 s
60 mph26.821.0 s4.40 s5.40 s

Note the shape: the reaction leg is a flat second and the braking leg is linear in speed, so required yellow is a straight line with a 1.0 s intercept. The demo draws it against whatever yellow you set, and shades the gap.

Now hold the yellow at three seconds — a legal number everywhere, because the national manual’s rule about this is a range, roughly three to six seconds, and not a formula — and walk the speed up:

approach speedset yellowcan clear withincan stop beyondthe bandcar lengthsto cross it
25 mph3.0 s33.5 m31.7 mnone
30 mph3.0 s40.2 m42.9 m2.7 m0.60.20 s
35 mph3.0 s46.9 m55.8 m8.9 m1.90.57 s
40 mph3.0 s53.6 m70.3 m16.7 m3.60.93 s
45 mph3.0 s60.4 m86.5 m26.2 m5.61.30 s
50 mph3.0 s67.1 m104.3 m37.3 m8.01.67 s
55 mph3.0 s73.8 m123.8 m50.0 m10.72.03 s
60 mph3.0 s80.5 m144.8 m64.4 m13.82.40 s

At 25 mph the two distances overlap and every driver has at least one way out — some have both. At 45 they have come apart by twenty-six metres, five and a half car lengths of road on which the only question is which violation you would prefer. At 60 it is sixty-four metres, on an approach whose yellow is barely half the 5.40 s it needs.

The identity, which is the whole piece

Run the same experiment the other way: hold the shortfall at exactly half a second and let the speed do what it likes.

approach speedrequiredset (half a second short)the bandto cross it
25 mph2.83 s2.33 s5.6 m0.50 s
30 mph3.20 s2.70 s6.7 m0.50 s
35 mph3.57 s3.07 s7.8 m0.50 s
40 mph3.93 s3.43 s8.9 m0.50 s
45 mph4.30 s3.80 s10.1 m0.50 s
50 mph4.67 s4.17 s11.2 m0.50 s
55 mph5.03 s4.53 s12.3 m0.50 s
60 mph5.40 s4.90 s13.4 m0.50 s

Or look at media/06-two-speeds.png, which is 25 mph and 55 mph side by side, each half a second short. The approaches are 66 m and 145 m long and the bands are 5.6 m and 12.3 m — and because each ribbon is scaled to its own approach, the red lands in exactly the same place twice. That is what “the speed cancels” looks like.

The last column does not move. The band more than doubles in length between the first row and the last and it takes the same half second to drive through every time, because both the band and the car scale with v and the ratio is a difference of two times. So there is one number here, not two, and the useful way to say it is in seconds: the dilemma zone is how short the yellow is.

That gives the model its sign convention. margin is set − required:

There is no third case and no dead band in the middle. The two regimes meet at exactly zero, which is the point at which somebody set the yellow to the formula.

Both ways of being wrong are the same wrong

Pick the 45 mph approach with its three-second yellow and walk one driver back along it. if they brake and if they keep going are the two things a real person does, worked all the way through:

where they are at yellowable toif they brakeif they keep going
100.0 m backstopstops 13.5 m shortcrosses at 4.97 s, on red
90.0 m backstopstops 3.5 m shortcrosses at 4.47 s, on red
86.5 m backstopenters on red, 0.0 m incrosses at 4.30 s, on red
84.0 m backtrappedenters on red, 2.5 m incrosses at 4.18 s, on all-red
78.0 m backtrappedenters on red, 8.5 m incrosses at 3.88 s, on all-red
72.0 m backtrappedenters on red, 14.5 m incrosses at 3.58 s, on all-red
66.0 m backtrappedenters on all-red, 20.5 m incrosses at 3.28 s, on all-red
60.4 m backgoenters on all-red, 26.2 m incrosses at 3.00 s, on all-red
55.0 m backgoenters on all-red, 31.5 m incrosses at 2.73 s, on yellow
40.0 m backgoenters on yellow, 46.5 m incrosses at 1.99 s, on yellow

Inside the band there is no column to be in. Brake — the correct instinct, the one the light is asking for — and you slide across the bar under red and come to rest somewhere in the middle of the intersection, which is both a violation and the single worst place on the road to be stationary. Keep going and you enter on red as well, just faster and further forward.

The trapped loop animates the first of those, because it is the one that looks like obedience. Brake lights on, the car doing exactly what the signal told it to, coming to rest ten metres inside the box with the cross street about to be released.

Three ways to be short without meaning to

Grade. The formula has a grade term because gravity is part of the braking, and a downhill approach is the case everyone’s intuition already has. What is less obvious is how little grade it takes to undo a yellow that was computed correctly on the assumption of a level road:

gradeeffective brakingrequired yellowagainst a 4.3 s setting
+6%3.64 m/s²3.77 s10.7 m of overlap
+4%3.44 m/s²3.92 s7.6 m of overlap
+2%3.24 m/s²4.10 s4.0 m of overlap
+0%3.05 m/s²4.30 s0.0 m of overlap
-2%2.85 m/s²4.53 s4.6 m of band
-4%2.66 m/s²4.79 s9.8 m of band
-6%2.46 m/s²5.09 s15.9 m of band
-8%2.26 m/s²5.44 s23.0 m of band

Two percent — a slope you would not notice driving it — is enough to open a band on an approach whose yellow was computed to the formula.

The speed you put in the formula. The v in t + v/2a is supposed to be the speed drivers are doing, the 85th percentile of the approach, which on a typical arterial runs several miles an hour over the sign. Put the posted limit in instead — an easy, defensible-sounding substitution, and a common one — and the yellow is short for the majority of the traffic it is timing:

postedyellow set from it85th-percentileyellow that neededshortfallthe band
25 mph2.83 s31 mph3.27 s0.44 s6.1 m
30 mph3.20 s36 mph3.64 s0.44 s7.1 m
35 mph3.57 s41 mph4.01 s0.44 s8.1 m
40 mph3.93 s46 mph4.37 s0.44 s9.0 m
45 mph4.30 s51 mph4.74 s0.44 s10.0 m
50 mph4.67 s56 mph5.11 s0.44 s11.0 m

The shortfall column is flat for the same reason the identity is flat: a fixed 6 mph of unmeasured speed is Δv/2a of missing yellow and nothing else. It is 0.44 s everywhere, on every approach in the network, silently.

Rounding and caps. Both of the above compound with an agency that rounds yellow to the half second and caps it at five, which is why the demo’s as posted button does exactly that and the the formula button does not.

What the band actually catches

Arrivals in free flow are stationary in time, so the cars whose time-to-bar at yellow onset lands in a window of width Δ number, in expectation, λΔ — and Δ is the shortfall. That makes the trapped rate linear in the missing yellow, with no threshold below which shaving it is free:

shortfallper cycleper day (90 s cycle)per yearone approach, veh/h
0.25 s0.0424014600600
0.50 s0.0838029200600
1.00 s0.16716058400600
1.30 s0.21720875920600
1.30 s0.10810437960300
1.30 s0.4334161518401200

A quarter of a second — one notch of rounding, an amount no driver could perceive and no engineer would defend a meeting over — is forty cars a day off one approach of one intersection, every one of them in a situation with no lawful exit. The arithmetic runs the other way too, and this is the part worth sitting with: adding a quarter second removes all forty, and the only thing it costs is a quarter second of capacity per cycle.

The all-red is a different question, and it is the easy one

The yellow decides whether you can be out of the dilemma. The all-red decides whether the box is empty before the cross street is released, which is (W + L)/v:

approach speed20 m box30 m box12 m box
25 mph2.21 s3.10 s1.49 s
35 mph1.58 s2.22 s1.07 s
45 mph1.23 s1.72 s0.83 s
55 mph1.00 s1.41 s0.68 s

It goes the other way from the yellow: faster traffic needs less all-red, because it gets out quicker. The two intervals are often spoken of as one lump of “clearance time,” which is how a long all-red gets used to justify a short yellow. They are not interchangeable. All-red protects the driver who is already committed. It does nothing whatsoever for the driver who has not reached the bar and cannot stop.

And a correct yellow does not fix everything

Everything above is the Type I zone, which is about what is physically possible and which the formula closes exactly. There is a second one, and it survives:

approach speedoption zoneits widthrequired yellow reaches back
25 mph27.9–61.5 m33.5 m31.7 m
35 mph39.1–86.1 m46.9 m55.8 m
45 mph50.3–110.6 m60.4 m86.5 m
55 mph61.5–135.2 m73.8 m123.8 m

The Type II or option zone is the band — conventionally between 5.5 s and 2.5 s of travel time from the bar — inside which drivers genuinely disagree with each other, the probability of stopping running from about one in ten at the far edge to about nine in ten at the near one. Two cars abreast, both lawful, one stopping and one not; and behind them, somebody who was reading the car in front rather than the light. It is drawn as the dotted rule above the bands in the ribbon, and note that it does not coincide with the Type I band at all — at 45 mph the option zone reaches 110 m back, well beyond the 86.5 m at which stopping becomes possible.

Nothing about the change interval addresses it. That is what advance detection is for: hold the green a moment longer so the platoon is never offered the choice. Different problem, different instrument, and the reason “just lengthen the yellow” is a complete answer to one question and not to the other.

The drawing

Two registers, and each one says what scale it is at, because they cannot be at the same one — the argument is eighty-six metres long and the frame is a hundred and twenty-eight pixels wide.

The scene is at 6 px/m: twenty-one metres of a four-lane arterial at dusk, with the car 28 px long because 4.67 m at that scale is 28 px, and that is the same 4.67 m the all-red calculation uses. Lane dashes are 3.05 m on a 12.19 m period (ten feet and thirty), the stop bar is 0.6 m of thermoplastic laid only across the lanes it binds, and the camera rides with the car until the last twenty metres and then holds still, so where the car ends up is a fixed frame rather than a pan.

The ribbon underneath is the entire approach to scale, on one axis, with the two bands drawn where they are: teal for the road you can still stop from, green for the road you can still clear from, and hatched red for whatever is left between them. The dotted tick inside the teal band is the reaction leg — 23% of the whole stop at 45 mph, travelled at full speed with nothing happening. Under it runs the signal’s clock, with a playhead.

The head hanging off the mast arm is, at 6 px/m, about a pixel and a half of lens, so there is an inset in the corner, about four times the scene’s scale, with lenses you can actually read. It is the one thing in the frame that is not drawn to scale, and it is there because for most of every loop the real head is off the left of the frame and the aspect is the one thing that must never be.

Reuse

source/amber.mjs is framework-free and has no canvas in it. Everything is SI; MPH is the only unit conversion and PPM is the only thing that knows about pixels.

The demo is demo/index.html with its own copy of the module (ADR-0002). It sizes itself to its viewport, so the site’s full-screen button just works.

What is derived here, and what isn’t