LÖVE's circle drawing function isn't really a circle drawing function. It would be more correctly described as a "regular polygon drawing function" - by default it draws octogons (8 segments).
Code: Select all
love.graphics.circle(x,y,radius,segments) --segments defaults to 8
Specifically, big circles. Say that you are drawing a "bigger than the screen planet Earth circle" - how many segments do you use for that circle to look "smooth"?
You would set the number of segments to something huge, like 2000 or something. Say that your game now zooms out to see the whole solar system. 8 or 10 segments would probably suffice now - 2000 would be overkill.
I hope you see the problem now - I'm looking for a formula that, given a radius, chooses the minimum amount of segments drawing a smooth circle. I'm also thinking that the formula might had to take into account the screen resolution - not sure about this though.
Right now I'm using radius*2 for segments, based on a very quick and dirty test. Do any of you guys know a better approach?