My question is how I could create a circle within a matrix. Let me explain:
Imagine a 1000x1000 matrix, filled with 0. I already have the necessary code to create rectangles and diamonds (fill in 1 the necessary boxes with that shape). But my doubt is how I could fill the matirz with ones with a shape similar to a circle.
The programming language does not matter, I just want the idea.
Thank you very much in advance.
Edit: the 1000x1000 matrix is an example, but they are always going to be sizes where a good approximation can be conceived (100x100 ....). It is simply the way to fill with a matrix of zeros in the shape of a circle.