Joint indices of the chain: the upper joint, the one that bends, and the end that reaches target.
final int root, mid, tip;