I can make a "square" $2$D sine wave pattern with the function $f(x,y) = \cos(x) + \cos(y)$:
What is the function to make a hexagonal pattern of the same kind?
I can make a "square" $2$D sine wave pattern with the function $f(x,y) = \cos(x) + \cos(y)$:
What is the function to make a hexagonal pattern of the same kind?
How about $$ f(x,y) = \cos x + \cos(\tfrac12 x +\tfrac{\sqrt 3}2y)+\cos(\tfrac12 x -\tfrac{\sqrt 3}2y)? $$ See Wolfram Alpha for a plot:
The idea is that $\cos(ax+by)$ will be large when $ax+by\approx 2\pi k$, and small when $ax+by\approx 2\pi k+\frac12$. This means there are periodic stripes of slope $\frac{-a}b$. In my example, the slopes of the stripes of the three summands are $\infty$ (i.e. vertical) and $\pm \frac1{\sqrt3}$, which correspond to making an angle of $\pm 30^\circ$ with the $x$ axis.
A better way of writing the same function is $$ f(x,y) = \cos x + \cos(-\tfrac12 x +\tfrac{\sqrt 3}2y)+\cos(-\tfrac12 x -\tfrac{\sqrt 3}2y) $$ and then noting that the vectors $(1,0),(-\tfrac12, \tfrac{\sqrt 3}2),(-\tfrac12, -\tfrac{\sqrt 3}2)$ are three unit vectors which meet at $120^\circ$ angles at the origin.