Bezier Curve – Matching Shape with Sine Function

bezier-curvetrigonometry

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:

enter image description here

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:

enter image description here

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?

Best Answer

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.