Loading commands, almost done…
The Peaucellier–Lipkin linkage (Wikipedia) was the first planar linkage to produce exact straight line motion from a rotary motion of a hand. To demonstrate how it works, we declaratively perform the following steps:
Running these commands does not show anything on the canvas.
r1 = \scalar 0.9theta = \scalar 0thetaRad = \deg2rad thetar2 = \scalar 2.6p0 = \point 0 0p1 = \point r1 0cosTheta = \cos thetaRadsinTheta = \sin thetaRadr1cosTheta = \mul r1 cosThetar1sinTheta = \mul r1 sinThetap2x = \add r1 r1cosThetap2y = \add 0 r1sinThetaNow we create the points and lines:
p2 = \point p2x p2yline01 = \line p0 p1This is the rotating hand:
line12 = \line p1 p2You can also:
to avoid any confusion about which line it is.
and
: r3 = \mul 1.2 r1
The fun part begins here: we create a circle of radius r3 centered at p2 and another circle of radius r2 centered at the origin.
c0 = \circle p2 r3c1 = \circle p0 r2... and draw a line joining their points of intersection:
intersection-points = \intersect-circles c0 c1Finally the is reflected across the line to create the final point:
pFinal = \reflect-point p2 line0Now as you rotate , you'll notice that traces a straight line!
If you update the value of theta, by , the canvas reacts to it immediately. You can also . Notice how the rotation of the hand is translated into a linear (vertical) motion of .
Run the \peaucellier-lipkin-linkage command in the geomatic editor and modify the variables to play with it.