I'm working with a square grid, and I have a couple of effects that target all squares within R; in other words, a circular (or spherical) effect.
But, circles being, well, circular, and squares being... less so, things obviously have to be approximated. For instance:
But! I feel that some of these approximations don't quite give the approximation I want. For instance, consider this square:
It's obvious that the majority of the square falls within the circle, but using a pure "square counting" method (i.e., all squares within R of the origin), it gets left out.
Is there a better algorithm to grab all squares for which the majority of their area lies within the circle?