A projection has no reason to detour
Assumes A press makes the cheap route a search, A gamut charges a gradient nothing and The straight line is not the shortest gradient.
A press makes the cheap route a search held ten gradients inside a coated CMYK press by relaxing their length with a price for leaving the gamut, from six starting points each. It found that the price of staying inside is small — a median tenth of a per cent over the free shortest path — and that finding it is not: which start wins changes from gradient to gradient, and on five of the ten some start ends trapped, at more than twice the free length. It closed by naming the repair.
The better candidate is a different method rather than a check. A projection — take a free step, then move each point to its nearest inside colour — never lets the path pay for being outside, so the incentive that drives the detours does not exist. Whether it has traps of its own round a pinch, where the nearest inside colours for neighbouring points diverge, is the census here run with projection in place of the penalty.
It does not. The traps are entirely an artefact of the penalty, and removing them costs nothing.
No trap, on any gradient, from any start
Penalising the excursion leaves nine of sixty starts trapped at more than twice the free length, on five of the ten crossing gradients. Projecting instead leaves none — on any gradient, from any start.
- The spread across the six starts falls from a median 132 per cent of the free path to 0.95 per cent. Its worst gradient goes from 271 per cent to 2.4.
- The route it finds is barely better. The projection’s best costs a median 0.02 per cent over free against the penalty’s 0.13, and at worst 0.51 against 1.42.
- Every route it returns is inside — all sixty, to within a quarter of a CIELAB unit — which a penalty cannot promise, because a penalty is a price rather than a constraint.
- On the gradients whose straight line never leaves, it returns the free path exactly, to within a millionth. A constraint that moves a path it has no reason to move would be a method.
- So the press’s non-convexity was never turning the price into a search. The penalty was.
Why a penalty invites a detour
The penalised relaxation minimises the path’s length plus a constant times the squared distance outside the gamut, summed over its points. It is an ordinary way to hold a constraint and it has a property that is easy to overlook: a point outside the gamut is paying, and it can stop paying by moving in any direction that reduces its distance to the boundary.
Round a concavity those directions disagree. A point sitting in a notch can reduce its miss by coming back the way it came, or by carrying on past the notch to the far side, and the relaxation takes whichever the gradient points at. Once part of a path has gone round the far side, the length term pulls its neighbours after it, and the result is a route that is inside, locally optimal and twice as long as it needs to be.
The pale routes fan out and one of them goes round the outside of the concavity, landing 549 per cent over the free length. The dark routes lie on each other, and the worst of them is 0.85 per cent over free. There is nothing subtle about the picture: one method produces six answers and the other produces one.
A projection has no such branch because nothing is ever outside. The free step is taken, every interior point is moved to the nearest printable colour, and the length is measured on the result. A point in a notch is put back on the near wall of the notch because that is the nearest colour — the far side is further away, by definition — so the route that goes round it is never generated.
The earlier census is worth having in front of the comparison, because the shape it shows is what the repair is aimed at. The press rows spread across three decades and the sRGB rows — the same six starts, the same relaxation, a convex gamut — do not spread at all. That contrast is what made the non-convexity look like the cause, and it is a real contrast: a convex gamut has no concavity to go round and so the penalty has no branch to take. What it does not establish is that the non-convexity is sufficient, and a second method on the same non-convex gamut is the experiment that separates the two.
The census, both ways
The pale rows spread across three decades and the dark rows are points. On the ten crossing gradients the penalty’s results run from a hundredth of a per cent over free to nearly three times it; the projection’s run from a hundredth of a per cent to half a per cent, and eight of the ten sit entirely inside a tenth.
The six control gradients at the bottom — press gradients whose straight line never leaves — are the check that the projection is doing nothing when it should do nothing. Its best route on every one of them is the free path to within a millionth. The penalty’s is 0.0002 per cent longer, which is the relaxation’s own convergence and not a price.
That check is worth more than it looks. A projection that pulled a path about where the constraint was slack would be a gamut-mapping method with opinions, and its numbers would not be prices of the gamut at all. This one is inactive wherever the constraint is.
It is also the harder of the two checks to pass. A penalty is inactive by construction where the miss is nought, because its term is the miss squared; a projection has to be shown inactive, since it calls its projector on every point of every step and a projector that nudged an interior point would accumulate. The reason it does not is that the projector returns a point unchanged when the point is already inside, rather than pushing it towards the centre — which sounds obvious and is the sort of thing a distance-field implementation gets wrong, because a trilinear distance read a fraction of a cell inside the boundary is not exactly nought.
What the search was worth
The question the earlier essay asked was whether a cheaper search suffices, since six relaxations per gradient is too much for a drawing program adjusting a gradient interactively.
Nine of the ten sit below the diagonal and most sit far below. Under the penalty the spread runs from 1.5 to 271 per cent of the free length; under the projection from 0.06 to 2.4. The one gradient above the diagonal had a penalised spread of 1.5 per cent to begin with — a gradient the penalty never had trouble with, where the two methods are simply two relaxations converging to about the same place and their last decimal is noise.
Which mixture bows most depends on the ruler is the reminder that a route through colour space is reported in a metric, and everything here is in ΔE₀₀. A projection is onto the gamut, which is a set and has no metric in it; a length is a sum of colour differences, which does. So the projector and the objective are answering to different geometries, and the nearest printable colour under a Euclidean CIELAB distance is not quite the nearest under ΔE₀₀. That mismatch is small here because the projections are short — a few units at most — and it is the sort of thing that would matter for a heavily out-of-gamut path.
So the answer is not a cheaper search. The answer is that the search was buying almost nothing once the method stopped creating the thing it was searching past. A projected relaxation from the straight line alone — one relaxation, not six — lands within about a per cent of what six find, on every gradient of the census, and within a tenth of a per cent on most.
That is the practical output. A drawing program adjusting a gradient stop can run one projected relaxation and quote its length as the price of staying printable, and be wrong by a fraction of a per cent of a path whose whole excess over free is itself a fraction of a per cent.
It is worth saying what that price means, because the number is so small that it invites the wrong conclusion. A gamut charges a gradient nothing is the essay that established it on a display: the cost of keeping a gradient inside a gamut, measured as extra length, is a fraction of a per cent even where the straight line leaves. The press adds non-convexity and does not add cost. What a press charges a gradient is not length but shape — the route bends, sometimes a long way, and a bend that costs nothing in summed colour difference is still a visible change to which colours a reader passes through. The straight line is not the shortest gradient is about exactly that gap between a length and a path.
Which gradients are in the census at all is worth one paragraph, because the selection decides what is being generalised from. The ring is pairs of process inks at full strength in stated proportions, with and without half black, and the census takes the ten whose straight line leaves the press by more than a cell and a half and six that never leave. The ten are not exotic — they are ordinary two-ink gradients round the boundary, which is where a designer puts a gradient when they want it saturated. The concavities they cross are the press’s own, between the ink pairs, and they are the shape that a four-ink gamut has and a three-primary display does not.
What it costs to run
A projection is not free. Each step of the relaxation now has to find, for every interior point that is outside, the nearest colour the press can print — and the press’s gamut is a voxel set with no closed form, so that is itself a small iteration.
The one used here is Newton’s method on the gamut’s own distance function: step along the downhill direction by the current distance, which is exact for a flat boundary and converges in a few steps for a curved one, stopping when the point is within two hundredths of a CIELAB unit of being inside. Twenty-four steps are allowed and the census rarely uses four. Against the penalty’s cost — which evaluates the same distance function once per point per gradient evaluation — the projection is about twice as expensive per relaxation and a sixth as expensive per gradient, because it needs one relaxation rather than six.
The distance function itself is the expensive object and both methods share it. It is a squared-distance transform of the press’s voxel set, computed once and read by trilinear interpolation, and a press makes the cheap route a search is where it was built. The projector needs its gradient as well as its value, which is three central differences and so six more reads per step — the one place the projection asks for something the penalty does not, and it is a constant factor rather than a new structure.
One detail is load-bearing and was wrong first. The points have to be respaced along the path after every step, before they are projected. Without it the relaxation shortens its summed colour difference by sliding points together rather than by moving the curve, and the first version of this returned in-gamut routes half a per cent shorter than the unconstrained path — which is not something a constraint can do. A distance raised to a power has no length is why the summed difference is not invariant to where the points sit, and the respacing is what removes the freedom.
Where this stops
The free path is a relaxation too. Every price here is measured against the shortest path found without the constraint, which is itself a gradient descent and can fail to converge. The census re-relaxes it from the best constrained route before pricing anything, so a route shorter than free is read as the free relaxation’s failure rather than as a negative price — and on four gradients that re-relaxation moved the free path by a tenth to four tenths of a per cent.
The gamut is a voxel set at one cell. The nearest inside colour is nearest in a discretised gamut, and near a thin feature the discretisation decides which side a point lands on. A finer cell would move individual routes and is unlikely to move a median that is already at a hundredth of a per cent.
The press is one press. A coated CMYK set at a 320 per cent ink limit, with the gamut built from the site’s own print model. A different ink limit changes the shape of the concavities and a fifth ink changes their number — the fifth ink buys a corner measured what an extra colorant adds to the boundary — so the count of trapped starts is a property of this gamut. What is not is the mechanism, which is about a penalty and a concavity and would appear in any non-convex set.
And six starts is not a proof. Neither method is searched exhaustively; both are given the same six starting points, which is what makes the comparison fair and does not make either one’s best a global optimum. What the census supports is that the penalty’s spread is large and the projection’s is small — not that the projection has found the shortest in-gamut route.
Still open: whether a projection holds a soft constraint
Everything here is a hard constraint: a colour is printable or it is not, and the nearest printable colour is where a point goes. Real gamut mapping is not like that. A colour just outside a press’s gamut is often better rendered slightly outside and clipped later, or traded against a neighbour, and the decisions an intent is not a function of the colour describes are all soft.
The computation worth running is a projection onto a shrunk gamut — the printable set eroded by a stated margin — with the margin swept from nought to a few CIELAB units, and the route’s length and its distance from the free path recorded at each. A penalty has a natural way to express softness, by lowering its constant; a projection does not, and an erosion is the nearest thing.
The prediction is that the traps do not come back, because an eroded gamut is still a set and its nearest point is still unique where the original’s was. The interesting failure would be at a pinch narrow enough that erosion disconnects it: the nearest point then jumps from one side to the other as a route passes, and a projected path can be torn in exactly the way this essay found it was not. Whether a real press’s gamut has such a pinch at a usable margin is a measurement on the voxel set, not a question about routes — and it can be made before any gradient is drawn.
A method’s failures are not always the problem’s
The habit is about attributing a difficulty.
The earlier essay’s finding was stated as a fact about presses: “the press’s non-convexity turns the gamut’s price from a number into a search.” Non-convexity is real, it is what makes a concavity available to be gone round, and the sentence is not wrong so much as mis-assigned. What turned the price into a search was the interaction between a non-convex set and one way of holding a path inside it — and the other way, available in the same paragraph, has no search in it at all.
The move is to ask whether the difficulty survives a change of method before writing it down as a property of the subject. That is cheap when the alternative method is already named, which it was: the earlier essay proposed the projection in its own closing section and filed it as future work.
There is a second reading of the same episode that is more forgiving and just as useful. The penalised census was not wasted: its spread is what made the concavities visible, and a method that had never been trapped would have shown a flat row of dots and said nothing about the gamut’s shape. A method’s failures map the object even when they are the method’s own — they just have to be labelled as the method’s. The honest form of the earlier finding is that a penalised relaxation is sensitive to non-convexity, which is a fact about penalties that a press happens to demonstrate.
The failure mode is naming a numerical artefact after the object being computed. It reads as a finding, it is repeatable, and every subsequent essay inherits it — which is how “the press makes this hard” becomes a fact about presses rather than about a penalty term.
What this makes readable
Essays that name this one as a prerequisite.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the index of named objects makes visible.
- Neither gamut contains the other cielab · gamut · gamut mapping · process inks
- How wrong would the data have to be cielab · colour difference · convergence
- No basis is good at both cielab · optimisation · trade-off
- The exponent was never the argument cielab · optimisation · trade-off
- The straight piece under the cube root cielab · colour difference · convergence
- The triangle is a shadow cielab · gamut · gamut mapping
What links here
Every essay whose body links to this one.
The objects this essay names
Each one links to every other essay that touches it.
CensusCIELABColour differenceConstraintConvergenceGamutGamut mappingOptimisationProcess inksTrade-off