MAT is a medial-axis transform code
designed for 2-D skeletonization of binary images,
written by Robert Ogniewicz and
available from
http://hrl.harvard.edu/people/postdocs/rlo/rlo.dir/rlo-soft.html.
MAT accepts a variety of different input formats, including polygonal
representations.
This seem to be a solidly built program, and should
be your first stop on seeking a routine for thinning.