Given a circle of radius R centred at (X, Y) public void circleNegate(int centerx, int centery, int radius) { int x, y; for(y=centery-radius; y<=centery+radius; y++) { for(x = centerx-radius; x <= centerx+radius; x++) { if(distance({x, y}, {centerx, centery}) <= radius) negate(x, y); } } }