MAT is a medial-axis transform code
designed for 2-D skeletonization of binary images,
written by Robert Ogniewicz and
MAT accepts a variety of different input formats, including polygonal
This seem to be a solidly built program, and should
be your first stop on seeking a routine for thinning.