10
$\begingroup$

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:

Pac-Man curve

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.

$\endgroup$
  • 2
    $\begingroup$ $r(\theta)=1+\tanh\big(100(0.9-\cos\theta)\big)$ $\endgroup$ – Rahul Jun 14 '13 at 1:03
  • $\begingroup$ @Rahul That's really good - a simple formula and as it seems to me smooth all the way round. Bumping 100 to 1000 makes the mouth lines completely straight to my eyes. I'd probably take this as the answer if you post it. $\endgroup$ – alex.jordan Jun 14 '13 at 18:17
  • $\begingroup$ @Rahul If you are still around, I'd love for you to post this as an answer. It's the answer I'd like to accept and clear this question from my unanswereds. $\endgroup$ – alex.jordan Nov 28 '14 at 1:05
  • $\begingroup$ RIP Masaya Nakamura. $\endgroup$ – alex.jordan Jan 31 '17 at 1:19
4
$\begingroup$

Look at it in normal $(x,y)$ coordinates: what you're looking for here is a smooth approximation to a square wave (that's only $0$ for 1/4 of a period). In that light, this:

$$r=\frac1{(e^{100(\theta-3\pi/4)}+1)(e^{-100(\theta+3\pi/4)}+1)}\ \ \ \theta\in[-\pi,\pi]$$

Gives a pretty good approximation. Increasing the $100$ will make it arbitrarily good. Unfortunately it's not smooth at the inner corner of the mouth (though again this gets closer and closer as you increase $100$). This could be remedied by multiplying with a function that is essentially $1$ for almost all of $[-\pi,\pi]$ and quickly dips down to hit zero horizontally at the ends of the interval. I'm having trouble coming up with an example that isn't horrifying.

$\endgroup$
  • $\begingroup$ +1 although this is also not smooth at the far left point. Rahul's answer in the comments seems to me to be elegant and smooth all the way around. $\endgroup$ – alex.jordan Jun 14 '13 at 19:23
3
$\begingroup$

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.

Pac-Man in GeoGebra

$\endgroup$
2
$\begingroup$

Not a very good one: $r(\theta) = e^{-\dfrac{1}{20 \theta^2}}$

enter image description here

$\endgroup$
  • $\begingroup$ Good start - not smooth at the far left though. $\endgroup$ – alex.jordan Jun 12 '13 at 18:38
  • 6
    $\begingroup$ That's a butt... $\endgroup$ – Cole Johnson Jun 13 '13 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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