Average stroke from a fill
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.
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:
- To set up the example, begin with a simple path having some substantial stroke width.
- Choose "Path" > "Stroke to Path"
- Mess with the nodes to create a more interesting example.
- Remove fill, and set a thin stroke.
- Delete the two endpoint segments. Then choose "Path" > "Break Apart"
Important: Select one of the resulting objects (either one) and choose "Path" > "Reverse".
Select the two objects and choose "Extensions" > "Generate from path" > "Interpolate". (Make sure settings on the Interpolate extension are set as follows.
- 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.
- Style with thickness to taste. From here, you could simplify or tweak as desired.