[Math] derive a parametric equation of a sphere (on the first octant) with a dent in the middle

geometrygraphing-functionsparametricspheressurfaces

I was trying to derive the surface equation of a sphere where there is a dent in the middle of the surface. I am drawing on the first octant. I want the dent to be formed by changing the radius.

the equation of the radius:

$$r(x,y) = \frac{1}{2}(\cos(2\pi K x) + \cos(2\pi K y))\quad K = 1 \quad (K = \text{number of dents})$$

and the parametric equation of the surface looks like this:
$$
\begin{eqnarray}
f_x(u,v) &=& r(u,v) \cos(u\frac{\pi}{2}) \cos(v\frac{\pi}{2})\\
f_y(u,v) &=& r(u,v) \cos(u\frac{\pi}{2}) \sin(v\frac{\pi}{2})\\
f_z(u,v) &=& r(u,v) \sin(u\frac{\pi}{2})\\
&& \text{where,}\quad 0 \leq u,v \leq 1
\end{eqnarray}
$$

If I plot $r(x,y)$ within $0 \leq x,y \leq 1$, I get this:

r(x,y)

Now if I draw the parametric equation, I get this:

enter image description here

To make a proper adjustment, I change $r(x,y)$ to this:
$$r(x,y) = 5 + (\cos(2\pi K x) + \cos(2\pi K y))\quad K = 1$$

Now, if I draw it again, I get this:

enter image description here

Still, if you look at the top of the z-axis, a fold appears which I do not want. Moreover, the scale of the sphere is changed, the radius has been changed to $[0.0, 7.0]$. But what I need is a unit sphere on the first octant without any fold on the top and the lowest point of the dent appears at $(0.5,0.5,0.5)$ coordinate (instead of $(3.5, 3.5, 2.xx)$-ish). How do I do it properly? Moreover, can I do it without $r()$ being a surface? Please help.

Best Answer

Consider the function $\rho(\phi) = 1-d + d\tanh^2 c\phi$. This has a dent of depth $d$ at $\phi=0$. (There are many other possible functions $\rho(\phi)$. For example, something of the form $\rho(\phi) = (1-d+c^2\phi^2)/(1+c^2\phi^2)$ should also work well.) The parameter $c$ is roughly the inverse angular width of the dent. Consider $${\bf r} = \left(\begin{array}{ccc}x&y&z\end{array}\right)^T = \left(\begin{array}{ccc} \rho(\phi)\cos\theta\sin\phi & \rho(\phi)\sin\theta\sin\phi & \rho(\phi)\cos\phi\end{array}\right)^T.$$ We wish to rotate the dent into the first octant. This can be achieved by multiplying on the left by the matrix $R$, where $$R = R_z(\pi/4)R_x(\arccos1/\sqrt3) = \left( \begin{array}{ccc} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} \\ -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} \\ 0 & -\sqrt{\frac{2}{3}} & \frac{1}{\sqrt{3}} \\ \end{array} \right).$$ A parametric plot for $c=5$ and $d$ varying between $0$ and $1-\sqrt3/2$ gives the following: enter image description here

Related Question