how many lines for ellipse?

hello.

i draw an ellipse with “radians” a and b.
is there a formula, which gives out the amount of used lines for drawing this ellipse depending on a and b, so that on the one side the ellipse looks good (not like a polygon) and on the other side, rendering time is not too expensive.

for example:
a=b=2 => i think 6-8 lines are ok.

thx,
yadaddy.

p.s. i just tested a little bit, for a=b<=30 20 lines were enough.
so i think you can get out, what i mean by “look good”.

Doesn’t anybody know it?

Well when I was doing this for circles I just came up with a simple heristic to determine the number of sections based on the visible (pixel) size of the circle, ellipses are going to be pretty much the same thing really.

I’d probably just find the radius (or largest radian) in pixels and use that as the number of subdivisions per quadrent. Then depending on whether that’s “good enough” add a scale/bias to that like doubling or halving until you’ve got the right balance between performance and quality.