## Average stroke from a fill

### Question

I would like to generate an average stroke from a given compound enclosed path, or fill, in Adobe Illustrator CC or Inkscape.

Sorry I don't know the mathematical function name to achieve this. I've come upon a couple bizarre hacks involving Photoshop, but it stands to reason there is a simpler way to achieve this within a vector program. Unfortunately Illustrator's path averaging collapses my example into a single point, likely because it has both horizontal and vertical aspects.

2015/02/20
1
7
2/20/2015 5:05:00 PM

Using Inkscape...

tl;dr Interpolate paths

As a generalized case, this is a very interesting question, for which I have a reasonable answer. However, your specific example is further complicated by the fact that your desired resulting "path" requires multiple disconnected, intersecting sub-paths (one for the horizontal line, and one for the vertical line). So, I'll be answering the more general (and simpler) case of one continuous, non-intersecting path, as summarized below:

Steps:

1. To set up the example, begin with a simple path having some substantial stroke width.

1. Choose "Path" > "Stroke to Path"

1. Mess with the nodes to create a more interesting example.

1. Remove fill, and set a thin stroke.

1. Delete the two endpoint segments. Then choose "Path" > "Break Apart"

1. Important: Select one of the resulting objects (either one) and choose "Path" > "Reverse".

2. Select the two objects and choose "Extensions" > "Generate from path" > "Interpolate". (Make sure settings on the Interpolate extension are set as follows.

1. Delete the two original paths, leaving only the interpolated path. It will be a group. You can choose "Object" > "Ungroup" to remove the group container and just have a plain old path.

1. Style with thickness to taste. From here, you could simplify or tweak as desired.

2015/02/20
8
2/20/2015 6:19:00 PM