Is there a robust method that can shrink 2D shapes in themselves like seen on the images? I am talking about more complex shapes than the ones on the image. Shapes that don't necessarily have such a clear segmentation (like an oval, and 2 squares).
One simple way would be to just run through all the points and add an offset in the direction of the normal, right? But, that would not exactly be the same, because you would have curves at the corners. At the corner, I would interpolate the normal on the left to the normal on the right.
So it would look something like this instead:


Methods related to this problem: