I revist the previous code, and improve it by cursively drawing the curve until each piece is "flat enough". It's interesting to note that the improvement is minor in terms of # segments; it however makes it easier to not have to hardcode a precision value.