Best way to calculate the inner path of a shape

geometrylinear algebratransformation

Let's suppose I have the following shape:
enter image description here
I want to calculate its inner path by a given distance (let's say 200), what would be the best way to do it?

At the end I would like to get the gray shape (sorry for the bad sketch) : enter image description here

I would start with

  1. translate the lines by the distance,
  2. increate the arcs's radius by the distance
  3. calculate all the intersections, then somehow (?) exclude the segments that won't be part of the new inner shape (like the bottom line in this example)

Is there any better (or simpler) way to do it?

Thanks

Best Answer

The name of your "inner path" is offset curve or parallel curve. See the earlier MSE question, Self-intersection removal in offset curves. To add to Jaap Scherphuis' comment, the offset curve may self-intersect. In general they are not easy to calculate.

OffsetCurve

Image from Paul Murrell, "Offset Curves for Variable-Width X-splines," 2017. Link to paper.