This is an algorithm I came up with. The math wasn't too hard and the result is very satisfying. Play with the parameters. The ellipse is approximated by a series of circles ("Quality factor" is the number of circles). Turn "Visualization" to 1 for a visual explanation.
Byproduct of another project of mine.