How comes plotting affine curve as shadows of gray modulo integer resembles its real locus?

44 Views Asked by At

Let $f(x,y)$ be polynomial with integer coefficients.

Pick integer $n>2$.

Let $M$ be $n \times n$ matrix. Set $M_{i,j}=f(i,j) \mod n$.

Plot $M$ as bitmap in shadows of gray where larger value is lighter and smaller is darker. (Zero is black).

Experiments suggest the resulting plot in shadows of gray sometimes resembles the real locus of the affine curve $f(x,y)=0$.

Is this true?

If this is true how to explain it?

Actually such relation between discrete and continuous surprises dumb me.


Here are some plots for $n=213$ done in Sage. $$x^2+y^2-1$$ enter image description here

$$x^2+2y^2-1$$

enter image description here

$$x^2-y^2-1$$

enter image description here

$$x^3-y^2-1$$ (might be counterexample)

enter image description here

$ x^2+y^2-1$, white is zero, black is nonzero.

enter image description here

$x^2+2y^2-1$ with colormap 'gnuplot', check sage's documentation.

enter image description here