# A simple robot arm (introduction)

One of the problems I worked on, recently, was from “Data Structures and Algorithms” (this is, of course, only one interpretation of the problem; it could be done differently).

It seemed, at first, quite simple:

Imagine a robot arm, attached to a base-plate, with 2 joints, each of which can rotate up to 90° up and down in the vertical plane. Determine the region that is reachable with the arm, and devise an algorithm for moving the arm to any reachable point in this region.

Here’s a quick sketch of the arm (as I imagine it to be). Both arm segments are the same length, L, and the first and second joints have corresponding angles A and B:

I’d recently been covering trigonometry, over at Khan Academy, so I figured it wouldn’t be hard to calculate the angles involved.

As it turns out, this type of problem is called inverse kinematics, and is a fairly well-researched area. In keeping with the spirit of things, I decided to ignore all that existing knowledge, and approach the problem as if it had never been solved before.

## Comments