Sketch · 2026-07-08
Inverse kinematics, by FABRIK.
A jointed arm anchored at the bottom, reaching for the cursor. The hard question is not where the tip goes. It is what angle every joint in between has to hold so that the tip lands there without stretching any segment. FABRIK answers it without a single sine or cosine.
The problem
Forward kinematics is easy. Give me every joint angle and I hand back the position of the tip by walking the chain and adding vectors. Inverse kinematics runs the other way: given a target for the tip, find the angles that put it there. For a chain with more than two joints there is no closed form. Any target the arm can reach has infinitely many valid poses.
The trick
FABRIK, which stands for Forward And Backward Reaching Inverse Kinematics, does not solve for angles. It works entirely with positions and lengths. Backward pass: set the tip to the target, then walk back along the chain, snapping each joint onto the line from its successor at exactly the segment length. Now the tip is on target, but the root has drifted away from where it belongs.
Forward pass: put the root back where it was, then walk forward, snapping each joint onto the line from its predecessor at the segment length. Now the root is fixed and the tip has drifted back off target. Repeat. The tip and the root chase each other, and the chain converges on a valid pose in a handful of sweeps.
Why it works
Each snap moves one joint onto a circle of the correct radius around a fixed neighbour. That step reduces the length error at the edge it touches to zero and never makes any other length error worse. The tip-to-target distance shrinks monotonically until the chain is either taut on target or fully extended in the target's direction. Aristidou and Lasenby proved this in 2011.
The whole loop is one normalisation and one interpolation per joint. No matrices, no atan2, no Jacobian. On a twelve-segment chain a browser can run hundreds of full solves per frame and never notice.
What to try
Drag the pointer far away. The tip error jumps to whatever the arm cannot cover and the chain locks straight. Drag close and the arm curls around itself, favouring whichever pose is closest to the previous frame. Unpin the root and it slides toward the target like a free rope. Raise N and the arm becomes a tentacle.
Sources
Aristidou, A. and Lasenby, J., FABRIK: A Fast, Iterative Solver for the Inverse Kinematics Problem, Graphical Models 73 (2011), 243-260. Buss, S. R., Introduction to Inverse Kinematics with Jacobian Transpose, Pseudoinverse and Damped Least Squares Methods, IEEE Journal of Robotics and Automation (2009), unpublished technical report.