← Robotics & Automation Studio
🦾

2-Link Robot Arm Kinematics Visualizer

Forward kinematics (angles → position) and inverse kinematics (position → angles)

When to use: Model a 2-link planar (SCARA-style) robot arm. In Forward mode, set joint angles and see where the end-effector lands. In Inverse mode, set a target point and see the joint angles needed to reach it — including the elbow-up / elbow-down solution choice every 2-link arm has.

Link Lengths
mm
mm
Joint Angles
40°
-60°
Result
End-effector X464.7 mm
End-effector Y107.3 mm
Reach from base477.0 mm

About the 2-Link Robot Arm Kinematics Visualizer

This tool visualizes forward and inverse kinematics for a 2-link planar robot arm — the same math that underlies SCARA robots and the shoulder/elbow joints of larger articulated arms projected into a plane. Forward kinematics answers 'given these joint angles, where is the end-effector?' Inverse kinematics answers the opposite, more difficult question: 'given a target point, what joint angles reach it?' — and shows why that question can have two valid answers.

Forward kinematics: angles to position

For a 2-link arm with link lengths L1 and L2 and joint angles θ1 (shoulder, measured from the X-axis) and θ2 (elbow, measured relative to link 1), the elbow position is (L1 cos θ1, L1 sin θ1), and the end-effector (wrist) position is the elbow position plus a second vector along link 2 at the cumulative angle θ1 + θ2: (L1 cos θ1 + L2 cos(θ1+θ2), L1 sin θ1 + L2 sin(θ1+θ2)). This is a direct, closed-form calculation — for any given set of joint angles there is exactly one end-effector position, computed by simply chaining rotation and translation down the kinematic chain. Real robots extend this same principle into 3D using homogeneous transformation matrices (4×4 matrices combining rotation and translation) chained through Denavit-Hartenberg parameters, one per joint, but the 2D two-link case captures the essential geometry.

Inverse kinematics: position to angles, and why there are two solutions

Given a target point (x, y), the distance from the base is r = √(x²+y²). Using the law of cosines on the triangle formed by the base, elbow, and target: cos θ2 = (r² − L1² − L2²) / (2 L1 L2). This gives θ2 up to a sign ambiguity — θ2 could be positive or negative, corresponding to the elbow bending one way ("elbow up") or the other ("elbow down") to reach the exact same target point. Once θ2 is chosen, θ1 follows from a single formula combining the target's angle from the base with an offset that accounts for the elbow angle. This two-solution ambiguity is fundamental to any 2-link (or higher-DOF) arm — a target within reach is generally reachable via more than one joint configuration, and a real robot controller must pick one (usually based on avoiding joint limits, singularities, or collisions) rather than leave it undefined.

Reachable workspace: the annulus

A 2-link arm cannot reach every point in the plane. The maximum reach is L1 + L2 (both links fully extended in a straight line) — outside that radius, no joint configuration reaches the target. There is also a minimum reach of |L1 − L2| (the links folded back on each other as much as geometry allows) for any target closer to the base than that inner radius, again no solution exists. Together these two bounds mean the true reachable workspace is an annulus (a ring shape) between radius |L1−L2| and L1+L2, not a full disk — shown as the two dashed reference circles in the visualizer. Note that if L1 = L2, the inner radius is zero, meaning the arm can reach all the way back to its own base.

How to use this visualizer

Set the two link lengths first — they define the arm's scale and reachable workspace. In Forward mode, drag the shoulder and elbow angle sliders and watch the end-effector position update live along with the arm pose in the diagram. In Inverse mode, enter a target X/Y coordinate and toggle between the elbow-up and elbow-down solutions to see both valid arm configurations that reach the same point — if the target falls outside the reachable annulus, the tool reports it as unreachable rather than returning a nonsensical angle.

Frequently asked questions

Why does inverse kinematics have two solutions but forward kinematics only has one?

Forward kinematics is a direct function — plug in two joint angles and there is exactly one resulting end-effector position, no ambiguity. Inverse kinematics inverts that function, and because the elbow can bend two different ways (positive or negative θ2) to reach the same distance from the base, the inverse is not a one-to-one function — it's one-to-two (or, for arms with more degrees of freedom or singular configurations, sometimes one-to-many or one-to-infinite). This is a general feature of inverse kinematics for any real robot, not a quirk of the 2-link case — industrial robot controllers must resolve this ambiguity using additional criteria like joint limits or minimal motion from the current pose.

What happens exactly at the boundary of the reachable workspace?

At the outer boundary (r = L1 + L2), the arm is fully extended — both links form a straight line from base to target — and there is only one solution, since the elbow-up and elbow-down configurations coincide (θ2 = 0). The same happens at the inner boundary (r = |L1−L2|) if L1 ≠ L2 — the links are folded back on each other and again there is only one configuration, not two. This is a kinematic singularity: right at the boundary, small changes in target position can require large or undefined changes in joint angle, which is one of several reasons real robot motion planning avoids commanding paths that pass exactly through the edge of the workspace or through the origin.

How does this relate to a real SCARA or 6-axis articulated robot?

A SCARA robot's two main horizontal joints are literally this 2-link planar mechanism (with additional independent vertical and wrist-rotation axes stacked on top), so this visualizer is a direct, physically accurate model of a SCARA's XY positioning. A 6-axis articulated arm's shoulder and elbow joints solve an analogous 2-link problem within the plane defined by the base rotation and the target point, though the full 6-axis inverse kinematics problem also has to account for wrist orientation and generally involves more solution branches than the 2 shown here.

Why is inverse kinematics considered harder to compute than forward kinematics in general?

For simple mechanisms like this 2-link arm, both directions have closed-form (directly computable) solutions. But for robots with 6+ degrees of freedom, or non-standard joint arrangements, inverse kinematics frequently has no closed-form solution at all, and controllers instead use iterative numerical methods (like Jacobian-based or cyclic coordinate descent solvers) that converge toward a solution rather than compute it directly — and still have to handle the same fundamental multiple-solution and unreachable-target issues shown here, just with more solution branches and more complex singularities to manage.

Why does the tool show target as unreachable even though the coordinates look small?

Reachability depends on distance from the base relative to both link lengths, not on the coordinate values looking "small" in an absolute sense — a target very close to the base (small r) is unreachable if it falls inside the inner radius |L1−L2|, exactly as a target too far away is unreachable if it exceeds L1+L2. Try adjusting L1 and L2 to see the reachable annulus grow or shrink, or move the target radially outward/inward while watching the reachability indicator.

🎓

Try our Robotics & Automation Studio

More calculators, simulators, and guides for this discipline.

Related tools & guides

Cobot Safety-Distance CalculatorWhich Robot Type Should You Use?Industrial Robots: Types, Kinematics, and How Robotic Arms MoveMotor Torque Sizing Calculator