auto increment: scaling sum of squares less than N shown:
This is a picture of the integer points (x,y,z) with x2 + y2 + z2 =N for an integer N; these are integer lattice points on the sphere of radius √N. These are projected to the (x,y) plane, i.e., forget z. Then they are marked by the cyan squares.
For every point (x,y,z), there is some N with x2 + y2 + z2 =N . But for some N this equation has lots of solutions, and for some it has none at all. Legendre's Three squares theorem tells you when it's possible. See e.g., https://en.wikipedia.org/wiki/Legendre%27s_three-square_theorem or https://warwick.ac.uk/fac/sci/maths/people/staff/michaud/threesquarestalk.pdf
The little black dots correspond to points where z=0, so N is the sum of two squares, which is possible depdning on the prime factors mod 4. https://en.wikipedia.org/wiki/Sum_of_two_squares_theorem.
You can choose to either scale the grid to fit the screen, or keep the same scale througout. You can change N by the slider, or have it automatically change for a pretty animation.
I put in an option to see the colours of (x,y) depdending on the largest i < N with some z with (x,y,z).(x,y,z)=i. OR, depending on smallest such i. This reminded me of this https://gallery.bridgesmathart.org/exhibitions/2022-bridges-conference-short-film-festival/henrys.