loading...
Radii |OP| and |OQ| vs crank angle (cm); green = k (they cross where the rhombus is flat)
Press "Run tolerance experiment".
running...
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.
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.