loading...
Press "Run tolerance experiment".
running...
How to use
A plan view of the same seven-bar cell. Gold P is the crank pin, blue Q is the pen, and Q is always the inverse of P in the green circle of radius k: |OP|·|OQ| = L² - l². The white/gold/blue lines are the proof: M is the midpoint of AB, so |OP||OQ| = OM² - PM². Choose a driver: the crank (P on a circle through O, Q on a line), a straight rail (P on a line, Q on a circle through O) or free hand (drag the gold ring and watch the inverse curve appear). The phase plane shows (|OP|, |OQ|) always on the hyperbola |OP||OQ| = k². Space pauses, R resets.
Background, bars, hubs and straightedge are Blender (Cycles) renders; the maths is the shared module assets/core.js.
The science
The mechanism. Seven rigid bars. Two long links OA and OB (length L) turn about the fixed pivot O. Their free ends A and B are the side vertices of a rhombus A-P-B-Q of side l. A crank CP of length d turns about a second fixed pivot C placed exactly d from O, and is pinned to rhombus vertex P. Because OA = OB and the four rhombus sides are equal, O, P and Q always lie on one line, the symmetry axis.
Inversion. Let M be the midpoint of AB (and of PQ). In the right triangles OMA and PMA: OM² + MA² = L² and PM² + MA² = l². Then
|OP|·|OQ| = (OM - PM)(OM + PM) = OM² - PM² = L² - l² = k²
So Q is the image of P under inversion in the circle of radius k about O: Q = k²P/|P|². The bars do the arithmetic.
Why the line is straight. The crank forces P onto the circle of radius d about C, which passes through O. With P = (d + d cos a, d sin a), |P|² = 2d²(1 + cos a), so
Q_x = k²/(2d) (constant), Q_y = (k²/2d)·tan(a/2)
An inversion turns a circle through its centre into a straight line, so the pen draws an exact line, perpendicular to OC, at distance k²/(2d) from O.
Crank error. If |CP| = c is not exactly |OC| = d (error δ = c - d), the circle no longer passes through O and its image is a circle of radius
R = k²c / |d² - c²| ≈ k²/(2|δ|)
so a millimetre of error bends the line into an arc of metres. Over a stroke of length s the sagitta is s²/(8R), i.e. about δ·s²/(4k²): the pen error is the crank error multiplied by an "error gain" s²/(4k²) (about 2.6 for the default board).
Statics (virtual work). With friction-free joints, power in equals power out: crank torque τ times crank rate equals pen force F times pen speed, so τ = F·|dQ/da|. For a zero crank error |dQ/da| = (k²/4d)·sec²(a/2): the same pen drag needs more torque toward the ends of the stroke, where the linkage is nearly stretched.
Limits. The rhombus can only open while L - l ≤ |OP| ≤ L + l; the crank swing slider is a fraction of that range. When |OP| = k the rhombus is flat (P = Q); the ideal model passes straight through it, a real linkage with joint clearance can jam there. If the crank circle never comes closer to O than L - l (large negative error) the crank can turn fully and Q traces a closed circle.
History (typical values, please verify). The linkage was published by Charles-Nicolas Peaucellier in 1864 and independently found by Yom Tov Lipman Lipkin; it was the first exact solution to converting rotary motion into straight-line motion with pin joints. Watt's linkage, earlier, is only approximately straight.
Rail and free-hand drivers (2D page). If P is forced onto a straight line x = h (a rail) instead of a circle, the image is a circle through O: centre (k²/2h, 0), radius k²/(2h), because inversion maps a line not through O to a circle through O. In free-hand mode you draw any curve with P and Q draws its inverse; inversion is conformal (it preserves angles between curves) and an involution (inverting twice returns P).
Extra checks on this page. inv(inv(P)) = P over 300 random points; the solver-based Q of a rail-driven P fits a circle of radius k²/(2h) that passes through O; the pen speed from frame-to-frame differences is compared with the analytic |dQ/da|·rate in the readout.
Simplifications. Rigid, massless bars; zero joint clearance; the bars sit at different heights in the 3D model but the kinematics is planar; the crank angle is prescribed (kinematic drive, no inertia); the torque comes from virtual work, not from simulating friction. Lengths are in centimetres (the code uses 10 cm units). The ink is drawn for the first cycle after any change only.
Independent checks on this page. (1) a separate Newton-Raphson solver of all six bar-length constraints (it never uses the inversion formula) must give the same Q; (2) the product |OP||OQ| from that solver equals L² - l²; (3) the traced line has zero deviation, or the fitted circle has the radius R above; (4) 400 random positions of P in the allowed annulus (Monte Carlo) all satisfy |OP||OQ| = k²; (5) the analytic torque factor |dQ/da| equals a finite difference of the solver's Q; (6) a tolerance experiment compares the measured sagitta with the circle formula. Near |OP| = k the six constraints are singular (a second root with P = Q), so the solver-based checks skip configurations with |PQ| < 1.5 cm.