Today I've reimplemented the bezier curve drawing utilities from the old 2.1 version of the mod, explaining what I've gone through step by step. It's a pretty long and a geometry oriented one, so sorry if you are not that tech savvy!
Source code: https://github.com/altalk23/Allium
Support me: https://ko-fi.com/alk1m123
Anti-Grain Geometry: https://github.com/ghaerr/agg-2.6
Article about adaptive bezier curves: https://agg.sourceforge.net/antigrain.com/research/adaptive_bezier/