Curve offset

It is an old subject see this for polyline

For curve in general it must be harder