**The Purpose: ** To find medial axis of a 2D shape, the set of points
where the ``fire lines'' meet.

**The Algorithm:**

- Step 1: Represent shape in binary form, initialize .

- Step 2: Repeat the following until no more change can be made:
,
for each , do , here is the four closest neighbors of .

- Step 3: The skeleton is the set of points given below:

The full 2D shape can be recostructed from the skeleton pixels as the union of all circules with center at and radius of .

Ruye Wang 2011-11-09