I need to write a program using java for assignment. The program needs to display a circle of a given radius in a given coordinate. So far I have created a for loop nested inside another for loop to scan all coordinates and print "#" whenever the coordinate satisfies the circle equation, which is: (xa) ^ 2 + (y- b) ^ 2 = r ^ 2
However, in my circle some coordinates are missing.
I believe this is because I did not take into account one of the hints included in the question.
Hint: The discrete world we must work with makes it difficult to express strict equality in equation 1 (equation 1 is the equation of a circle). Can you relax this equality to attract steeper circles?
I would really appreciate it if someone would give me any ideas on how to “relax” the circle equation to get a more complete circle.

Thanks!
source
share