kapy academy

Linkage synthesis and tools

18 min readUpdated Nov 2026

You have a motor that turns continuously and you want an arm to swing through 60°, with the outward and return strokes equally fast. A 40 mm rocker, a 20 mm crank, an 80 mm coupler and fixed pivots 87.2 mm apart do it, with a transmission angle that never drops below 57°. Those figures come from two lines and a pair of compasses, not from trial and error. Analyzing a linkage starts from the bars (The four-bar linkage). Synthesising one is the reverse: you start from the motion you want and work out the bars.

Three different jobs

Function generation. The output angle is a function of the input angle: θ_out = f(θ_in). Examples: an arm that swings through a set angle, driven by a motor that turns continuously; the needle of a gauge; a car's steering (Ackermann steering). Only the two angles matter; where the coupler goes is irrelevant.

Path generation. A point on the coupler has to follow a given curve, or at least pass through several points on it; the coupler's orientation is irrelevant. Examples: the tip of a leg (Walking-leg linkages) or a straight stretch (Approximate straight-line linkages).

Motion generation. The whole coupler has to pass through given poses, each with its own position and angle. A lid that lifts and moves aside, a fold-down screen, a gripper that closes its fingers while keeping them parallel (Robot grippers). Some textbooks call it rigid-body guidance.

The same four-bar, crank 25, coupler 60, rocker 50 and ground 60, in three front views while the crank makes one turn: on the left only the input angle θ2 and the output angle θ4, swinging between 79° and 144°, count; in the middle a point P of the coupler runs along its curve through four precision points; on the right the whole coupler goes through three required poses, place and angle
The same four-bar serves three different jobs: relating two angles, taking a point through given points, or taking a body through given poses with their orientation.

Telling them apart matters for two reasons. Each tool solves one or two of them, not all three. And the number of conditions you can impose changes with the job.

Those conditions are precision points: the linkage passes through them exactly and strays between them. Points are not free: each one uses up one of the few free parameters a four-bar has.

How many conditions a four-bar can take
Job Maximum What happens at the maximum
Motion generation 5 poses At most 4 valid points on the body (Burmester points): up to 6 different four-bars
Path generation 9 points Numerical solution only: 1442 distinct solutions, 4326 counting their cognates (Wampler, Morgan and Sommese, 1992)
Function generation 5 angle pairs 3 pairs solve as a linear system (Freudenstein); 4 and 5 need numerical methods

The practical upshot: two or three poses you solve by hand, in a sketch; four or more, or a path with many points, are work for software.

Two poses: the pole and the perpendicular bisectors

A point A on the body moves from A1 to A2. If you attach a bar to it, the fixed pivot at the other end has to be the same distance from A1 as from A2. The points that satisfy that form the perpendicular bisector of A1A2. Pick two points on the body, A and B, draw their two bisectors and put a fixed pivot on each: you have a four-bar that takes the body from one pose to the other. There are infinitely many solutions, because you choose A, B and where each pivot sits on its line.

The bisectors of the displacements of every point on the body (A1A2, B1B2…) pass through one point, the pole P12. A plain hinge at the pole takes the body from one pose to the other. That is the first check in any two-pose problem: if the pole lands where you can put an axle, you do not need a four-bar. You need one when it lands inside the part, in the middle of the opening or outside the housing.

If the body only translates, without rotating, the bisectors come out parallel and the pole goes to infinity. The natural solution is then a parallelogram: two equal, parallel bars. That is the parallel-finger gripper.

Three-pose synthesis: a plate with two moving pivots, A and B, in its three required poses, and the four-bar that carries it through all three; from the front, the bisectors of A1A2 and A2A3 meet at the fixed pivot A0, and those of B at B0
With two poses, each point's fixed pivot can go anywhere on its perpendicular bisector, and every bisector passes through the pole. With three, the pivot is the center of the circle through the point's three positions: the bisectors of A1A2 and A2A3 meet at A0, and those of B1B2 and B2B3 at B0. With those two pivots and links of 70 and 90, the plate goes exactly through poses 1, 2 and 3 (it turns 43° from the first to the third). It is the figure's example: a triple rocker, which swings rather than turns.

