TITLE: Smooth Pac-Man Curve?
QUESTION [10 upvotes]: Idle curiosity and a basic understanding of the last example here led me to this polar curve: $$r(\theta) = \exp\left(10\frac{|2\theta|-1-||2\theta|-1|}{|2\theta|}\right)\qquad\theta\in(-\pi,\pi]$$ which Wolfram Alpha shows to look like this:

The curve is not defined at $\theta=0$, but we can augment with $r(0)=0$. If we do, then despite appearances, the curve is smooth at $\theta=0$. It is also smooth at the back where two arcs meet. However it is not differentiable at the mouth corners.
Again out of idle curiosity, can someone propose a polar equation that produces a smooth-everywhere Pac-Man on $(-\pi.\pi]$? No piece-wise definitions please, but absolute value is OK.

REPLY [3 votes]: OK, I found something, through a series of compositions:
Choose a large $n$ (used to approximately straighten out the mouth "lines"), and a parameter $c$ for the mouth width ($c=2$ works well).
$$r(\theta)=\left(f(c\theta)+r(c\theta)\right)^n$$
$$f(x)=1-\exp\left(\frac{1}{q(x)^2-1}\right)$$
$$q(x)=p(x)-\frac12\left(g(x+1)+g(x-1)\right)$$
$$p(x)=\frac{|x+1|-|x-1|}{2}$$
$$g(x)=\frac{|x|}{x}$$
$$r(x)=\frac{e^{-1}}{2}\left(g(x-1)-g(x+1)+2\right)$$
All together that's
$$r(\theta)=\left(1-\exp\left(\frac{1}{\left(\frac{|c\theta+1|-|c\theta-1|}{2}-\frac12\left(\frac{|c\theta+1|}{c\theta+1}+\frac{|c\theta-1|}{c\theta-1}\right)\right)^2-1}\right)+\frac{e^{-1}}{2}\left(\frac{|c\theta-1|}{c\theta-1}-\frac{|c\theta+1|}{c\theta+1}+2\right)\right)^n$$
Here is a GeoGebra shot of this in action. There are discrepancies between the formulas in the screenshot and those above, since I tried a little to simplify things above. The radial function is also plotted using Cartesian coordinates. I'm fairly certain that this is everywhere-smooth, once  you plug the two holes at the lips.