I have a matrix with n columns, n rows and every element is initialized with 0.
I want to select the largest circle in that matrix, and set the values to 1.
000010000
000111000
000111000
001111100
011111110 The drawing isnt't very artistic (or correct)...
001111100 matrix: 9*9
000111000 largest circle
000111000
000010000
Can you help me with the java algorithm ?
Language: Java
Thank you,
Horatiu
Here’s a naive algorithm. It fills in each point to a 0 or 1 depending upon whether it lies inside or outside the circle.