You spend that freedom on what matters for printing: fixed pivots inside the frame you actually have, short bars that do not cross, and a good transmission angle.

A very common two-pose case is the rocker that swings back and forth between two extremes, driven by a crank; the worked example below solves it.

Three poses: the circumcenter

With three poses, A's fixed pivot has to be the same distance from A1, A2 and A3. Only one point qualifies: the center of the circle through all three, where the bisectors of A1A2 and A2A3 cross. You no longer choose where the pivot goes; you choose where you place A and B on the body: two coordinates per point.

The circumcenter is very sensitive to where A sits. If A1, A2 and A3 are nearly in line, the circle through them is huge and the fixed pivot ends up tens of centimeters away. Move A a few millimeters and the pivot jumps. If you get an outsized bar, move A; do not accept the first solution.

Sometimes the frame pivots are what is fixed and you are looking for the points on the body. The same construction solves it if you look at the frame from the body (kinematic inversion). By hand, it is easier to fix the points on the body and try several combinations.

With four poses, the valid points on the body are no longer free: they lie on curves, the Burmester curves. With five there is a finite number of them. That is software territory.

Worked example: a rocker that swings 60°

The brief: a 30 rpm gearmotor, always turning the same way, has to swing a 40 mm arm between two extremes 60° apart, with the outward and return strokes equally fast (time ratio 1). It is the typical motion of an automaton or an oscillating fan (Automata, Choosing a motor).

Step 1: the rocker at its extremes. Put the rocker pivot, O4, at the origin. The two extreme positions of its moving pivot, B1 (on the left) and B2 (on the right), lie on the 40 mm radius circle, ±30° from vertical. The chord joining them is 2·R·sin(swing/2) = 2·40·sin 30° = 40 mm. Its midpoint is M.

Step 2: the crank. At each end of the rocker's travel, crank and coupler are in line: folded at one, extended at the other. These are the toggle positions. If both alignments fall on the same line, the crank turns exactly 180° from one to the other and the outward stroke takes as long as the return. That is why, with a time ratio of 1, the crank pivot O2 sits on line B1B2 extended. Put it on the left, on B1's side: the distance from O2 to B1 is coupler minus crank, and the distance to B2 is coupler plus crank. Their difference is the chord, so the crank is half the chord: 20 mm. The coupler is the distance from O2 to M, and that is free.

Synthesis of a 60° rocker with a time ratio of 1: in 3D and from the front, with the rocker's extremes B1 and B2, the extended chord through O2 and the crank's circle split into its two halves
With a time ratio of 1, the crank pivot sits on the extended chord and the crank is half the chord. A rocker of 40 swinging 60°: chord 40, crank 20, coupler 80 (O2 to M), ground 87.18. Folded, crank and coupler leave the rocker at B1; extended, at B2, and both alignments fall on the same line: the out and back strokes take 180° of crank each. A longer coupler raises the worst transmission angle, but never above 90° minus half the swing.

Step 3: the coupler, from the transmission angle. Here μ is the transmission angle, as in the animation, not a friction coefficient. The usual criterion: μ_min ≥ 40°, ideally 45 to 50°. Computed over the whole cycle, in 0.1° steps, with the chord fixed:

Worst transmission angle by coupler length (rocker 40, crank 20, swing 60°)
Coupler (O2M) 40 60 80 100 120 160
μ_min 48.6° 54.7° 57.0° 58.1° 58.6° 59.2°

As the coupler gets longer, μ_min tends to 90° − swing/2, here 60°. At 80 mm you are already within 3° of the limit without the linkage growing out of hand.

Result. Crank 20, coupler 80, rocker 40. O2 sits 80 mm to the left of O4 and 34.64 mm above it, so the ground link is √(80² + 34.64²) = 87.18 mm. Grashof: 20 + 87.18 = 107.2, less than 80 + 40 = 120; the shortest bar is the crank and it is adjacent to the ground, so it turns fully. Simulating the cycle gives a swing of 60.0°.

