Example: A Circle
Non-rational splines or Bézier curves may approximate a circle, but they cannot represent it exactly. Rational splines can represent any conic section, including the circle, exactly. This representation is not unique, but one possibility appears below:
x | y | z | weight |
---|---|---|---|
1 | 0 | 0 | 1 |
1 | 1 | 0 | |
0 | 1 | 0 | 1 |
−1 | 1 | 0 | |
−1 | 0 | 0 | 1 |
−1 | −1 | 0 | |
0 | −1 | 0 | 1 |
1 | −1 | 0 | |
1 | 0 | 0 | 1 |
The order is three, since a circle is a quadratic curve and the spline's order is one more than the degree of its piecewise polynomial segments. The knot vector is . The circle is composed of four quarter circles, tied together with double knots. Although double knots in a third order NURBS curve would normally result in loss of continuity in the first derivative, the control points are positioned in such a way that the first derivative is continuous. In fact, the curve is infinitely differentiable everywhere, as it must be if it exactly represents a circle.
The curve represents a circle exactly, but it is not exactly parametrized in the circle's arc length. This means, for example, that the point at does not lie at (except for the start, middle and end point of each quarter circle, since the representation is symmetrical). This is obvious; the x coordinate of the circle would otherwise provide an exact rational polynomial expression for, which is impossible. The circle does make one full revolution as its parameter goes from 0 to, but this is only because the knot vector was arbitrarily chosen as multiples of .
Read more about this topic: Non-uniform Rational B-spline
Famous quotes containing the word circle:
“It was my heavens extremest sphere,
The pale which held that lovely deer;
My joy, my grief, my hope, my love,
Did all within this circle move!”
—Edmund Waller (16061687)