1
$\begingroup$

For a simulation, I need to create a function $r(\theta,\phi)$ that has minima at specific pairs of $(\theta,\phi)$, and that is periodic, i.e. $r(\theta,\phi) = r(\theta+2\pi,\phi)$ and $r(\theta,\phi) = r(\theta,\phi+2\pi)$ etc. At least the first and second derivatives of the function should be continuous.

How can I construct such a function? I imagine that when drawn as a surface, it will look a bit like a bowling ball, but without the sharp edges.

EDIT I can imagine several ways of creating a function with a single minimum at $(\theta_0,\phi_0)$, but I am stuck creating a function that has a second (or third) minumum at e.g. $(\theta_1,\phi_1)$, but not at $(\theta_0,\phi_1)$ or $(\theta_1,\phi_0)$

2 Answers 2

1

$ r(\theta,\phi) = (1-\cos(\theta-\theta_0))\cdot(1-\cos(\phi-\phi_0)) $

looks like a good candidate :)

  • 0
    Thank you $f$or your suggestion! This is what I originally started with. How can I adapt it to multiple minima?2012-10-10
0

The function $r(\theta,\phi)=\sin(\theta)+\cos(\phi)$ has the periodicity wanted, and is minimized at point $(\frac{3\pi}{2}+2k\pi,\pi+2k\pi), k\in \mathbb{Z}$.

  • 0
    @Jean-Sébastien: Yes, user44010 is correct.2012-10-10