Case study — methodology

De-tracing: recovering the design system inside an auto-traced logo

A client logo arrived as auto-traced vector soup: 92 wobbly segments, no symmetry, stroke widths wandering 30–37 units. Instead of redrawing it, I ran an analysis-by-synthesis loop — measure, fit closed-form, render, diff, repeat — with an AI vision model as the critic. Out came 14 primitives, 15 constants, four motion equations, and a drift certificate proving the residual is 1.5% and every unit of it intentional.

92→14

Segments → primitives

0.0000u

Mirror-symmetry deviation

3

Hypotheses falsified

1.5%

Final residual, all declared

The proof, first

01 — The artifact

This is the final deliverable of the verification pipeline: a symmetric-difference map of the original logo against the parametric rebuild, computed in-browser by SVG cross-masking. Blue is agreement. Green is what the rebuild added (a uniform 36-unit stroke reaching past the source's thin passages). Red is what it removed (hand-drawn excess at corners and letter feet). The colors are orthogonal RGB channels because the sets are disjoint — if any two classes overlapped, additive mixing would betray it as yellow. No yellow exists in this image; its absence is the correctness proof.

agreement · 27.5% added · 1.2% removed · 0.25% violation · must be absent
SCI logo — drift check (symmetric difference) + source archive g#legacy (defs) = original traced source, byte-verbatim, native 512 coords — the backup. g#rebuild (defs) = final parametric geometry, unmodified. Displayed output = symmetric difference: each layer masked by the other's inverse (mask geometry inlined for renderer compatibility), so agreement cancels and only drift renders, color-coded per diff convention: red = removed (legacy-only), green = added (rebuild-only), blue = common (intersection), via alpha-recolor filters on the display instances (archived layers untouched). Recover either logo with <use href="#legacy"/> or <use href="#rebuild"/>. Archived 2026-08-13.
sci-logo-drift-check.svg — self-contained: both source and rebuild are archived byte-pristine in its defs; the rendered output is only their difference.

Analysis by synthesis, run by hand and critic

02 — The loop

The method hypothesizes a parametric model, renders it, compares against the source raster, and lets the residual drive the next update. Three properties distinguish it from gradient-based vectorization (DiffVG-class methods): fits are closed-form, so the output is interpretable constants rather than Bézier soup; model selection happens inside the loop — a hypothesis can be rejected and replaced, not merely tuned; and the critic is perceptual, catching failures that pixel metrics structurally cannot.

┌──────────────┐ │ raster ref R*│◄─────────────┐ └──────┬───────┘ │ ▼ │ ┌──────────────┐ ┌───────┴───────┐ │ MEASURE │ │ CRITIC │ │ cross-secs, │ │ vision model +│ │ extents, sym │ │ human, in the │ └──────┬───────┘ │ deploy context│ ▼ └───────▲───────┘ ┌──────────────┐ │ │ FIT / SOLVE │ ┌───────┴───────┐ │ θ ← closed- │ │ DIFF │ │ form per │ │ overlay, XOR │ │ component │ │ L = 1 − IoU │ └──────┬───────┘ └───────▲───────┘ ▼ │ ┌──────────────┐ ┌───────┴───────┐ │ SYNTHESIZE │─────►│ RASTERIZE │ │ V = G(θ) │ │ R = Rast(V) │ └──────────────┘ └───────────────┘

Coordinate descent over components — walls, then lips, then bottom topology, then letters — each verified locally before the next. The loss:

L(θ) = |Rast(G(θ)) ⊕ R*| / |Rast(G(θ)) ∪ R*| ∖ E E = declared-intentional deviations

Fifteen constants were hiding in the wobble

03 — What measurement found

Cross-sections of the traced walls fit straight lines with slopes 0.5506 and 0.5510 — the designer meant 0.55. The midline sat at 255.3 on a 512 canvas — they meant 256. Perpendicular stroke thickness clustered at 32; letter arm lines landed on 370 / 427.5 / 485 with the S's lobes at radius 28.75 and the C's lobe at exactly twice that. The original had a design system; the tracing had buried it. The rebuild's entire geometry is those recovered constants plus tangency math — corner fillets solved exactly, symmetry by mirrored coordinates rather than by drawing.

fillet center: x_c = c − k(y_b − R) + R·√(1+k²) r_C = 2·r_S = 57.5

Three hypotheses died. That is the point.

04 — Falsifications

Gradient methods tune a hypothesis; they cannot reject one. This loop did, three times — each caught by measurement or by looking, each replacing a model class, not a parameter:

Falsified 01 · bottom topology

Modeled: one continuous bottom stroke. Measured: the source's bottom edge terminates into the letters — the left piece becomes the S, the right piece rises as the I, and the gap around the C cuts through to white. The rebuild's topology was restructured, not re-tuned.

Falsified 02 · the lip "curl"

Modeled: an arc with a descending tail. Row-profile measurement showed the lip occupies exactly one stroke-width vertically — it is a horizontal bar with a round cap; the "curl" was the cap's curvature. The model class changed from arc to segment.

Falsified 03 · containment proof

A clip-path "proof" checked the arc midspan and missed that its own sharp corners leaked 42 units past the stroke. The render caught it; the corrected clip follows the fillet arcs, and the re-proof samples 3,000 boundary points instead of arguing about them.

The failure catalog is the finding

05 — What the numbers missed

Three defects passed every numerical assertion and fell only to a vision check in the real rendering context: a WebKit thumbnail bug that dropped an element cairosvg rendered fine; blind probe points that sampled gaps in the geometry and reported success; and a CSS-class refactor that was leaner and degraded catastrophically in CSS-less rasterizers. The generalizable result: loops with derivable ground truth close themselves; perceptual-quality loops need a vision oracle — and knowing where that boundary sits is worth more than pretending it isn't there.

That boundary is directly load-bearing for production document-AI: OCR training loops can self-evaluate (render → rasterize → recognize → compare gives free ground truth), while layout fidelity, rendering QA, and "does this extraction look right" sit on the oracle side. The same architecture I run for clients — automated metrics for what is derivable, model-vision review for what is perceptual.

Motion and theming, same discipline

06 — Also recovered

The rebuilt mark animates: a seamless 4-second loop where bubbles detach from the liquid under constant-flux inflation (r ∝ t1/3), rise under Stokes drag toward a terminal velocity that equals the conveyor's handoff speed — the physics lands the animation constraint for free — and ring with a damped quadrupole wobble. The liquid surface is a translating sine strip: a traveling wave is its own shape in uniform translation, so the loop seals by periodicity, not by careful keyframing. Theming collapsed to a single input: currentColor drives structure, liquid strata, and effects through masks that encode alpha, not color — one asset, every theme, verified by pixel-sampling through the actual CSS inheritance path.

v(t) = v_t·(1 − e^(−t/τ)), v_t = conveyor speed ε(t) = ε₀·e^(−λt)·cos(ωt)

The loop, replayed

07 — The film

Fifty seconds, stop-motion: model states are the parametric builder with components progressively unlocked; every chart datum is computed by rasterizing that frame and counting pixels. Yellow appears exactly three times — at the falsifications.

Ledger

08 — Results
Before (traced) vs after (parametric)
DimensionBefore (traced)After (parametric)
Geometry92 segments, 6-decimal soup14 primitives, 15 constants
Symmetryuncontrolled0.0000u mirror deviation, by construction
Stroke30–37u wandering36u uniform, letters included
Theminghardcoded fillsone input: currentColor
Motionnone4s sealed loop, 4 equations
Residual vs source—1.5%, fully enumerated & intentional

Method framing, honestly calibrated: this is human-in-the-loop iterative refinement with closed-form fits and an AI vision critic — one documented execution of a method, not a theory. The execution trace, assets, and per-frame data are available on request.

09 — Hire this rigor

The logo was the vehicle. The method is the product.

Measurement before modeling, closed-form over curve-fitting, verification as a deliverable, and a vision critic exactly where metrics go blind. If your document pipeline, extraction QA, or AI product needs that discipline — that's the conversation worth having.