Coordinate Transform Lab Two rulers — one nailed to the table, one nailed to the frame. Slide rotation and translation, and watch the same mark get two different addresses. This is the transform every vision system does thousands of times per run.

Top view (drag the purple mark)

Gray axes = world ruler, bolted to the machine frame; the camera reads only this ruler. Blue axes = table ruler, bolted to the table; it rotates and shifts with the table. The purple dot is a register mark printed on the sheet — its blue address (p, q) never changes; its gray address (x, y) changes with every table move.

1 · Move the table

On a real press the rotation comes from unequal Y1/Y2 travel — θ = arctan((y₂ − y₁) ÷ 700). Here you drive θ directly so you can feel each ingredient on its own.

2 · The transform, with your live numbers

3 · And back again (what the controller actually needs)

The camera only ever reads the gray ruler. To compare "where the mark is" with "where it was taught", the machine must invert the transform — undo the translation first, then undo the rotation (order matters):

4 · Where pixels enter the story

A camera does not read millimeters — it reads pixels. Between the two sits one scale factor s (pixels per millimeter), which is exactly what calibration must discover. Change the stored scale below and watch the machine's belief drift away from the truth:
What to notice: the camera honestly reports pixels (line 1 never lies). Everything after that is the stored scale's opinion. When stored = true, the mm reading is exact; when they differ, the machine computes a wrong displacement with total confidence — and every downstream correction inherits the error. That is why calibration happens before alignment, not after.