Tuesday, October 30, 2018

adobe illustrator - 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.


Depiction of desired result of averaging a compound enclosed path


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.



Answer



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:


Summary


Steps:




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


enter image description here



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


enter image description here



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



enter image description here



  1. Remove fill, and set a thin stroke.


enter image description here



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


enter image description here





  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.




enter image description here



  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.



enter image description here



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


enter image description here


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...