Introduction

Conic as Rational Quadratics

Classic problems

 


Introduction --

Although many curves can be expressed in polynomial form, it is somewhat embarrasing that a circle cannot be defined in such a way. In fact, many interesting curves cannot be defined this way, for example, ellipses and hyperbolas. In other words, at least conic sections cannot be defined in polynomial form. This is the main reason for us to introduce rational B-spline curves. Recall that a polynomial curve of degree m in (n 2), can be written as P(t) = (p1(t), p2(t),..., pn(t)) where (p1(t), p2(t),..., pn(t)) are polynomials of degree at most m and at least one of the pi has degree m. We define a parametric rational curve of degree m as where (p1(t), p2(t),..., pn+1(t)) are polynomials of degree at most m and at least one of the pi has degree m.

Example 1 For example, a circle can be expressed as a rational curve. How can we do that? Recall a circle can be written as C(q) = (cos q, sin q) We can check if we let t = tan(q/2) then Thus the circle can be written as a rational curve: where are polynomials of degree at most 2.

How can we deal with rational curves? The key idea is to use our knowledge of polynomial curves. For the example which dealt with a circle, we will first study the polynomial curve in . Using the de Castlejau algorithm, we can draw the curve P(t) in and then project it onto the plane z=1 to get the rational curve

Why does this process work? Mathematically, we need the concept of projective spaces. Consider the set of all lines through the origin in . If I let you count the number of lines in which do not lie on the xy plane, you may give the answer "plane many." Notice that every point p H, where H is the plane defined by z=1, uniquely corresponds to the line generated by . The projective space is defined as the set of lines that pass through the origin in . Algebraically, suppose v is a non-zero vector on a line in , say then any point on this line can be written as , l R. For those lines that do not lie in the xy plane, we must have lz=1 for some l 0. We say that the line decided by is projected onto the point p in the plane z=1. For those lines which lie on the xy plane, we can view them as being projected to infinity. Thus it is easy to see that the coordinate of p H is . We call as the homogenous coordinate and as the cartesian coordinate.

Example: Consider the curve shown in the figure. We shall describe the process defined previously to illustrate how the process works. The figure shows how a parabolic arc in three-space is projected into the plane z=1; the result is part of a hyperbola. If we consider the point p(t) = (x(t), y(t), z(t)) on the parabola then we can clearly see that the vector intersects the z=1 plane at q. This holds true for all p on the parabola. Further using the reasoning before, we can see that the homogenous coordinate for q is given by and on the z=1 plane, its cartesian coordinate is In example 2, we have x(t)= , y(t)=1 and z(t)=t. Also, p(t) = ( , 1, t) which is clearly a parabola in . p(t) is being projected onto the plane z=1 to get R(t) (the hyperbola xy=1).

Conics as Rational Quadratics

Let us take a moment to refresh our memory about conic sections. A conic section is best known as the intersection of a cone with a plane. It is usually associated with three points, with two of them we call the Base Points that are also the end points of the conic section. There are many ways of formulating a conic section. One of them is a quotient of two polynomials like this: The denominator is a quadratic polynomial of t, a binomial expansion of (l-t) and t, with coefficients w0, wl and w2. The numerator is also a binomial expansion with similar coefficients scaled by P0, Pl and P2. The ratio of wl squared over w0 times w2 is sometimes called Conic Shape Factor, because no matter how we change the w's, as long as the ratio remains as a constant the shape of the conic section does not change. Therefore, without loss of generality, let us set w0 and w2 to be 1. That means the weights at the base points are always one and the weight associated with the middle point wl alone determines the shape of the conic section.

When wl is 1, it is a parabola. When it is greater than 1, it is a hyperbola. When it is smaller than 1, it is an ellipse. When it is equal to 0, it is a straight line. When all the weights are 1, that is, when it is a parabola, the formula is greatly simplified. The denominator is exactly the binomial expansion of (1-t) and t, which is always 1 for all t. The numerator is a quadratic polynomial, a binomial expansion of (1-t) and t, with coefficients P0, Pl and P2. It is a quadratic Bezier!! So, the parabola can be exactly expressed as a quadratic Bezier with the three points as the control vertices.

Rational B-splines --Now we are ready to cover our next topic, namely, Rational B-splines, or rational spline basis, of order three, quadratic case. We have three rational basis functions that themselves are of quotient form. They share the same denominator W(t). W(t) itself is a polynomial of degree two that can be written in terms of non-rational spline basis B(t)'s with constant coefficients wi's. The rational basis functions are represented in terms of quotients of polynomials of t, and it is obvious that the sum of these basis functions is always one for all t. Let us look at a planar, rational B-spline curve first. It is a vector valued function of quotients of X(t) over W(t) and Y(t) over W(t), such that each component can be expressed in terms of the rational spline basis, R(t)'s. But this form of expression is perhaps of only theoretical interests.

a Un-projected Parabola When it comes to applications like evaluating a point on a rational curve, it is more practical to use its non-rational form, called un-projected parabola. If we look at X(t), Y(t) and W(t) more closely and write them in terms of the non-rational basis B(t), the vector-valued function is a non-rational three-dimensional curve, a parabola, with control vertices X times W, Y times W and W. How is this un-projected parabola related to what we really want? At any point of this parabola, t*, the un-projected parabola gives us a homogeneous coordinate that is equivalent to the homogeneous coordinate with W=l. This is exactly what we want to know, that is, its Cartesian coordinate. So the idea is to treat it as a non-rational B-spline curve until the last step which is to project it onto W=l plane. In other words, we divide all the components of the homogeneous coordinate by the W coordinate. In this way, all the conic sections can be represented exactly as rational B-spline curves.

Let us try to illustrate how the process of rational projection works. Suppose we use a right hand coordinate system such that the axis, W, is pointing out from the screen. Let us say this plane is the W=1 plane. Here is a point in this homogeneous space that sits on a plane with some W. To calculate its Cartesian coordinate, we shoot a ray from the origin through this point. The intersection point of the ray with the W=l plane is its projected image whose X, Y coordinate is the Cartesian coordinate that we want. This applies to all the point set, for instance, this circle is projected to this circle, so these two circles have the same Cartesian coordinate. In fact, all these circles belong to an equivalence class that have the same Cartesian coordinate. Recall that with this control polygon on the W=1 plane, we should have a parabola, colored in red. If we keep the two base points on the W=1 plane and change the weight of the middle point to a value bigger than 1, this new control polygon should produce a parabola colored in blue. This is the un-projected parabola, with homogeneous coordinate to be projected onto the W=l plane to obtain its Cartesian coordinate.

Classic Problems --

One of the most important applications of rational B-splines is to represent a circular arc. Let us see how could we represent this circular arc in terms of rational B-splines. We know these two base points interpolate the ends of the arc and the middle point is the intersection of the two tangent lines of the base points. In case we set weights at all three points as 1, then the resulting curve is a parabola. What are the right weights for a circular arc? If we set the weights at base points to be 1 and the weight at the middle point to be cosine of q, where q is half of the spread angle then we will have a circular arc. And it is a rational quadratic Bezier.