I want to evenly draw a sine wave around the circle and ellipse.
Here's for circle:
$r$ is radius, $t$ from $0$ to $2\pi$, 20 is no. of waves.
$x = (r + \sin(20t))\cos(t)$
$y = (r + \sin(20t))\sin(t)$
Now I want to draw the same thing for ellipse evenly
Here's for ellipse:
$a$ and $b$ are major and minor axis, $t$ from $0$ to $2\pi$, 20 is no. of waves.
$x = (a + \sin(20t))\cos(t)$
$y = (b + \sin(20t))\sin(t)$
As you can see, the waves are concentrated at the ends but I want it to be evenly distributed. I prefer elementary function as I want to keep computation cheap. Accuracy is not important in my case, even 20 to 40 percent error will do the work.


This is an implementation of @David Sheard idea.
It is an ellipse $ p(t) = (a \cos(t) , b \sin(t) ) $ with $a = 15, b = 8 $.
At each point, the unit normal is computed $n(t) = \dfrac{(b \cos(t), a \sin(t))}{\sqrt{ b^2 \cos^2(t) + a^2 \sin^2(t) }} $
The arc length from $0$ to $t$ is computed
$ s(t) = \displaystyle \int_0^t \sqrt{ a^2 \sin(\tau)^2 + b^2 \cos^2(\tau) } \ d\tau $
And the point on the final curve is defined by
$ q(t) = p(t) + c \cos \bigg(20 (2 \pi) \bigg( \dfrac{s(t)}{S} \bigg) \bigg) n(t) $
where $S = s(2 \pi) $ and $c$ is the amplitude of the sine wave, $c=2$.