Prescribing motion
Every mechanism so far on this site produces the motion its geometry permits — a four-bar’s output is whatever four lengths make it. A four-bar’s output is whatever four lengths make it; wanting a different output means finding different lengths, and there may not be any.
A cam inverts that. State the wanted motion as a function of shaft angle, and the profile that produces it can be constructed directly. The displacement is now free.
Constructing the profile
The construction is an inversion in the kinematic sense: instead of turning the cam under a fixed follower, hold the cam still and walk the follower around it.
At cam angle θ the follower is displaced by , so its centre sits at radius in the direction θ. Plotting that for every θ gives the pitch curve.
The pitch curve is where the roller’s centre goes, not where the cam’s surface is. The surface is the pitch curve offset inward by the roller radius along its own normal — which is why a roller too large for the pitch curve’s local curvature produces a profile that cuts into itself and cannot be manufactured.
The pressure angle
The pressure angle is between the follower’s direction of travel and the normal to the cam surface at contact. It is the cam equivalent of a linkage’s transmission angle, with the convention reversed: it is a maximum to stay below rather than a minimum to stay above, and the usual limit is 30°.
Above that, a translating follower tends to jam in its guide instead of sliding — the side force on the follower stem exceeds what the guide can take without binding.
There is essentially one knob, and it is the base radius. That is a genuinely useful thing to know: it means “make the cam bigger” is the first answer to almost every cam problem, and it explains why cams are so often much larger than the lift alone would suggest.
The trade is size, mass and surface speed. A bigger cam has more rotating inertia and its surface moves faster past the follower, which matters for wear.
What a follower is, and what it costs
The cam is half the mechanism. The follower is the other half, and its type changes the geometry of everything above.
A knife-edge follower is the textbook simplification: a point touching the profile. It makes the pitch curve and the cut surface the same object, which is convenient, and it concentrates the entire contact force at a point, which is why essentially nobody builds one.
A roller follower is the usual answer. The roller rotates, so it rolls rather than slides, and the contact stress is spread over a finite patch. The cost is the offset construction above, and a constraint that the roller radius must be smaller than the smallest concave curvature of the pitch curve — otherwise the offset profile self-intersects and the shape cannot be cut.
A flat-faced follower removes the pressure angle entirely: the contact normal is always perpendicular to the face, so there is no side force to jam the guide. That is a substantial advantage and it is paid for with a different constraint — the profile must be convex everywhere, or the flat face bridges a concavity and never touches the bottom of it.
Each of the three trades a geometric convenience against a geometric restriction, and none of them is about strength.
What the derivatives are differentiated from
The acceleration curves on this site are central differences taken on the displacement the programme actually produces, not evaluations of a formula.
That choice has a consequence worth stating: the acceleration in a figure is the acceleration of the profile in the same figure, so the two cannot drift apart. If the profile generator had a mistake, the acceleration plot would show it.
It also introduces a parameter, the differencing step, and a step chosen by eye is how people end up differentiating noise. A central difference has an error that falls as the square of the step until round-off takes over and it rises as the inverse square, so the site checks that halving the step improves the answer at every step size used — measured, the error falls from 3.7 × 10⁻⁵ to 9.1 × 10⁻⁸ as the step goes from 0.4° to 0.02°, quartering with each halving, which is the second-order convergence the method should have.
Where a closed form exists it is the second, independent route: the peak acceleration of each motion law is known analytically, and the measured and computed values agree to eight digits.
The programme must return
A cam turns continuously, so its displacement is periodic. A programme whose rises do not cancel its returns describes a follower that teleports once per revolution.
That is obvious stated plainly and easy to violate in code. The first version of this site’s cam library had no such check and its test programmes were rise-plus-dwell. Every acceleration measurement came back at 5.0 × 10⁴ per degree², identical for all four motion laws — because what was being measured was the step at the seam rather than anything about the law. Four assertions failed at once and all four were reporting the same artefact.
The library now refuses a programme that does not close.
What the choice costs
Specifying the displacement freely means the velocity, acceleration and jerk are consequences rather than choices, and they are where the difficulty lives.
A rise that starts abruptly has an infinite acceleration at its start. A rise that meets a dwell with acceleration still non-zero has an infinite jerk there. Neither shows up in a plot of displacement, which is why cam design is done on the derivative curves and why the ranking of motion laws is the reverse of what the displacement plots suggest.
What is not modelled
Everything here is the geometry of an ideal roller on an ideal profile.
There is no follower mass, so no inertia force and no question of whether the follower stays in contact — which in a real high-speed cam is the dominant concern, answered by a spring strong enough to keep the follower down or by a groove that captures it. There is no friction, no lubrication, no Hertzian contact stress, and no wear.
The accelerations computed here are the ones the profile demands. Whether the mechanism can supply them is a dynamics question, and it is the question that decides whether a cam works.
Cam or linkage
The two ways of producing a motion are worth comparing directly, because the choice is real and the trade is not the obvious one.
A linkage is made of pinned bars. It is cheap, it tolerates dirt and wear, its joints are easy to lubricate, and it can be built to close tolerances without special machinery. What it cannot do is produce an arbitrary motion: the output is whatever the geometry gives, and getting a wanted output means searching for lengths that produce it — a search that may fail.
A cam produces exactly the motion specified. What it costs is a surface that must be cut accurately, a follower that must be held in contact, a contact patch that wears, and a pressure angle to manage.
The historical pattern is that mechanisms moved from linkages to cams as manufacturing improved, because a cam’s difficulties are all manufacturing difficulties and a linkage’s are all design difficulties. The same logic that made Watt use a linkage rather than a slide in 1784 runs in reverse once accurate surfaces become cheap.
Why the cut profile is not the pitch curve
A distinction that causes real errors in practice, and which the figures here keep separate on purpose.
The pitch curve is the path of the follower roller’s centre. It is what the motion programme specifies directly: at each cam angle, the roller centre must be at the radius the displacement function gives. The pitch curve is the design.
The cut profile is the surface the cutter leaves — the pitch curve offset inward by the roller radius, along the local normal. That is what the machine tool follows and what the cam physically is.
Offsetting a curve is not a benign operation. If the pitch curve’s radius of curvature ever falls below the roller radius on a concave section, the offset curve self-intersects: the profile has a loop that no cutter can produce, and the cam undercuts. The result is a cam that does not follow its programme in that region, and the departure is not small.
That gives a hard design constraint with no equivalent in the motion programme itself: the minimum radius of curvature of the pitch curve must exceed the roller radius, with margin. Since curvature depends on acceleration, and acceleration depends on the motion law, the choice of law and the choice of roller size are coupled — a cycloidal law with its higher peak acceleration tightens the curvature limit that a harmonic law would have left alone.
Reducing the roller radius relieves it and raises the contact stress, since a smaller roller concentrates the same load on a smaller patch. Enlarging the base circle relieves both, and makes the cam bigger and heavier. There is no free direction, which is why cam design is iterative in a way that linkage design mostly is not.
Kinematically closed, and why cams so often are
A cam pushes the follower out. Something has to bring it back, and how that is arranged determines what the cam can do.
Force closure — a spring — is the common arrangement. It is simple, and it fails at speed: the spring has to supply the follower’s deceleration during the negative-acceleration part of the rise, and if the required force exceeds what the spring can give, the follower leaves the cam. That is follower float, and the reunion is an impact. Valve float in an engine is exactly this, and the speed at which it starts is set by the spring rate, the follower mass and the peak negative acceleration the motion law demands.
Form closure — a groove that captures the roller, or a conjugate pair of cams — removes the spring and the speed limit with it. The cost is that a groove must be wider than the roller by a working clearance, so the roller crosses the groove and strikes the far wall whenever the acceleration changes sign. A conjugate pair avoids the crossover and needs two accurately related cam surfaces.
So the closure choice is a direct trade between a speed limit and a manufacturing cost, and it is settled by the same number the motion law is chosen by: peak negative acceleration. That is the quantity that decides whether a spring can hold contact, and it is the quantity the comparison of the four laws is really about.
Desmodromic valve gear — two cams, one to open and one to close — is the form-closed answer in an engine, and its rarity says something about the cost: it removes the speed limit and adds a second cam surface, a second follower and an adjustment that has to be maintained.
What a cam is competing with
A cam is expensive: a machined profile, a follower, a return arrangement, and a shape that cannot be adjusted after it is cut. It is worth being clear about what buys that.
Against a linkage, the cam offers arbitrary motion. A four-bar produces the motion its four lengths produce, and the design problem is finding lengths whose motion is close enough to what is wanted. A cam produces exactly what is wanted, because the profile is derived from the specification rather than searched for. Where the requirement is a dwell, a specified acceleration profile, or an asymmetric rise and fall, a linkage can only approximate and the cam is exact.
Against a servo, the cam offers determinism and stiffness. A servo can produce any motion and change it in software, which is a decisive advantage in a machine that must handle different products. What it cannot easily do is guarantee the motion under load at high rate: the cam’s follower goes where the profile says because a steel surface is there, and a servo’s axis goes where the controller manages to put it. In high-speed packaging and printing the cam is still standard for exactly this reason.
Against a Geneva or ratchet, the cam offers control of the motion between positions rather than only of the positions. The Geneva’s acceleration profile is whatever the geometry gives, with a jerk discontinuity at entry that no care removes; an indexing cam has whatever profile was specified, including finite jerk.
So the cam sits where the motion is fixed, fast, loaded, and worth machining a part for. That is a narrower place than it once was and not a shrinking one, and the design question inside it is entirely which motion law to specify — because once the law is chosen, the profile follows from it without any further choices.
Where the cam’s exactness stops
A cam profile is derived from a motion programme, so the follower does what was specified — exactly, in the model. Three departures matter in practice, and they are worth naming because they are what separates a cam design from a cam.
Manufacturing. The profile is cut at finite resolution, and the surface left by a milling cutter is a series of scallops rather than the intended curve. Since acceleration is the second derivative of position, small profile errors become large acceleration errors: a departure of a few micrometres at a few-degree wavelength produces an acceleration ripple comparable with the design values. Grinding and fine-pitch cutting exist for this reason alone.
Follower compliance. The follower train has stiffness and mass, so it has a natural frequency, and the cam excites it. If the excitation contains energy near that frequency the follower does not track the profile at all — it rings. That is why the choice of motion law matters more at speed than the peak accelerations suggest: a law with a jerk discontinuity contains high-frequency energy that a smooth law does not, and the follower’s own dynamics decide whether it matters.
Contact deformation. Under load the roller and the cam flatten against each other, so the follower centre sits slightly closer than the geometry says, by an amount that varies with load through the cycle.
All three are dynamics, none of them is computed here, and each one is the reason a cam design that is exact on paper needs a prototype. The geometry is necessary and not sufficient, which is the standing limit of every figure on this site and worth restating on the subject where the promise of exactness is loudest.