
Demonstration of 2DOF Robotic Arm Simulator
Table of Contents
A simulation of a planar 2-degree-of-freedom robotic arm that computes and visualizes inverse kinematics in real-time. Users can click to set a target, and the arm dynamically moves to reach it while respecting joint limits and mechanical constraints.

Schematic of Two-Arm Linkage
When trying to control the motion of a robot with two arms, or linkages, there’s two methods. We can either give it angles and see where it ends up or tell it where we want it to end up and have it figure out the angles itself. These two approaches are known as forward kinematics and inverse kinematics, respectively.
Forward kinematics (FK) is the process of calculating the position of a robot’s end-effector (like the tip of a robotic arm) based on known joint angles. It answers the question: If I set each joint to a certain angle, where will the arm end up? This is the direct, deterministic mapping from joint space to Cartesian space.
Inverse kinematics (IK) is the reverse: figuring out what joint angles are needed to move the end-effector to a specific position. This is often more complex, since there may be multiple valid solutions or none at all if the target is out of reach.
While forward kinematics is useful for simulating and understanding how joint angles affect a robot’s position, inverse kinematics is what real-world robots actually need to perform tasks. When you want a robotic arm to pick up an object or weld a specific point, you don’t care about the joint angles; you care about the target position. IK allows the robot to calculate the exact joint angles required to reach that target.