The 60° rocker, solved
Quantity Value
Required swing 60°
Chord B1B2 40.0 mm
Crank 20.0 mm
Coupler 80.0 mm
Rocker 40.0 mm
Ground link 87.18 mm
O2 relative to O4 80 mm horizontally (toward B1), 34.64 mm vertically
Grashof 107.2 < 120: crank-rocker
μ_min 57.0°
Swing checked 60.0°

The 90° − swing/2 limit. For a 90° swing the chord becomes 56.6 mm and the crank 28.3 mm. With an 80 mm coupler, μ_min = 41.4°; with 160 mm, 44.1°: it never reaches 45°, however long you make it. With a 100° swing you do not even reach 40°. The rule of thumb: with a time ratio of 1, a single four-bar cannot go much beyond 90–100° of swing with an acceptable transmission angle. Reduce the swing and amplify the output with a pair of gears (Compound gear trains) or a second stage of bars, a six-bar like those in Walking-leg linkages. If you want the return to be faster than the outward stroke, the construction changes: Quick-return mechanisms.

Step 4: from paper to part. The play in the four pivots adds up and the arm magnifies it at the tip: the arithmetic is in Clearances for moving parts. Print the bars flat on the bed, with the hole axes perpendicular to the bed, so the holes come out round (Layer orientation for mechanisms). For the pivots, choose between assembled pins (Assembled clevis pin joint) or joints printed in place (Print-in-place pins and hinges).

Function generation with the Freudenstein equation

If the output angle has to follow a law at more than two points, the Freudenstein equation turns the problem into algebra. With a the crank, b the coupler, c the rocker and d the ground link, and θ2 and θ4 the crank and rocker angles measured from the line from O2 to O4:

K1·cos θ4 − K2·cos θ2 + K3 = cos(θ2 − θ4)

with K1 = d/a, K2 = d/c and K3 = (a² − b² + c² + d²)/(2·a·c).

Each (θ2, θ4) pair you impose is a linear equation in K1, K2 and K3. Three pairs give a 3×3 system any spreadsheet will solve. Then you choose d, which sets the scale, get a = d/K1 and c = d/K2, and solve K3 for b.

Three things to know before you trust the result. The angles are absolute: your law says how far the output turns, but you have to choose the starting angles of input and output, and those two choices change the solution (they are what numerical methods exploit to reach 4 and 5 points). If K1 or K2 comes out negative, that bar points the opposite way. And if a² + c² + d² − 2·a·c·K3 comes out negative, no coupler exists: change the starting angles.

Where you put the three points matters. Space them evenly and the error grows toward the ends of the range. Chebyshev spacing distributes the error better:

x_j = (x_start + x_end)/2 − (x_end − x_start)/2 · cos((2j − 1)·π/(2n)), for j = 1…n

where n is the number of precision points (here, 3).

For three points over an input range of 0 to 60°: 4.0°, 30.0° and 56.0°.

The equation gives you lengths, not a working linkage: it does not guarantee the crank turns fully or that the linkage gets from one point to the next without changing branch. Always run the checks in the section "What to check in any solution", below.

Which software to use

Software analyzes and synthesises, but it only saves you time if you know which problem you are giving it and what to check in the answer. The geometry does not date; the tools do: check each one's website before you commit.

Linkage synthesis and analysis tools (November 2026)
Tool What it solves Platform Price What you get
MotionGen (Stony Brook University) Motion generation through poses with four-bars, up to six solutions; simulates planar N-bar linkages; AI-assisted path synthesis Browser (motiongen.io) with every feature; iOS and Android app, more limited See the website The lengths and the animation; exports part geometry for 3D printing and laser cutting
PMKS+ (WPI) Position, velocity and force analysis; three-pose synthesis; bars and sliders Browser, nothing to install Free and open source The linkage, as a link or a file
Linkage (David Rector) You draw and simulate; any joint can draw its path; sliders, gears and chains. Does not synthesise from a path Windows (check the current version); on a Mac, in a virtual machine Free Parts list with dimensions, image and video
GeoGebra Dynamic geometry: you build the bisectors and circumcenters yourself, animate with a slider and turn on a point's trace Browser Free The construction, to copy the dimensions from
KapyCAD Constrained sketch for the construction Browser Included The part you print

