# Can a rational Bézier curve take exactly the same shape as a part of the sine function?

I'm wondering whether a rational Bézier curve could take exactly the same shape as a part of the sine function. The best way to check this seems like this:

• Find a part of the sine function such that there is no symmetry anymore in this part, e.g. from $\sin(0)$ to $\sin({\pi \over 2})$.
• In that case, the control points for a quadratic Bézier curve follow from the sine function. Because a Bézier curve is tangent to the control polygon at the first and last points, this results in the points $(0,0)$, $(1,1)$ and $({\pi \over 2}, 1)$. The second point $(1,1)$ is the intersection of the two tangent lines.

When plotting the above:

Which is pretty close, but I'm looking for an exact representation (if possible). Therefore, the next step is to look to a rational Bézier curve:

In this case I used the weights [1, 1.4, 1]. It is now a very close approximation for this part of the sine function, but it is not exact.

What would be a systematic way to do this? And if it fails for a quadratic rational Bézier curve, could it work for a cubic, quartic, quintic, ... curve?

I don't think it would be meaningful to look into Uniform Rational B-Splines (or Non-Uniform ones, NURBS) since they are just piecewise rational Bézier curves, right?

-
It might help to link to a definition of a rational Bézier curve. Here's one on Wikipedia. –  Ilmari Karonen Mar 4 '12 at 20:46

In a Bézier curve, $x$ and $y$ are polynomials in the parameter $t$. Note that you can't just have "a part of the sine function": if $y(t) = \sin(x(t))$ for $t$ in some interval, since both sides of that equation are analytic functions on the complex plane the equation would be true for all complex numbers $t$. Since $y(t)$ is a polynomial, for any given value of $y$ (unless $y$ is constant) there are only finitely many $t$ and thus finitely many $x$. But this is not the case for the sine function: $\sin(n \pi) = 0$ for all integers $n$. So the sine curve can't be given exactly by a Bézier curve of any degree.

-
@Robert: Thanks, but I'm talking about a part of the sine curve. Unless I'm overlooking something, your answer seems a little beside the point. –  Ailurus Mar 4 '12 at 19:02
@WimC: But we're talking about rational functions. I'm a little confused, since for example part a circle can be exactly represented by a rational Bézier curve. –  Ailurus Mar 4 '12 at 19:08
@Ailurus, I removed my first comment since the answer was updated. A circle does satisfy a polynomial relation, e.g. $x^2+y^2=1$ and so my argument didn't apply to that. –  WimC Mar 4 '12 at 19:11
@Robert: Could you please elaborate on the "both sides are analytic" part? I know that $sin(x)$ is analytic, and hence infinitely differentiable ($C^\infty$). But why does this mean that a part of the sine curve cannot be represented as a rational Bézier curve? –  Ailurus Mar 4 '12 at 19:35
If $x(t)$ and $y(t)$ are polynomials, $y(t) - \sin(x(t))$ is an analytic function on the whole complex plane. It is a theorem of complex analysis that if $f(z)$ is analytic on (open, connected) domain $D$ in the complex plane and $f(z) = 0$ on a line segment in $D$, then $f(z) = 0$ on all of $D$. –  Robert Israel Mar 4 '12 at 20:26
The function $y=\sqrt{x}$ can be fitted exactly with a quadratic bezier curve, so this is not a valid argument. –  WimC Mar 4 '12 at 19:03