Modulo rugs of 3D functions

Consider a 3D function z=f(x,y). Now evaluate it at each point of a n \times n integer lattice grid. Compute z \mod n corresponding to each point and plot it as a color defined by some palette that suits your aesthetic. The consequence is a what we term the “modulo rug”.
For example, below is a plot of z=x^2+y^2.

matrixmod01_318Figure 1: z=x^2+y^2, n=318

We get a pattern of circles around a central circular system reminiscent of ogdoadic arrangements in various Hindu maṇḍala-s. From the aesthetic viewpoint, the best modulo rugs are obtained with symmetric functions higher even powers — this translates into some pleasing symmetry in the rug. Several examples of such are shown below.

matrixmod06_318Figure 2: z=x^4-x^2-y^2+y^4, n=318

matrixmod08_315Figure 3: z=x^4-x^2-y^2+y^4, n=315

matrixmod13_309Figure 4: z= x^6-x^4-y^4+y^6, n=309

matrixmod12_318Figure 5: z=x^6-x^2-y^2+y^6, n=318

matrixmod07_312Figure 6: z=x^4-x^2+y^2-y^4, n=310

All the above n are composite numbers. Accordingly, there is some repetitiveness in the structure. However, if n is a prime then we have the greatest complexity in the rug. One example of such is plotted below.

matrixmod14_311Figure 7: z=x^6-x^4+x^2+y^2-y^4+y^6, n=311

See also: 1) Sine rugs; 2) Creating patterns through matrix expansion.

This entry was posted in art, Scientific ramblings and tagged , , , , , , . Bookmark the permalink.