ns-ui / scroll-caliper

FIELD MANUAL — VERNIER MEASUREMENT

01

The measuring principle

A vernier caliper does not measure distance so much as it brackets it: two ground blades close on the workpiece until the gap between them is the dimension. The instrument in the margin does the same to this article — the upper jaw rides the active section's leading edge, the lower jaw its trailing edge, and the opening between them is the section's visible extent in pixels.

Scroll slowly and the blades track almost imperceptibly. Flick the wheel and they lag by design: the jaws chase their targets through a near-critically damped spring, the small hesitation that separates an instrument from a cursor.

02

Reading the vernier

The main beam carries a fixed scale — minor graduations every two pixels, majors every eight, a long index line every forty. Against it slides the vernier subscale on the lower jaw, its pitch deliberately mismatched so that exactly one pair of lines coincides at any opening. That coincidence is the fractional digit a plain ruler cannot give you.

Here the coincidence is done for you: the readout chip resolves the jaw opening to a tenth of a pixel and the sweep percentage of the section under measurement. Watch it when you stop scrolling — the needle overshoots and settles with a wobble, a softer spring than the jaws ride.

03

Velocity and blur

Move fast enough and any engraved scale smears. The tick layer is duplicated, offset along the scroll direction, and blurred in proportion to smoothed scroll velocity — then removed entirely at rest so the graduations stay razor-crisp for reading.

// motion blur, per frame
opacity = clamp(|v| / 3000, 0, 0.6)
length  = clamp(|v| /  200, 0, 10)  // px
offset  = sign(v) * length

// settle gate — loop sleeps when
idle    = now - lastScroll > 150ms
settled = |x - target| < 0.05 && |v| < 0.05

04

Care and calibration

A caliper is only as honest as its zero. Close the jaws on nothing and the readout must say nothing: scroll to a section boundary and the blades meet the edges exactly, spring lag bleeding off within a few hundred milliseconds. Keep the beam clean — no decorative ink lives on the scale, and the single accent marker is reserved for the value being read.

Store the instrument closed. When the article stops moving, the loop stops running; an idle caliper spends no frames at all.

END OF MANUAL — the jaws should now be closed on section 04

scroll the article, or jump between sections — stop to catch the needle wobble