# Triangular periodic tessellation in two variables

The simple function $f(x, y) = \cos(x) + \cos(y)$ is doubly periodic in a square tessellation. One feature of this surface is that cuts through the nearest extrema in either of two directions (e.g. $f(x,0)$ and $f(0,x)$) produce cosine curves.
A comparable function is $f(x,y) = \cos^{-1}(\cos(x)) + \cos^{-1}(\cos(y))$ where cuts produce triangle curves.

Is there a similar function $f$ $\mathbb{R}^2 \to \mathbb{R}$ that is doubly periodic in a triangular/hexagonal tessellation such that a cut through the nearest extrema in a row in any of three directions (e.g. $f(x,0)$, $f(x, \sqrt3x)$ and $f(-x, \sqrt3x)$) produces a sine or triangle curve?

-

Yes, and such a function is given directly by a linear transformation of your examples. A triangular/hexagonal lattice is just a special case of a two-dimensional lattice in which the lattice vectors form an angle of $\pi/3$, and any two-dimensional lattice can be obtained from a square lattice by a linear transformation. We merely have to check that a cut between next-to-nearest neighbours also produces sinusoidal curves, since the transformation transforms some of these into nearest neighbours. Indeed $f(x,x)=\cos x+\cos x=2\cos x$.

Now these curves aren't the same as the ones for nearest neighbours in the other two directions, $f(x,0)=\cos x +1$. If you want them to be the same, you can just add three rotated copies of this,

$$g(x,y)=\sum_{k=0}^2\Omega^kTf(x,y)\;,$$

where $f$ is as in your examples, $T$ is an appropriate linear transformation (e.g. a skewing along the $x$ direction with an angle of $\pi/3$), and $\Omega$ is a rotation through $2\pi/3$ about the origin.

Here are plots of that function. You can see in the contour plot that the symmetrization has made it more nearly rotationally symmetric near the origin than your original function.

-
+1, but I can't resist pointing out that the sum of three rotated copies of $\cos x$ also works. –  Rahul Jan 23 '12 at 7:55
@Rahul: Ah, of course -- in fact I strongly suspect that this is the same function up to a factor. –  joriki Jan 23 '12 at 8:59