Given a two-dimensional coordinate system how can I find all points with integer coordinates in a radius from a given point? I want the points as x-coordinate and y-coordina
Simplest solution: take a square and filter it:
Point point(100, 100); for(int x = -radius; x <= radius; ++x) for(int y = -radius; y <= radius; ++y) if(x*x + y*y <= radius* radius) { points.insert(Point(x + point.x, y + point.y)); }