I have a polygon and want to draw the centerline (i'm not sure if it is really the centerline, correct me if this is the wrong term...). I approximated this for an example drawing. I have the black polygon and want as result the red line. Is there any workflow in inkscape to do this easily?
-
1I have never seen morphology operators for vector graphics. Does not mean they do not exsist. Morphology for a facetted object like you have here is not terribly hard to do but for a general solution i have no idea. Anyway this is called skeleton transform. Are we talking of shapes that have angled corners?– joojaaFeb 26, 2016 at 21:18
2 Answers
I have found out that this is operation is called:
And many algorithms for this have been proposed. None of the current graphics design applications implement this function but it should not be too hard to do so if one needs to.
The best I can think of, is using offsets:
- Select your polygon.
- Path → dynamic offset (Ctrl + J).
- Move the handle and see what happens.
If all “arms” of your object have the same width, there is one handle position which will give you what you want. Otherwise, each arm will be perfectly reduced at different handle positions. In this case, you can make one offset object for each case and combine them by hand (rather tedious, I know, but better than nothing).