Four-Bar Linkage Simulator & Grashof Condition Calculator
Download the full-cycle coupler point trajectory P(x, y) and analytical kinematic tables computed from the current four-bar link lengths and assembly mode (Open / Crossed) as CSV or vector SVG files.
A planar four-bar linkage consists of four rigid links connected in a closed loop by four pin (revolute) joints, producing a single degree of freedom (1-DOF). The links are the fixed ground frame L1 (between stationary pivots O2 and O4), the input driver crank L2 (O2–A), the floating coupler link L3 (A–B), and the output rocker or follower link L4 (O4–B). Denoting the shortest link length as s, the longest link length as l, and the remaining two intermediate link lengths as p and q, the four bars can form a closed loop only when the longest link does not exceed the sum of the other three links (l ≤ s + p + q).
Grashof's Law determines whether at least one link can rotate through a full 360° revolution by comparing s + l with p + q. When s + l < p + q (a Class I Grashof linkage), at least one link can complete a full revolution, and the specific inversion depends on which link is the shortest: if the input link L2 is the shortest link (s = L2), L2 rotates a full 360° while the output link L4 oscillates back and forth as a Crank-Rocker; if the ground link L1 is the shortest link (s = L1), both L2 and L4 can rotate through 360° as a Double-Crank (Drag-Link) mechanism; if the coupler L3 is the shortest link (s = L3), both grounded links L2 and L4 oscillate as a Grashof Double-Rocker while the coupler revolves; and if the output link L4 is the shortest link (s = L4), the input link L2 oscillates while the output link L4 can rotate through 360° as a Rocker-Crank. When s + l = p + q, the mechanism is a Change-Point linkage in which all four links can become simultaneously collinear. When s + l > p + q (a Non-Grashof Class II linkage), no link can rotate through 360°, and every grounded link operates as a rocker (Triple-Rocker).
Position analysis places O2 at the origin (0, 0) and O4 at (L1, 0). For a given input angle θ2, joint A lies at (Ax, Ay) = (L2·cosθ2, L2·sinθ2), and the diagonal distance between O4 and A is d = √[(Ax − L1)² + Ay²]. Applying the Law of Cosines to triangle O4–A–B yields cosψ = (L4² + d² − L3²)/(2·L4·d). Relative to the diagonal angle β = atan2(Ay, Ax − L1), the two assembly branches are θ4 = β − ψ for the Open configuration and θ4 = β + ψ for the Crossed configuration. The interior transmission angle γ between the coupler L3 and output link L4 is obtained from cosγ = (L3² + L4² − d²)/(2·L3·L4). Differentiating the complex vector loop closure equation L2·e^(iθ2) + L3·e^(iθ3) = L1 + L4·e^(iθ4) with respect to time under constant input angular velocity ω2 (so α2 = 0) yields exact analytical expressions for the output angular velocity ω4 = ω2·L2·sin(θ2 − θ3)/[L4·sin(θ4 − θ3)] and output angular acceleration α4 = [L2·ω2²·cos(θ2 − θ3) + L3·ω3² − L4·ω4²·cos(θ4 − θ3)]/[L4·sin(θ4 − θ3)] without finite-difference approximation error.
Ground link L1, input crank L2, coupler link L3, and output link L4 represent pin-to-pin center distances in millimeters (mm). Every link length must be positive. The default values (L1 = 100 mm, L2 = 40 mm, L3 = 80 mm, L4 = 70 mm) define a classic Grashof crank-rocker linkage suitable for initial exploration. Input angular velocity ω is the constant counterclockwise rotation rate of link L2 in radians per second (rad/s), related to rotational speed n in rpm by ω = 2πn/60 (for example, 10 rad/s ≈ 95.49 rpm).
The coupler tracing point P is defined in the local coordinate frame attached to the coupler link A–B. Distance px (mm) is measured from joint A toward joint B along the line A–B, while py (mm) is the perpendicular offset measured +90° counterclockwise from vector A→B. Its global coordinates are Px = Ax + px·cosθ3 − py·sinθ3 and Py = Ay + px·sinθ3 + py·cosθ3. The Assembly Mode selector chooses between the Open and Crossed geometric closures of triangle O4–A–B.
① Enter the four link lengths (L1 through L4) in the left panel and check the Grashof classification badge at the top of the center panel to verify the mechanism category (Crank-Rocker, Double-Crank, Double-Rocker, Rocker-Crank, Change-Point, or Non-Grashof) and whether input crank L2 can complete a full 360° revolution.
② Set the input angular velocity ω, coupler point offsets (px, py), and assembly mode (Open or Crossed). Switching between Open and Crossed immediately reveals how the output rocker trajectory and coupler curve change for the same link lengths.
③ Drag the crank angle slider or press Start animation to inspect the linkage motion and the glowing coupler-point trail. For linkages where L2 cannot fully rotate, the animation automatically oscillates back and forth between the valid toggle limits, and moving the slider into a non-assemblable angle displays the exact valid angular intervals instead of NaN.
④ Review the output link angle θ4, current/minimum/maximum transmission angle γ, and analytical angular velocities and accelerations in the right panel and full-cycle chart, then export the coupler curve data as CSV or vector SVG if needed.
Consider the default parameters: L1 = 100 mm, L2 = 40 mm, L3 = 80 mm, L4 = 70 mm, input angular velocity ω2 = 10 rad/s, crank angle θ2 = 60°, coupler tracing point px = 40 mm, py = 20 mm, and Open assembly mode. Sorting the link lengths gives s = 40 mm (L2), l = 100 mm (L1), p = 70 mm, and q = 80 mm, so s + l = 140.0 mm < p + q = 150.0 mm. Because the shortest link is the input crank L2, the mechanism is a Grashof Crank-Rocker and L2 is capable of full 360° rotation.
At θ2 = 60°, joint A is located at Ax = 40·cos60° = 20.00 mm and Ay = 40·sin60° = 34.64 mm (20√3 mm). The distance from ground pivot O4(100, 0) to A is d = √[(20 − 100)² + (20√3)²] = √(6400 + 1200) = √7600 ≈ 87.18 mm, and the angle of vector O4→A is β = atan2(34.6410, −80) = 156.59°. From the Law of Cosines on triangle O4–A–B, cosψ = (70² + 7600 − 80²)/(2·70·√7600) = 6100/(140√7600) ≈ 0.499801, giving ψ = 60.01°. In the Open configuration, the output link angle is θ4 = β − ψ = 156.5868° − 60.0133° = 96.57°. Joint B is therefore at Bx = 100 + 70·cos96.5734° = 91.99 mm, By = 70·sin96.5734° = 69.54 mm, and the coupler angle is θ3 = atan2(69.5398 − 34.6410, 91.9866 − 20) = 25.86°.
At θ2 = 60°, the interior transmission angle is cosγ = (80² + 70² − 7600)/(2·80·70) = 3700/11200 ≈ 0.330357, or γ = 70.71° (matching θ4 − θ3 = 96.57° − 25.86° = 70.71°). Over a complete revolution, the minimum transmission angle occurs at θ2 = 0° (d_min = 60 mm) where cosγ_min = (6400 + 4900 − 3600)/11200 = 11/16 = 0.6875, giving γ_min = 46.57°, and the maximum transmission angle occurs at θ2 = 180° (d_max = 140 mm) where cosγ_max = (6400 + 4900 − 19600)/11200 = −83/112 ≈ −0.741071, giving γ_max = 137.82°. The coupler point P is at Px = 20 + 40·cos25.8639° − 20·sin25.8639° = 47.27 mm and Py = 34.6410 + 40·sin25.8639° + 20·cos25.8639° = 70.09 mm. Evaluating the analytical velocity and acceleration equations at ω2 = 10 rad/s gives coupler angular velocity ω3 = −3.16 rad/s, output angular velocity ω4 = 3.40 rad/s, coupler angular acceleration α3 = 35.33 rad/s², output angular acceleration α4 = 58.14 rad/s², and coupler point linear speed |v_P| = 260.73 mm/s.
All calculations assume ideal rigid links that do not bend or stretch under load, frictionless pin joints with zero radial clearance, and a constant input angular velocity ω (zero input angular acceleration α2 = 0). In physical machinery, link mass, rotational inertia, joint clearance, and motor torque-speed droop cause speed fluctuations and dynamic bearing loads that require separate kinetic and structural analysis.
Furthermore, the Open and Crossed assembly modes represent distinct geometric branches; a physical linkage cannot jump between Open and Crossed configurations during operation unless it passes through a collinear change-point or toggle position. When the transmission angle γ reaches 0° or 180° at a toggle or change-point position, sin(θ4 − θ3) in the denominator becomes zero and the Jacobian becomes singular, meaning instantaneous motion is indeterminate and the general velocity and acceleration formulas cannot be directly applied (while rates typically grow large near ordinary toggle dead-centers, continuous branches such as a parallelogram linkage at θ2 = 180° can still possess finite limits). Because real mechanisms experience high side forces or mechanical locking near toggle positions, practical linkage designs generally keep the acute transmission angle above 40° (that is, 40° ≤ γ ≤ 140°) across the working cycle.
Q1. Why can't input crank L2 rotate a full 360° even when the Grashof condition (s + l ≤ p + q) is satisfied?
Grashof's condition guarantees that at least one link—specifically the shortest link s—can revolve through 360° relative to its adjacent links, not that the driven input link L2 always rotates fully. For the input crank L2 to rotate 360° relative to the ground frame, the shortest link s must be either the ground link L1 (Double-Crank) or the input crank L2 itself (Crank-Rocker). If the coupler L3 is the shortest link, both grounded links oscillate as a Double-Rocker; if the output link L4 is the shortest link, the mechanism is a Rocker-Crank where the output link L4 can rotate through 360° while the input link L2 oscillates between toggle limits.
Q2. What is a good design range for the transmission angle γ?
The transmission angle γ measures the angle between the coupler link L3 and the output link L4 at joint B. Force transmission into output torque is optimal when γ = 90°. In general mechanical design, keeping γ between 40° and 140° (within ±50° of 90°, equivalent to a minimum acute transmission angle of 40°) is recommended to prevent excessive bearing side loads and jamming.
Q3. What is the difference between the Open and Crossed assembly modes?
For any given positions of ground pivot O4 and crank pin A, circles of radius L3 (centered at A) and radius L4 (centered at O4) intersect at two symmetric points B on opposite sides of the diagonal line O4–A. The Open configuration is the branch where the links do not cross the diagonal/ground line in standard layout, whereas the Crossed configuration reflects joint B across line O4–A so that the links cross each other.