Choose by the problem, not by reputation:

  • To understand the construction or solve two or three poses: GeoGebra, or straight into a KapyCAD sketch.
  • For many poses or a path: MotionGen.
  • To check forces and transmission angle on a linkage you already have: PMKS+.
  • To explore by hand a linkage with gears and many bars, on Windows: Linkage.

To pick a path shape by eye, the Hrones and Nelson atlas (1951) still works: thousands of coupler curves, drawn and classified by proportions.

What comes out of these tools is a handful of dimensions: the four lengths, the position of the fixed pivots and that of the tracer point. Bring them into your CAD as parameters. Do not import a mesh: you lose the parametric model, and with it the chance to round a dimension and check again.

What to check in any solution

Grashof defect. Three-pose synthesis often returns a double rocker. It passes through your poses, but the input does not turn fully: a motor that always turns the same way cannot drive it. Check it with the Grashof condition (The four-bar linkage). If it fails, change A and B, or add a driving dyad in front: a crank-rocker whose rocker drives the input bar of the synthesised linkage (the whole thing is a six-bar). Its swing has to cover the input range between poses 1 and 3.

Branch defect. A four-bar has two configurations (branches) for the same input angle, open and crossed. If two of your poses fall on different branches, the real linkage cannot get from one to the other without coming apart. The lengths will not tell you: you see it by animating it.

Order defect. The linkage passes through the three poses, but in the order 1, 3, 2. With the input always turning the same way, it has to go from 1 to 2 and then to 3.

Transmission angle over the whole useful travel, not only at the imposed poses: μ_min ≥ 40°. In a crank-rocker you do not need to sweep the cycle: the worst μ is at one of the two poses where the crank lines up with the ground link (θ2 = 0° or 180°). A coupler and rocker in line lock the linkage; both alignments and what happens at each are set out in The four-bar linkage, and how to use the crank-and-coupler one in Toggle linkage.

Two workshop checks remain: collisions and the error between precision points. Two bars that cross in the same plane have to go on different layers, with a longer pin; a fixed pivot outside the frame cannot be mounted. Measure the error between points on the trace; do not assume it is small.

When it fails

Symptom, cause and fix
Symptom Cause Fix
Once assembled, it does not reach pose 3 Branch defect Choose other A and B and check by animating
It reaches the poses in a different order Order defect Other A and B, or reverse the input direction
The motor cannot drive it: the input only rocks Double rocker (Grashof defect) A driving dyad in front, or redo the synthesis
It sticks or needs a lot of torque over one stretch μ below 40° Longer coupler, less swing or a second stage
A bar comes out enormous or a fixed pivot lands outside the frame Nearly collinear poses in three-pose synthesis Move A or B. Only for a path problem, a cognate linkage (Roberts–Chebyshev theorem) traces the same curve with other fixed pivots; it is no use for motion generation, because it changes the coupler's orientation
In the software the tip is right; in the part, it is not Play in the four pivots, magnified by the arm Clearances for moving parts; bushings or steel pins
The swing is off by a few degrees Rounded lengths or holes printing small Redo the calculation with the rounded dimensions and calibrate the holes (Why holes print small)
Two bars collide at one point in the cycle They are on the same layer Separate them in height and lengthen the pins

How to test it

Before printing, animate the whole cycle with the rounded dimensions in the software. Watch the output angle, the trace and any collisions. Measure μ at the two poses where the crank lines up with the ground link.

Make the first prototype cheap: flat 3 mm PLA bars, with holes for M3 screws or steel pins, on a board carrying the fixed pivots. Changing a bar takes minutes. Measure the swing with a protractor or a photo taken from directly above. If it is a pose problem, draw the poses on a sheet of paper under the board and check that the point passes through them.

Once the prototype does what it should, print the final part and put its pivots through the load and cycle test in Testing a mechanism before you trust it. How to tune clearances with small parts is in Test coupons and Iterate and measure.

See also

Design it in KapyCAD

Sketch the mechanism with these dimensions. Each one stays a value you can change after the first test print.

Free plan, no card. Runs in your browser, nothing to install.

Open the editor

Still have a question?