In Superformula vase, I use
bijection_offset to create an offset shape. Each point is one-to-one. When
bijection_offset is applied to a complex shape, the offset shape will be tangled.
In order to solve the problem, I tried to write
mid_smooth functions. Here's a demonstration about how to use them. I use Taiwan because it's an irregular shape and will generate tangled shape after offsetting.
I think this is the area of polygon offset. OpenSCAD has a built-in
offset for 2D polygon. General algorithms of polygon offset are complex and I'm still studying. Hope I'll figure something out in the future.