I wrote an article about drawing a curve with offsets. Some references:
curve offsetting Tiller-Hanson algorithm explanation wiki on parallel curves
Recently I came across this article, which presents a new-to-me algorithm for drawing offset curves that I can't say I fully grasp, but appears to give pretty nice results. It's in JTS, which is a Java library for dealing with vector geometry.
The pull request that adds it is here: https://github.com/locationtech/jts/pull/810 The GEOS pull request to port it is here: https://github.com/libgeos/geos/pull/530