I have tried thinning but the results are not accurate. I will code the algorithm in Vb.Net.
ideally what you want is the medial axis, but there are no builtin tools to do this (yet). However, you can approximate the location using a Minimum Area Bounding Rectangle (MABR) which will give you the axis diameters and you can derive the corner points and average them in the long axis direction... a bit of work, but your other option is to find an existing implementation of the medial axis
addendum, a quick approximation would be to intersect the MABR with the polygon returning points...there will probably be at most 4 intersecting points and you can select those that best represent the axis
Hi Dan,
Thanks very much for your reply and suggestions. I will attempt a routine
to simulate the medial axis using the bounding rectangle which sounds like
the best approach. So far I can find points close to the "ends" of the
polygon but not the best points.
John
If you could show some sample shapes it might help, since S and C shaped figures and other self-enclosing ones will obviously require a medial axis (also look up 'skeleton') approach