Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
up vote 3 down vote accepted

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,


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.

share|cite|improve this answer
+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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.