Top Banner
Chapter 22 Rational Curves 597
48

Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

Sep 27, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

Chapter 22

Rational Curves

597

Page 2: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

598 CHAPTER 22. RATIONAL CURVES

22.1 Rational Curves and Multiprojective Maps

In this chapter, rational curves are investigated. After a quick review of the traditional parametric definitionin terms of homogeneous polynomials, we explore the possibility of defining rational curves in terms of polarforms. Because the polynomials involved are homogeneous, the polar forms are actually multilinear, andrational curves are defined in terms of multiprojective maps. Then, using the contruction at the end of theprevious chapter, we define rational curves in BR-form. This allows us to handle rational curves in terms ofcontrol points in the hat space !E obtained from E . We present two versions of the de Casteljau algorithmfor rational curves and show how subdivision can be easily extended from the polynomial case. We alsopresent a very simple method for approximating closed rational curves. This method only uses two controlpolygons obtained from the original control polygon. We conclude this chapter with a quick tour in a galleryof rational curves.

We begin by defining rational polynomial curves in a traditional manner, and then, we show how thisdefinition can be advantageously recast in terms of symmetric multiprojective maps. Keep in mind thatrational polynomial curves really live in the projective completion "E of the a!ne space E . This is the reasonwhy homogeneous polynomials are involved. We will assume that the homogenization !A of the a!ne line Ais identified with the direct sum R! R1. Then, every element of !A is of the form (t, z) " R2.

A rational curve of degree m in an a!ne space E of dimension n is specified by n fractions, say

x1(t) =F1(t)

Fn+1(t), x2(t) =

F2(t)

Fn+1(t), . . . , xn(t) =

Fn(t)

Fn+1(t),

where F1(X), . . . , Fn+1(X) are polynomials of degree at most m. In order to deal with the case where thedenominator Fn+1(X) is null, we view the rational curve as the projection of the polynomial curve definedby the polynomials F1(X), . . . , Fn+1(X). To make this rigorous, we can view the rational curve as a mapF : "A # "E . For this, we homogenize the polynomials F1(X), . . . , Fn+1(X) as polynomials of the same totaldegree (replacing X by X/Z), so that after polarizing w.r.t. (X,Z), we get a (symmetric) multilinear mapwhich induces a (symmetric) multiprojective map. Following this approach leads to the following definition.

Definition 22.1.1 Given some a!ne space E of finite dimension n $ 2, an a!ne frame ("1, (e1, . . . , en)) for

E , and the corresponding basis (e1, . . . , en, %"1, 1&) for !E , a rational curve of degree m is a function F : !A # !E ,such that, for all (t, z) " R2, we have

F (t, z) = F1(t, z)e1 !+ · · · !+ Fn(t, z)en !+ Fn+1(t, z)%"1, 1&,

where F1(X,Z), . . . , Fn+1(X,Z) are homogeneous polynomials in R[X,Z], each of total degree m.

! It is important to require that all of the polynomials F1(X,Z), . . . , Fn+1(X,Z) are homogeneous and ofthe same total degree m. Otherwise, we would not be able to polarize these polynomials and obtain a

symmetric multilinear map (as opposed to a multia!ne map).

For example, the following homogeneous polynomials define a (unit) circle:

F1(X,Z) = Z2 'X2

F2(X,Z) = 2XZ

F3(X,Z) = Z2 +X2.

Note that we recover the standard parameterization of the circle, by setting Z = 1. But in general, itis also possible to get points at infinity in the projective space "E , or a point corresponding to the point atinfinity (1, 0) in !A. For example, for (X,Z) = (1, 0), we get the point of homogeneous coordinates ('1, 0, 1).

Page 3: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.1. RATIONAL CURVES AND MULTIPROJECTIVE MAPS 599

Using a Lemma in Gallier [70] (see Lemma 27.2.1), for each homogeneous polynomial Fi(X,Z) of totaldegree m, there is a unique symmetric multilinear map fi: (R2)m # R, such that

Fi(t, z) = fi((t, z), . . . , (t, z)# $% &m

),

for all (t, z) " R2, and together, these n+ 1 maps define a symmetric multilinear map

f : (!A)m # !E ,

such thatF (t, z) = f((t, z), . . . , (t, z)# $% &

m

),

for all (t, z) " R2. But then, we get a symmetric multiprojective map

P(f): ("A)m # "E ,

and we define the projective rational curve"F : "A # "E ,

such that"F ([t, z]) = P(f)([t, z], . . . , [t, z]# $% &

m

)

for all (t, z) " R2, where we view (t, z) as homogeneous coordinates, that is, where (t, z) (= (0, 0). This leadsus to the following definition.

Definition 22.1.2 Given an a!ne space E of dimension $ 2, a projective rational curve F of degree m is a(partial) projective map F : "A # "E such that there is some symmetric multilinear map f : (!A)m # !E , with

F ([t, z]) = P(f)([t, z], . . . , [t, z]# $% &m

),

for all [t, z] " "A (i.e., all homogeneous coordinates (t, z) " R2). The symmetric multilinear map f is also

called a polar form of F . The trace of F is the subset F ("A) of the projective completion "E of the a!ne spaceE .

Since "A = RP1, a projective rational curve F is a rational map F :RP1 # "E defined as the diagonal of asymmetric multiprojective map (namely, P(f)).

!! One should be aware that in general, the symmetric multinear map f : (!A)m # !E inducing the projectivemap F : "A # "E via

F ([t, z]) = P(f)([t, z], . . . , [t, z]# $% &m

)

for all [t, z] " "A, is not unique.

Let f : (!A)2 # !A be the bilinear map defined such that

f((x1, z1), (x2, z2)) =

'ax1x2 + b

x1z2 + x2z12

, ax1z2 + x2z1

2+ bz1z2

(.

Page 4: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

600 CHAPTER 22. RATIONAL CURVES

Then, we have

P(f)([x1, z1], [x2, z2]) =

)ax1x2 + b

x1z2 + x2z12

, ax1z2 + x2z1

2+ bz1z2

*,

and thus,F ([x, z]) = P(f)([x, z], [x, z]) = [x(ax + bz), z(ax+ bz)] = [x, z],

which shows that F : "A # "A is the identity. However, by choosing di#erent pairs (a, b), we get distinctbilinear maps f , all inducing the identity.

From the discussion just before definition 22.1.2, we note that every rational curve F as in definition22.1.1 defines a projective rational curve "F .

The converse is also true when E is of finite dimension. Let G be a projective rational curve definedby the symmetric multilinear map g: (!A)m # !E . Given an a!ne frame ("1, (e1, . . . , en)) for E , and thecorresponding basis (e1, . . . , en, %"1, 1&) for !E , a Lemma from Gallier [70] (see Lemma 27.1.5) shows thata symmetric multilinear map g: (!A)m # !E defines a homogeneous polynomial map F of degree m in twovariables, with coe!cients in !E . Expressing these coe!cients over the basis (e1, . . . , en, %"1, 1&), we see thatthe polynomial map F is defined by some homogeneous polynomials F1(X,Z), . . . , Fn+1(X,Z) in R[X,Z],each of total degree m, such that, for all (t, z) " R2, we have

F (t, z) = F1(t, z)e1 !+ · · · !+ Fn(t, z)en !+ Fn+1(t, z)%"1, 1&.

Thus F is a rational curve, and clearly, "F = G. Therefore, when E is of finite dimension, definition 22.1.2and definition 22.1.1 define the same class of projective rational curves. Definition 22.1.2 will be preferred,since it leads to a treatment of rational curves in terms of control points rather similar to the treatment ofBezier curves (it also works for any dimension, even infinite).

Remark : If the homogeneous polynomials F1(X,Z), . . . , Fn+1(X,Z) have some common zero (t, z), thenP(F )([t, z]) is undefined. Such points are called base points . This may appear to be a problem, but inthe case of curves, this problem can be fixed easily. Indeed, we can use greatest common divisors andcontinuity to define P(F )([t, z]) on the common zeros of the Fi. If (t, 0) is a common zero of the polynomialsF1(X,Z), . . . , Fn+1(X,Z), since F1(X, 0), . . . , Fn+1(X, 0) are polynomials in the single variable X , they havethe common root X = t, and thus, they are all divisible by X ' t. If G(X) is the greatest common divisorof the polynomials F1(X, 0), . . . , Fn+1(X, 0), then by continuity, we let

'F1(t, 0)

G(t), . . . ,

Fn+1(t, 0)

G(t)

(,

be the homogeneous coordinates of F (t, 0).

If (t, z) is a common zero of the polynomials F1(X,Z), . . . , Fn+1(X,Z), where z (= 0, then (u, 1) ='tz , 1

(is also a common zero, since the polynomials are homogeneous. Then, by setting Z = 1, we obtain

polynomials F1(X, 1), . . . , Fn+1(X, 1) in the single variable X , and they are all divisible by X'u. As before,if G(X) is the greatest common divisor of the polynomials F1(X, 1), . . . , Fn+1(X, 1), then by continuity, welet '

F1(u, 1)

G(u), . . . ,

Fn+1(u, 1)

G(u)

(,

be the homogeneous coordinates of F (t, z).

! It should be noted that such a method does not always work in the case of surfaces, because forpolynomials in two or more variables, having a common zero does not imply the existence of a greatest

common divisor. Continuity does not work either.

Page 5: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.1. RATIONAL CURVES AND MULTIPROJECTIVE MAPS 601

However, as long as (t, z) is not a common zero of all the Fi(X,Z), note that we can now deal withthe case where (t, z) is a zero of the “denominator Fn+1(X,Z)”. In this case, we get a point at infinity ofhomogeneous coordinates

(F1(t, z), . . . , Fn(t, z), 0).

Remarks : A way to avoid that P(F )([t, z]) be undefined when z (= 0, is to assume that the polyno-mials F1(X, 1), . . . , Fn+1(X, 1) are relatively prime. Then if (t, 0) is a common zero of the polynomialsF1(X,Z), . . . , Fn+1(X,Z), we determine P(F )([t, 0]) by continuity, as we just explained. A way to deal withimproperly parameterized rational curves is proposed in Sederberg [153].

Given a projective rational curve F : "A # "E defined by some symmetric multilinear map f : (!A)m # !E ,with

F ([t, z]) = P(f)([t, z], . . . , [t, z]# $% &m

),

for all [t, z] " "A, for any projectivity h: "A # "A, the map F ) h is also a projective rational curve. Indeed, as

we saw earlier, a projectivity h: "A # "A is defined by a linear map g:R2 # R2 given by an invertible matrix

'a b

c d

(

with ad' bc (= 0. The linear map g can be viewed as a linear map from !A to itself, and the map

f ) (g, . . . , g): (!A)m # !E

is clearly a symmetric multilinear map inducing the map F ) h. The curve F ) h is said to be obtained fromF by the change of parameter h.

If F : "A # "E is a projective curve defined by some symmetric multilinear map f : (!A)m # !E , with

F ([t, z]) = P(f)([t, z], . . . , [t, z]# $% &m

),

for all [t, z] " "A, by lemma 21.3.2, the restriction g:Am # !E of f : (!A)m # !E to Am is a multia!ne mapsuch that P(f) = $" ) "g. The multia!ne map g:Am # !E defines a polynomial curve G:A # !E , andthe multilinear map !g: (!A)m # !!E induces a projective rational curve "G: "A # "!E , and P(f) = $" ) "g showsthat the projective rational curve F is the projection under $" of the projective rational curve "G, whichitself, can be considered as the projective completion of the polynomial curve G. This suggests the followingdefinition.

Definition 22.1.3 Given a polynomial curve F :A # E defined by the polar form f :Am # E , the symmetricmultilinear map !f : (!A)m # !E induces a projective rational curve "F : "A # "E , called the projective completionof the polynomial curve F .

Clearly the restriction of the curve "F to A agrees with the polynomial curve F . The projective completion"F of F can still be considered as a polynomial curve, except that it is also defined for the point at infinityin "A.

Now, given a projective rational curve F with polar form f : (!A)m # !E , the discussion just beforedefinition 22.1.3 shows that F is completely determined by the polynomial curve G of polar form g:Am # !E ,the restriction of f : (!A)m # !E to Am, and the projection $". We also know from section 18.1 that thepolynomial curve G is determined by its m + 1 control points, which are vectors !0, . . . , !m in !E . Thus, weare led to the definition of a BR-curve.

Page 6: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

602 CHAPTER 22. RATIONAL CURVES

Definition 22.1.4 Given any a!ne space E of dimension n $ 2, a rational curve in Bezier form of degreem, or BR-curve, is a map F : "A # "E such that there is a polynomial curve G:A # !E of degree m defined bym+ 1 control points !0, . . . , !m in !E and such that if g:Am # !E is the (unique) polar form of G, then

F (t) =

+$(G(t)) if t (= *;$"([!g((1, 0), . . . , (1, 0))]!) when t = *.

The trace of F is the subset F ("A) of the projective completion "E of the a!ne space E .

Note that in practice, we can assume that F is only defined on A.

The following lemma shows that the class of projective rational curves and the class of BR-curves areidentical.

Lemma 22.1.5 Every rational projective curve F : "A # "E with polar form f : (!A)m # !E is the image under

$" of the projective completion "G: "A # "!E of the polynomial curve G:A # !E associated with the restrictiong:Am # !E of f to Am. Conversely, given a polynomial curve G:A # !E with polar form g:Am # !E , theimage under $" of the projective completion "G: "A # "!E of G is a projective rational curve. As a consequence,the class of projective rational curves and the class of BR-curves are identical.

Proof . The first and the second part follow from lemma 21.3.2. If F is a BR-curve, and g:Am # !E is thepolar form associated with the polynomial curve G determined by !0, . . . , !m in !E , by lemma 21.3.2, there isa multilinear map f : (!A)m # !E whose restriction to Am is g, and we have P(f) = $" ) "g. By lemma 21.2.6

applied to the special case where'#F = !E , the natural projection $: (!E ' {"}) # "E is the restriction of the

central projection $": ("!E ' {"}) # "E to (!E ' {"}) (where " is the origin 0 of !E , where !E is viewed as an

a!ne space). Since !G(t, 1) = !g((t, 1), . . . , (t, 1)) is not a point at infinity for t " A, we have

$"( "G(t, 1)) = $"("g([t, 1], . . . , [t, 1]))= $"([!g((t, 1), . . . , (t, 1))]!)= $(g(t, . . . , t))

= $(G(t)).

By definition 22.1.4, this shows that the BR-curve F is the projective rational curve defined by P(f).

Conversely, a projective rational curve F : "A # "E defined by a polar form f : (!A)m # !E is the projection

under $" of the projective completion "G: "A # "!E of the polynomial curve G:A # !E associated with therestriction g:Am # !E of f to Am. But then, using the same argument as above, $"( !G(t, 1)) = $(G(t)), fort " A, and thus, F is BR-curve.

Assuming that E is of dimension n $ 2, when a projective rational curve F is defined by a sym-metric multilinear map f : (!A)m # !E which is obtained by polarizing some homogeneous polynomialsF1(X,Z), . . . , Fn+1(X,Z) in R[X,Z], each of total degree m, the polynomial curve G:A # !E associated withthe restriction g:Am # !E of f to Am is simply determined by the polynomials F1(X, 1), . . . , Fn+1(X, 1) inR[X ] obtained by setting Z = 1. If we homogenize the polynomials F1(X, 1), . . . , Fn+1(X, 1), getting homoge-neous polynomials of total degreem, we get the original homogeneous polynomials F1(X,Z), . . . , Fn+1(X,Z)back.

When the polynomial curve G:A # !E inducing the projective rational curve F : "A # "E is given by somepolynomials F1(X), . . . , Fn+1(X), since a projectivity h: "A # "A is defined by a linear map g:R2 # R2 givenby an invertible matrix

Page 7: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.1. RATIONAL CURVES AND MULTIPROJECTIVE MAPS 603

'a b

c d

(

with ad' bc (= 0, a change of parameter h consists in substituting

aZ + b

cZ + d

forX in the polynomials, and readjusting the polynomials so that denominators disapear. The curve resultingfrom the change of parameter has the same trace as the original curve (since the change of parameter is aprojectivity).

Thus, in practice, when defining (projective) rational curves, it is enough to specify n + 1 polynomialsF1(X), . . . , Fn+1(X) in R[X ]. Such polynomials define a polynomial curve G:A # !E . Since G is a curvein !E , control points ! " !E are either weighted points of the form %a, w&, where w " R (w (= 0) is called the

weight of a " E , or control vectors u " '#E . We can then determine the control points of the curve G bycomputing the polar form g of G. But we have to remember that the coordinates of these control points willbe with respect to the basis (e1, . . . , en, %"1, 1&) of !E , where ("1, (e1, . . . , en)) is the a!ne frame for E . Thus,for every ! = %a,"& " !E , to find the coordinates of the point a " E , if ! has coordinates (x1, . . . , xn,") over(e1, . . . , en, %"1, 1&), then a " E has coordinates

'x1

", . . . ,

xn

"

(,

over ("1, (e1, . . . , en)), as explained in lemma 4.2.1. Let us give some examples.

Example 1. Consider the circle defined by the polynomials

G1(X) = 1'X2

G2(X) = 2X

G3(X) = 1 +X2.

We get the polar forms

g1(X1, X2) = 1'X1X2

g2(X1, X2) = X1 +X2

g3(X1, X2) = 1 +X1X2.

With respect to the a!ne frame (0, 1) in A, we get the following three control points !0, !1, !2:

!0 = (1, 0, 1)

!1 = (1, 1, 1)

!2 = (0, 2, 2).

We have to remember that the above are the coordinates of the control points with respect to !E . Thepoints a, b, c " E , corresponding to the control points !0, !1, !2, are a = (1, 0), b = (1, 1), and c = (0, 1).Thus, we have !0 = %a, 1&, !1 = %b, 1&, and !2 = %c, 2&. Note that c has weight 2. When t " [0, 1], the pointF (t) = $(G(t)) is on the circle between a and c (a quarter-circle). The entire circle, excluding the pointd = ('1, 0), is obtained when t " A. The point d is obtained for t = *.

Page 8: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

604 CHAPTER 22. RATIONAL CURVES

a

bc

d

Figure 22.1: Quarter of a Circle

Let us consider another way of describing a circle.

Example 2. Consider the circle defined by the polynomials

G1(X) = 1' 2X

G2(X) = 2X ' 2X2

G3(X) = 2X2 ' 2X + 1.

We get the polar forms

g1(X1, X2) = 1' (X1 +X2)

g2(X1, X2) = X1 +X2 ' 2X1X2

g3(X1, X2) = 2X1X2 ' (X1 +X2) + 1.

With respect to the a!ne frame (0, 1) in A, we get the following three control points !0, !1, !2:

!0 = (1, 0, 1)

!1 = (0, 1, 0)

!2 = ('1, 0, 1).

This time, we note that !1 is the control vector e2. The points a, d " E , corresponding to the controlpoints !0 and !2, are a = (1, 0), and d = ('1, 0). Thus, we have !0 = %a, 1&, !1 = e2, and !2 = %d, 1&. Whent " [0, 1], the point F (t) = $(G(t)) is on the half circle of diameter ad. The entire circle is obtained whent " "A.

ad

Figure 22.2: Half Circle

Page 9: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.1. RATIONAL CURVES AND MULTIPROJECTIVE MAPS 605

Example 3. Consider the hyperbola defined by the polynomials

G1(X) = X2

G2(X) = 1

G3(X) = X.

We get the polar forms

g1(X1, X2) = X1X2

g2(X1, X2) = 1

g3(X1, X2) =X1 +X2

2.

With respect to the a!ne frame (0, 1) in A, we get the following three control points !0, !1, !2:

!0 = (0, 1, 0)

!1 =

'0, 1,

1

2

(

!2 = (1, 1, 1).

We note that !0 is the control vector e2. The points c2, b " E , corresponding to the control points !1 and!2, are c2 = (0, 2), and b = (1, 1). Thus, we have !0 = e2, !1 =

,c2,

12

-, and !2 = %b, 1&. When t " [0, 1], the

point F (t) = $(G(t)) is on the arc of hyperbola from the point at infinity in the direction of e2 along the

axis X = 0, to the point b. The axis X = 0 is an asymptote. The entire hyperbola is obtained when t " "A.

c2

b

Figure 22.3: An arc of Hyperbola

Example 4. Consider the ellipse defined by the polynomials

G1(X) = 2' 2X2

G2(X) = 2X

G3(X) = 1 +X2.

Page 10: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

606 CHAPTER 22. RATIONAL CURVES

We get the polar forms

g1(X1, X2) = 2' 2X1X2

g2(X1, X2) = X1 +X2

g3(X1, X2) = 1 +X1X2.

With respect to the a!ne frame (0, 1) in A, we get the following three control points !0, !1, !2:

!0 = (2, 0, 1)

!1 = (2, 1, 1)

!2 = (0, 2, 2).

The points a2, b2, c " E , corresponding to the control points !0, !1, !2, are a2 = (2, 0), b2 = (2, 1), andc = (0, 1). Thus, we have !0 = %a2, 1&, !1 = %b2, 1&, and !2 = %c, 2&. Note that c has weight 2. When t " [0, 1],the point F (t) = $(G(t)) is on the ellipse between a2 and c (a quarter-ellipse). The entire ellipse, excludingthe point d2 = ('2, 0), is obtained when t " A. The point d2 is obtained for t = *.

a2

b2c

d2

Figure 22.4: Quarter of Ellipse

Example 5. Consider the singular cubic defined by the polynomials

G1(X) = X2 'X3

G2(X) = X3

G3(X) = (1'X)3.

We get the polar forms

g1(X1, X2, X3) =X1X2 +X1X3 +X2X3

3'X1X2X3

g2(X1, X2, X3) = X1X2X3

g3(X1, X2, X3) = 1' (X1 +X2 +X3) +X1X2 +X1X3 +X2X3 'X1X2X3.

With respect to the a!ne frame (0, 1) in A, we get the following four control points !0, !1, !2, !3:

!0 = (0, 0, 1)

!1 = (0, 0, 0)

!2 =

'1

3, 0, 0

(

!3 = (0, 1, 0).

Page 11: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.1. RATIONAL CURVES AND MULTIPROJECTIVE MAPS 607

This example is particularly remarkable, because we get the control point !0 = %"1, 1&, where "1 is the originof the a!ne plane, and the three control vectors !1 = 0 = ", !2 = e1

3 , and !3 = e2. The projection $(") of "

(the origin " = 0 of !E) is not even defined! The other two control vectors are projected to points at infinity.In fact, the curve F of this example has a cusp at the origin. It is the “pointy” singular cubic of implicitequation Y 2 = X3, and when t " [0, 1], the point F (t) = $(G(t)) travels on the branch from the origin tothe point at infinity in the direction e2. As we shall see shortly, a version of the de Casteljau algorithm canbe used to construct F . The cubic Y 2 = X3 can be parameterized in a simpler way, for example as X = t2,Y = t3. But then, over the interval [0, 1], only the portion of the curve between the origin and the point(1, 1) is represented.

"1

Figure 22.5: Cuspidal Cubic

Example 6. Consider the following cubic, known as the “Folium of Descartes”, and defined by thepolynomials

G1(X) = 3X

G2(X) = 3X2

G3(X) = 1 +X3.

We get the polar forms

g1(X1, X2, X3) = X1 +X2 +X3

g2(X1, X2, X3) = X1X2 +X1X3 +X2X3

g3(X1, X2, X3) = 1 +X1X2X3.

With respect to the a!ne frame (0, 1) in A, we get the following four control points !0, !1, !2, !3:

!0 = (0, 0, 1)

!1 = (1, 0, 1)

!2 = (2, 1, 1)

!3 = (3, 3, 2).

Letting a = (1, 0), b2 = (2, 1), and c3 =.32 ,

32

/, we have the control points !0 = %"1, 1&, !1 = %a, 1&,

!2 = %b2, 1&, and !3 = %c3, 2&. One should figure out how the curve is traversed when t ranges from '* to+*. It is rather strange.

Page 12: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

608 CHAPTER 22. RATIONAL CURVES

It can be shown that the line y + x + 1 = 0 is an asymptote, and that the Folium of Descartes is alsodefined by the implicit equation

x3 + y3 ' 3xy = 0.

"1

a

b2

c3

Figure 22.6: Folium of Descartes

It is sometimes convenient to have an explicit formula giving the current point F (t) on a rational curvespecified as a BR-curve.

22.2 Rational Curves and Bernstein Polynomials

Let us assume that F is specified by the m+ 1 control points (!0, . . . , !m), and that I and J are the sets ofindices such that, I + J = {0, . . . ,m}, I , J = -, and for every i " I,

!i = %ai, wi&

is a weighted point, where ai " E and wi (= 0, and for every j " J ,

!j = uj

is a control vector. Then, with respect to the a!ne frame (0, 1) in A, the polynomial curve

B[!0, . . . , !m]:A # !E ,

defined (in !E) by the control points (!0, . . . , !m), also abbreviated as B[!], is given in terms of the Bernsteinpolynomials as

B[!](t) =0

0"i"m

Bmi (t) !i.

Page 13: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.2. RATIONAL CURVES AND BERNSTEIN POLYNOMIALS 609

Now, the above formula gives B[!](t) as a barycenter in !E , which, by lemma 4.1.2, can be expressed moreexplicitly. The explicit form of the barycenter depends on the quantity

w(t) =0

i#I

wiBmi (t).

If w(t) (= 0, then

B[!](t) =10

i#I

wiBmi (t)

w(t)ai +

0

j#J

Bmj (t)

w(t)uj, w(t)

2,

else if w(t) = 0, then

B[!](t) =0

i#I

wiBmi (t) ai +

0

j#J

Bmj (t)uj ,

where 0

i#I

wiBmi (t) ai =

0

i#I

wiBmi (t)bai

for any b " E , which, by lemma 2.4.1, is a vector independent of b.

Then, since F (t) = $(B[!](t)), we have the following:

Letting

w(t) =0

i#I

wiBmi (t),

if w(t) (= 0, then

F (t) =0

i#I

wiBmi (t)

w(t)ai +

0

j#J

Bmj (t)

w(t)uj,

else if w(t) = 0 and3

i#I wiBmi (t) ai +

3j#J Bm

j (t)uj (= 0, then

F (t) =

'0

i#I

wiBmi (t) ai +

0

j#J

Bmj (t)uj

(

$

,

else if w(t) = 0 and3

i#I wiBmi (t) ai +

3j#J Bm

j (t)uj = 0, then

F (t) = undefined.

In the third case, we can determine the value of F (t) by continuity.

Remark : If J = - and wi $ 0 for all i, 0 . i . m, then the trace F ([0, 1]) of F belongs to the convex hullof the points a0, . . . , am.

We close this section by discussing briefly the representation of the conics as rational curves, and someconvenient changes of parameters.

An ellipse of implicit equationx2

a2+

y2

b2= 1

has the parametric representation

x = a1' t2

1 + t2,

y = b2t

1 + t2.

Page 14: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

610 CHAPTER 22. RATIONAL CURVES

A hyperbola of implicit equationx2

a2' y2

b2= 1

has the parametric representation

x = a1 + t2

1' t2,

y = b2t

1' t2.

Of course, the parabola is a polynomial curve of degree 2. More generally, given a real conic defined by animplicit equation, if this conic is not empty (has some real point), taking any point on the conic as an origin,we can write its equation in the form

ax2 + bxy + cy2 + dx + ey = 0,

where a, b, c are not all null. Provided that d and e are not both null, we can find a rational parameterizationby intersecting the conic with the line of equation y = mx, namely

x ='em' d

cm2 + bm+ a,

y =m('em' d)

cm2 + bm+ a.

The case d = e = 0 is easily handled (we get a single point, a double line, or two intersecting lines). Fordetails on the conics as rational curves, we refer the reader to Fiorot and Jeannin [60], or Farin [58, 57].

Given a rational curve defined over [0,+*[ , or the entire real line A, it is sometimes useful to make achange of parameter to obtain a curve with the same trace, but parameterized over [0, 1]. In the first case,we can use the bijection

#(u) =$u

1' u,

with $ > 0, which is a strictly increasing function. By continuity, we let #(1) = *.

In the case of a curve parameterized over A, we can use one of the maps

%(u) =$(1 ' t)2 + 2&(1' t)t+ 't2

2t(1' t),

where $& < 0. Such a map is a bijection, strictly increasing when $ < 0, and strictly decreasing when $ > 0.Indeed,

%(u) =($ ' 2& + ')t2 + 2(& ' $)t+ $

2t(1' t),

and after some calculations, we can show that

%%(u) =(' ' 2$)t2 + 2$t' $

4t2(1' t)2.

To determine whether we can have(' ' 2$)t2 + 2$t' $ = 0

we compute the discriminant% = 4$2 + 4$(' ' 2$) = 4($' ' $2).

Thus, when $' < 0, the equation has no real roots, and we observe that %%(u) > 0 when $ < 0, and %%(u) < 0when $ > 0, which means that % is strictly increasing when $ < 0, and strictly decreasing when $ > 0.

Page 15: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.3. SUBDIVISION ALGORITHMS FOR RATIONAL CURVES 611

When $ < 0, it is easily verified that limu&0 %(u) = '*, and that limu&1 %(u) = +*. We can extend % so

that it becomes a map %: [0, 1] # "A, by letting %(0) = %(1) = *. Then, % is surjective, and a bijection on]0, 1[ .

By some appropriate changes of parameter, it is possible to parameterize an entire rational curve overthe interval [0, 1], but this may raise the degree of the curve. For example, the full circle can be obtained asa curve of degree four, see Fiorot and Jeannin [60]. A very simple an e#ective alternative not involving anychange of parameter will be presented in section 22.4.

We now consider generalizations of the de Casteljau algorithm to rational curves. This is actually quiteeasy.

22.3 Subdivision Algorithms for Rational Curves

There are two natural ways to extend the de Casteljau algorithm for polynomial curves to rational curves.The first method is to apply the de Casteljau algorithm in the homogenization !E of the a!ne space E , to findthe point G(t) on the polynomial curve G:A # !E specified by the sequence of control points (!0, . . . , !m) in!E , and then project G(t) onto "E using $, getting F (t) = $(G(t)). We just have to remember that when weperform linear interpolations, we must use the operations · and !+ of the vector space !E . It is also possible

that we get points at infinity when G(t) is a vector in'#E , or even that $(G(t)) is undefined, when G(t) = ",

the origin of !E . In this latter case, we can determine F (t) by continuity.

The second method is to use the isomorphism !": !E # F of lemma 4.3.2. We first map the sequenceof control points (!0, . . . , !m) in !E to the sequence of control points (T1, . . . , Tm) in F , where Ti = !"(!i),compute the point P (t) on the polynomial curve P = !"(G) in F from these control points, using the deCasteljau algorithm in F , and then project P (t) onto "E , using $) !"'1. The advantage of the second methodis that we only perform one division at the end. Although quite simple and e#ective in many cases, Farin [58]claims that this method is numericaly less stable when the weights of the control points vary significantly inmagnitude. This seems to contradict the statement made by Fiorot and Jeannin [60, 61], that the secondmethod is more stable! Clearly, more experimentation is needed!

We now present the first approach. The input is the sequence (!0, . . . , !m) of control points in !E . Weassume that we have initialized the variables !i, 0, such that !i, 0 = !i, for all i, 0 . i . m. The rationalversion of the de Casteljau algorithm is given below in pseudo-code.

beginfor j := 1 to m dofor i := 0 to m' j doif !i, j'1 = ui, j'1 thenif !i+1, j'1 = ui+1, j'1 then!i, j := (1 ' t)ui, j'1 + tui+1, j'1

else {!i+1, j'1 = %bi+1, j'1, wi+1, j'1&}wi, j := twi+1, j'1;

!i, j :=4bi+1, j'1 +

(1't)wi, j

ui, j'1, wi, j

5

endifelse {!i, j'1 = %bi, j'1, wi, j'1&}if !i+1, j'1 = ui+1, j'1 thenwi, j := (1' t)wi, j'1;

!i, j :=4bi, j'1 +

twi, j

ui+1, j'1, wi, j

5

else {!i+1, j'1 = %bi+1, j'1, wi+1, j'1&}

Page 16: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

612 CHAPTER 22. RATIONAL CURVES

wi, j = (1' t)wi, j'1 + twi+1, j'1 ;if wi, j = 0 then!i, j := (1 ' t)wi, j'1bi, j'1 + twi+1, j'1bi+1, j'1 {a vector}

else

!i, j :=4

(1't)wi, j!1

wi, jbi, j'1 +

twi+1, j!1

wi, jbi+1, j'1, wi, j

5

endifendif

endifendfor

endfor ;F (t) := $(!0, m)end

To be more specific, the result of the algorithm, F (t) = $(!0, m) " "E , is defined such that

$(!0,m) =

67

8

undefined if !0,m = 0;

(u0,m)$ if !0,m = u0,m, where u0,m " ('#E ' {0});

b0,m if !0,m = %b0,m, w0, m&, where b0,m " E , and w0,m (= 0.

Traditionally, most authors don’t bother dealing with points at infinity, which happens when !0,m = u0,m

is a vector in'#E . When !0,m = 0, it is possible to find F (t) by continuity.

We now give the second version of the de Casteljau algorithm, given an a!ne frame ("1, (e1, . . . , en)) forE , and the corresponding basis (e1, . . . , en, %"1, 1&) for !E .

beginfor i := 0 to m doif !i = %(x1, . . . , xn), w& thenbi, 0 := (wx1, . . . , wxn, w)

else {!i = (x1, . . . , xn)}bi, 0 := (x1, . . . , xn, 0)

endifendfor;for j := 1 to m dofor i := 0 to m' j dobi, j := (1' t)bi, j'1 + tbi+1, j'1

endforendfor ;let (y1, . . . , yn, w) = b0,m;if w = 0 thenif (y1, . . . , yn) (= 0 thenF (t) := (y1, . . . , yn)$

elseF (t) undefined

endifelse

F (t) :=

'y1

w , . . . , yn

w

(

endifend

Page 17: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.3. SUBDIVISION ALGORITHMS FOR RATIONAL CURVES 613

A weighted point %a, w&, where a is a point in E , is represented as %(x1, . . . , xn), w&, where (x1, . . . , xn) are

the coordinates of a " E , over the a!ne frame ("1, (e1, . . . , en)) of E , and a vector u " '#E , is represented as

(x1, . . . , xn), where (x1, . . . , xn) are the coordinates of the vector u, over the basis (e1, . . . , en) of'#E . Again,

the point F (t) on the rational curve may be a point at infinity, when w = 0.

Remark : Since it can be shown that projections preserve tangents, when !0 and !1 are weighted points!0 = %a0, w0&, !1 = %a1, w1&, if a0 (= a1, since (!0, !1) is the tangent to B[!] at !0, then (a0, a1) is the tangentto F at a0. A similar property holds for !m'1 and !m, when they are weighted points. Furthermore, when!0 = u0 is a control vector, and !1 = %a1, w1& is a weighted point, then the line parallel to u0 passing througha1 is an asymptote to the curve. Also, the de Casteljau algorithm gives the tangent to F at t, when it exists.For example, considering the first version of the de Casteljau algorithm, when !0, m'1 = %b0,m'1, w0, m'1&and !1,m'1 = %b1, m'1, w1,m'1& are weighted points and b0,m'1 (= b1,m'1, then (b0,m'1, b1,m'1) is thetangent to F at t. The reader can easily figure out how the second algorithm yields the tangent to F at twhen it exists.

Using the observation about a!ne interpolations in !E and cross-ratios in "E made after definition 5.8.4,we can give a geometric interpretation of the above versions of the de Casteljau algorithm. We give such aninterpretation for the first algorithm, but a similar interpretation is easily given for the second version (usingthe projection $ ) !"'1). The algorithm computes the weighted points !i, j in !E , according to the inductiveformula

!i, j = (1' t) · !i, j'1 !+ t · !i+1,j'1.

Thus, letting'i, j = !i, j'1 !+ !i+1, j'1,

we have the following cross-ratio

[p(!i, j'1), p(!i+1, j'1), p('i, j), p(!i, j)] =1' t

t,

for all j, 0 . j . m, and all i, 0 . i . m ' j. When !i+1, j'1 = %bi+1, j'1, wi+1, j'1& and !i, j'1 =%bi, j'1, wi, j'1&, assuming that wi, j = (1 ' t)wi, j'1 + twi+1, j'1 (= 0, and vi, j = wi, j'1 + wi+1, j'1 (= 0, wehave 'i, j = %gi, j , vi, j& and !i, j = %bi, j , wi, j&, where

gi, j =wi, j'1

wi, j'1 + wi+1, j'1bi, j'1 +

wi+1, j'1

wi, j'1 + wi+1, j'1bi+1, j'1,

and

bi, j =(1' t)wi, j'1

wi, jbi, j'1 +

twi+1, j'1

wi, jbi+1, j'1.

Then, we have

[bi, j'1, bi+1, j'1, gi, j , bi, j ] =1' t

t,

for all j, 0 . j . m, and all i, 0 . i . m ' j. This shows that bi, j is the unique point such that thecross-ratio of the points (bi, j'1, bi+1, j'1, gi, j , bi, j) is

1'tt .

Thus, we can say that the de Casteljau algorithm for polynomial curves computes points using ratios,whereas the de Casteljau algorithm for rational curves computes points using cross-ratios. When j = 1 and0 . i . m' 1, the points

gi = gi, 1 =wi

wi + wi+1bi +

wi+1

wi + wi+1bi+1

can be thought of as “shape parameters”. Indeed (up to a scalar), they determine the weights wi.

Figure 22.7 illustrates the computation of a point on a rational curve. We consider the quarter-circle Cof example 1, and compute the point C(1/2). Recall that the control points are !0 = %a, 1&, !1 = %b, 1&, and!2 = %c, 2&, where a = (1, 0), b = (1, 1), and c = (0, 1).

Page 18: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

614 CHAPTER 22. RATIONAL CURVES

a

bcc(1/2, 1) = ((1/3, 1), 3/2)

c(0, 1/2) = ((1, 1/2), 1)

C(1/2) = ((3/5, 4/5), 5/4)

Figure 22.7: Construction of the point C(1/2) on a quarter-circle

Using algorithm 2, we first determine c(0, 1/2) and c(1/2, 1), getting

c(0, 1/2) =

'1,

1

2, 1

(, c(1/2, 1) =

'1

2,3

2,3

2

(,

which by projection, yields the points

'1, 12

(and

'13 , 1

(. Finally, by interpolation between c(0, 1/2) and

c(1/2, 1), we get C(1/2) =

'34 , 1,

54

(, which by projection, yields the point

'35 ,

45

(. Note that the line

segment from c(0, 1/2) to c(1/2, 1) is the tangent to the circle at C(1/2).

It is easy to adapt the subdivision algorithm described for polynomial curves to the rational case. Thiscan be done in two ways. Either we subdivide in !E , getting polylines determined by weighted points in!E , and project these control points down on E using $. Some care must be exercised to avoid problemswith points at infinity. For a fairly complete treatment of this method, the reader is referred to Fiorot andJeannin [60, 61]. The second method, which we advocate since it seems simpler, is to use the isomorphism!": !E # F of lemma 4.3.2. Practically, what this means is that given a vector in !E expressed as

u = (x1, . . . , xn, w),

we have!"(u) = (wx1, . . . , wxn, w),

if w (= 0, and!"(u) = (x1, . . . , xn, 0),

if w = 0.

We can then apply the subdivision method of section 18.2, but in F . The following function send acontrol polygon consisting of points in !E to a control polygon of points in F .

(* Maps a polygon to the hat space by multiplying all coords except *)(* the weight, by the weight (for each point) *)

Page 19: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.3. SUBDIVISION ALGORITHMS FOR RATIONAL CURVES 615

prepare[{poly__}] :=Block[{lpoly = {poly}, newp = {}, pt, h, w, i, l1},l1 = Length[lpoly];Do[

pt = lpoly[[i]]; w = Last[pt]; h = Drop[pt, -1];If[w =!= 0, h = w * h; pt = Append[h, w]];

newp = Append[newp,pt], {i, 1, l1}];

newp];

Once a list of control polygons (in F) has been computed using subdivision, it is necessary to map thesecontrol polygons down to the original a!ne space E . This is performed by the function proj such that,

proj[(x1, . . . , xn, w)] = (x1/w, . . . , xn/w),

if w (= 0,proj[(x1, . . . , xn, 0)] = (x1, . . . , xn),

if some xi (= 0, which corresponds to a point at infinity, and

proj[(0, . . . , 0, 0)] = undefined.

Concretely, we have to be careful in dividing by w when |w| is very close to zero, since due to limitednumerical precision, this may cause a division by zero. Thus, we only perform division when |w| > 10'20,and we give a warning if |w| . 10'16. Another problem is that a vector (x1, . . . , xn, w) may be very close tothe zero vector. Thus, we use a function to test whether a vector is near zero, in which case this vector isignored. This situation does occur in practice. For example, a torus is a surface of degree 4, but it containscircles which are of degree 2. When we use our algorithm to compute the control net of a circle on a torus,we get a control polygon of degree 4 with two degenerate zero entries. Actually, in the case of curves, it is nota problem to discard zero vectors (due to continuity), except that it may be necessary to iterate subdivisionto get a better approximation. The following Mathematica functions implement these ideas.

(* checks to see whether a vector is almost a zero vector *)

nearzero[a_] := Block[{stop, i, d, l},l = Length[a]; i = 1; stop = 1;While[stop === 1 && i <= l,

d = a[[i]];If[Abs[d] < 10^(-16), i = i + 1, stop = 0];];

If[stop === 1, Print["*** Warning, Near Zero Vector: ", a, " ***"]];stop

];

(* To project a point in the hat space back ontothe affine space *)

Page 20: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

616 CHAPTER 22. RATIONAL CURVES

aproj[{poly__}] :=Block[{pt = {poly}, res, h, w},w = Last[pt]; h = Drop[pt, -1];

If[Abs[w] > 10^(-20),If[Abs[w] <= 10^(-16),

Print["Warning: Point with very smallweight: ", pt]]; h = h/w,

h = 10^(20) * h; Print["*** Warning: Point atinfinity!: ", pt, " ***"]];

h];

(* To project a list of points in the hat space back ontothe affine space *)

(* points in the hat space which are almost the zero vectorare discarded *)

proj[{poly__}] :=Block[{sl = {poly}, np = {}, pt, h, j, l2, flag},

l2 = Length[sl];Do[

pt = sl[[j]]; flag = nearzero[pt];(* If pt is almost the zero vector, discard *)If[flag =!= 1, h = aproj[pt]; np = Append[np,h]], {j, 1, l2}

];np

];

(* To project a list of control polygons in the hat space *)(* back onto the affine space *)

projlis[{netlis__}] :=Block[{slis = {netlis}, newlis = {},anet, newnet, j, l2},

l2 = Length[slis];Do[

anet = slis[[j]]; newnet = proj[anet];newlis = Append[newlis,newnet], {j, 1, l2}

];newlis];

In order to display a curve segment using the subdivision function subdiv, use the following functions:

Page 21: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.4. APPROXIMATING CLOSED RATIONAL CURVES 617

(* Projects down the list of control polygons from the hat space *)(* onto the affine space, and creates the polyline. *)

tolineseg[{poly__}] :=Block[{pol = {poly}, res, newsl},(newsl = projlis[pol];res = makedgelis[newsl];res)];

(* To display the result of n steps of subdivision *)(* curve segment over [r, s] *)

showsub2D[{poly__},r_,s_,lx_,mx_,ly_,my_,n_] := Block[{pol1, curv},

pol1 = prepare[{poly}];curv = subdiv[pol1, r, s, n];curv = tolineseg[curv];Show[Graphics[curv],AspectRatio -> Automatic,PlotRange -> {{lx, mx}, {ly, my}},DisplayFunction -> $DisplayFunction]

];

The purpose of the parameters lx, mx, ly, my, is to define the size of the viewing window, which is[lx,mx]/ [ly,my]. We will now present a new method for approximating closed rational curves.

22.4 Approximating Closed Rational Curves

A common problem is to draw a closed rational curve. As usual, we assume that our curves are definedin some ambient a!ne space E of dimension at least 2. In order to explain the basic intuition behind themethod presented in this Chapter as clearly as possible, we first consider rational curves specified explictlyin terms of rational functions (as opposed to control points). For example, consider the following rationalcurve of degree 8 (a rose, see section 22.5) specified by the fractions

x =t(7' 35t2 + 21t4 ' t6)

(t2 + 1)4,

y =t2(7' 35t2 + 21t4 ' t6)

(t2 + 1)4.

The problem is that no matter how large the interval [r, s] is, the trace F ([r, s]) of F over [r, s] is not thetrace of the entire curve. In this particular example we could take advantage of symmetries, but in general,this may not be possible. There are rational bijections between ]' 1, 1[ and R, for example, the map

t 0# t

1' t2,

Page 22: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

618 CHAPTER 22. RATIONAL CURVES

but they are at least quadratic, and cause the degree of the curve to be doubled, leading to ine!ciency.Furthermore, if the curve is specified in terms of control points, it is rather complicated and expensive tocompute the control points of the curve obtained after the change of variable.

A nice way to get around these problems is to observe that the function t 0# 1t maps ]0, 1] bijectively onto

[1,+*[, and maps ['1, 0[ bijectively over ] '*,'1]. Thus, if we perform the change of variable t = 1/u,we get

x =u(7u6 ' 35u4 + 21u2 ' 1)

(u2 + 1)4,

y =7u6 ' 35u4 + 21u2 ' 1

(u2 + 1)4,

whose trace is identical to the trace of the curve F , but whose trace over ['1, 1] is the complement of thetrace of F over ['1, 1]. In particular, note that G(0) corresponds to F (*) = (0,'1). The method is general:given the fractions Q1(t) and Q2(t) defining F , we obtain the curve G by substituting 1/t for t in Q1 and Q2,getting the fractions R1(t) = Q1(1/t) and R2(t) = Q2(1/t), and we render F and G over ['1, 1] to renderthe entire trace of the curve F .

However, the above method assumes that the fractions defining the curve F are given explicitly. If therational curve F is given by control points, it is necessary to first compute the fractions defining F , performthe substitution of 1/t for t, and then compute the control points for G. This is obviously a lot of work, andit may be computationally expensive.

Fortunately, there is a very simple (and cheap) way of getting the control points of G from the controlpoints of F . Indeed, if (&0, . . . ,&m) are the control points (in !E) of the BR-curve F w.r.t. the a!ne frame('1, 1), the control points (!0, . . . , !m) (in !E) of the BR-curve G w.r.t. ('1, 1) are given by the equations

!i = ('1)i &i.

Actually, it turns out that the above formula is valid for every a!ne frame (r, s)!

The upshot is that in order to render the entire trace of the curve F (over ['*,+*]), we just have torender both F and G over [r, s]. The frame ('1, 1) is just a special case (and so is (0, 1), a frame often used).

We will prove the correctness of the above formula using a simple geometric argument about ways ofpartitioning the real projective line into two disjoint segments. We will also show that other known methodsfor drawing rational curves can be justified using the above geometric argument.

The fact that the “complementary part” of a conic specified by three control points ((b0, w0), (b1, w1), (b2,w2)) is defined by the control points ((b0, w0), (b1,'w1), (b2, w2)) where the sign of the middle weight isflipped, has been shown by Lee [111] and Patterson [135]. Our result is a natural generalization to rationalcurves of arbitrary degree. Other methods for drawing closed rational curves have been investigated by Bajajand Royappa [7], and by DeRose [45], who credits Patterson [135] for the original idea behind the method.We will compare these methods with ours after proving the correctness of our method.

We now show how the formula!i = ('1)i &i

is derived.

Recall that if F : "A # "E is a rational curve of degree m specified by some symmetric multilinear mapf : (!A)m # !E such that

F ([t, z]) = P(f)([t, z], . . . , [t, z]# $% &m

)

Page 23: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.4. APPROXIMATING CLOSED RATIONAL CURVES 619

for all [t, z] " "A, the control points (&0, . . . ,&m) of the BR-curve G w.r.t. the a!ne frame (r, s) are given bythe equations

&i = f(r, . . . , r# $% &m'i

, s, . . . , s# $% &i

).

Since "A = RP1, a rational curve is a map F :RP1 # "E with domain the real projective line RP1, andto draw the entire trace of the curve F over RP1, we can partition RP1 into closed intervals I0, . . . , Ip(intersecting only at boundary points) and find some simple projectivities %1, . . . ,%p of RP1 such that%i(I0) = Ii (1 . i . p). The simplest case arises when p = 2, and we described a way of partitioning RP1

where I0 = ['1, 1], I1 = RP1']' 1, 1[, and the projectivity %1:RP1 # RP1

%1: t 0#1

t

is induced by the linear map (u, v) 0# (v, u).

Now, recall from Chapter 5, Section 5.2, that the real projective line RP1 is obtained by identifyingantipodal points on the circle S1. However, up to homeomorphism, we can view RP1 as the result ofidentifying antipodal points on any closed convex polygon with central symmetry inscribed in the circle.Requiring central symmetry is not indispensible, but makes life easier since pairs of antipodal vertices areidentified. The simplest convex polygons of this type are rectangles and squares. Thus, we obtain all thepartitions of RP1 into two disjoint segments by projecting an inscribed rectangle (or square) onto some linenot passing through the center, from the center of the circle. For instance, the case where I0 = ['1, 1]corresponds to a square, as illustrated in figure 22.8.

Case 1: I0 = ['1, 1].

a b

'a'b

O

H

Figure 22.8: Model of the projective line, Case 1: I0 = ['1, 1]

In this case, the line of projection H (of equation y = 1) contains an edge of the square (here (a, b)).Actually, this case applies to any a!ne frame ('s, s), where s (= 0. Letting a = ('s, 1) and b = (s, 1), it istrivial to verify that the linear map

(u, v) 0#9sv,

u

s

:

inducing the projectivity %1 is the unique linear map such that

%1(a) = 'a, %1(b) = b.

Page 24: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

620 CHAPTER 22. RATIONAL CURVES

The points (a, b,'a,'b) are the vertices of the inscribed square, and %1 maps the top edge (a, b) of thesquare onto the right edge ('a, b). When a line L through the origin and passing through a point of theedge ('a, b) varies, the intersection of L with the line H varies in %1(['s, s]).

We are now ready to tackle the general case.

Case 2: I0 = [r, s].

Given any a!ne frame (r, s) (where r < s), we let the line H of equation y = 1 be the line of projection,we let a = (r, 1) and b = (s, 1) (points on H), and we define a rectangle (c, b,'c,'b) inscribed in the circleC of center O = (0, 0) and of radius R =

1s2 + 1 (so that b is on C), and a projectivity %:RP1 # RP1, as

follows: c is the point on the upper half-circle defined as the intersection of the line (O, a) with C, and % isthe projectivity induced by the unique linear map such that

%(a) = 'a, %(b) = b.

Figure 22.9 illustrates the case where a is inside the circle.

c

'c

b

'b

a

'a

O

H

Figure 22.9: Model of the projective line, Case 2: I0 = [r, s]

The rational curve G whose trace over [r, s] is equal to the trace of F over %([r, s]) is defined as follows.

Definition 22.4.1 For every a!ne frame (r, s) (r < s) and every rational curve F :RP1 # "E of degree mspecified by some symmetric multilinear map f : (!A)m # !E , the rational curve G is specified by the symmetric

multilinear map g: (!A)m # !E such that

g((t1, z1), . . . , (tm, zm)) = f(%(t1, z1), . . . ,%(tm, zm)),

where % is the projectivity defined earlier.

Note that the point F (*) corresponding to the point at infinity in RP1, is given by G((0, 1)). It shouldalso be noted that it is quite possible that

f((t, z), . . . , (t, z)# $% &m

) = 0

for some (t, z) (= (0, 0). In such a case, we have what is called a base point . This corresponds to thesituation where the polynomials F1(t), . . . , Fn+1(t) vanish simultaneously. Such situations arise in practice,for example after degree-raising. Another more devious situation where base points arise is when computing

Page 25: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.4. APPROXIMATING CLOSED RATIONAL CURVES 621

control nets of curves on rational surfaces, for example, a torus. We discovered this situation in drawing atorus in terms of u-curves and v-curves. Fortunately, in the case of curves, there is a simple remedy. Indeed,it is easy to justify using continuity and the fact that if polynomials in one variable vanish simultaneously,then they have a greatest common divisor, that bad points of the form 0 = (0, . . . , 0# $% &

n+1

) can simply be discarded.

The price to pay is that it may be necessary to subdivide more in order to retain a proper level of visualsmoothness.

Lemma 22.4.2 For every a!ne frame (r, s) (r < s) and every rational curve F :RP1 # "E of degree mspecified by some symmetric multilinear map f : (!A)m # !E, if g: (!A)m # !E is the symmetric multilinear mapof definition 22.4.1, except for base points, F and G have the same trace. In particular, the trace G([r, s]) isthe union of the traces F (['*, r]) and F ([s,+*]). Furthermore, if (&0, . . . ,&m) are the control points (in!E) of F w.r.t. the a!ne frame (r, s), the control points (!0, . . . , !m) (in !E) of the curve G w.r.t. (r, s) aregiven by the equations

!i = ('1)i &i.

Proof . We haveg((t1, z1), . . . , (tm, zm)) = f(%(t1, z1), . . . ,%(tm, zm)),

and thusP(g)([t1, z1], . . . , [tm, zm]) = P(f)([%(t1, z1)], . . . , [%(tm, zm)]).

Now, since % is a bijection from [r, s] to RP1' ]r, s[ , F and G have the same trace, and the trace G([r, s]) isthe union of the traces F (['*, r]) and F ([s,+*]). Finally, the control points !i of G w.r.t. (r, s) are givenby

!i = g(a, . . . , a# $% &m'i

, b, . . . , b# $% &i

),

and sinceg((t1, z1), . . . , (tm, zm)) = f(%(t1, z1), . . . ,%(tm, zm)),

%(a) = 'a, and %(b) = b, we get !i = f('a, . . . ,'a# $% &m'i

, b, . . . , b# $% &i

), that is

!i = ('1)m'if(a, . . . , a# $% &m'i

, b, . . . , b# $% &i

) = ('1)m'i &i.

However, the points ('1)m'i &i and ('1)i &i have the same projection under $, so we might as well use thesimpler expression ('1)i &i.

Remark . The above proof has the advantage that it does not require an explicit computation of theprojectivity %, but of course, an explicit formula for % can be found. The projectivity % is induced by thelinear map

(t, z) 0#'(s+ r)t

s' r' 2rsz

s' r,

2t

s' r' (s+ r)z

s' r

(,

so that

%(t) =(s+ r)t' 2rs

2t' (s+ r).

If we recall that the Bernstein polynomials of degree m over [r, s] are given by

Bmi [r, s](t) =

'mi

('s' t

s' r

(m'i' t' r

s' r

(i

,

Page 26: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

622 CHAPTER 22. RATIONAL CURVES

it is easily shown that under the change of variable %, we get

s' %(t)s' r

= ' s' t

2t' (s+ r), and

%(t)' r

s' r=

t' r

2t' (s+ r).

Noting the presence of the minus sign in the first expression, we get

Bmi [r, s](%(t)) =

('1)m'i(s' r)m

(2t' (s+ r))m

'mi

('s' t

s' r

(m'i' t' r

s' r

(i

,

that is

Bmi [r, s](%(t)) =

('1)m'i(s' r)m

(2t' (s+ r))mBm

i [r, s](t).

From this and the fact that a rational curve F can be expressed as

F (t) =m0

i=0

wiBmi [r, s](t)

w(t)bi,

where we assumed that the control points are of the form %bi, wi& (with wi (= 0) and where

w(t) =m0

i=0

wiBmi [r, s](t),

we get

F (%(t)) =m0

i=0

('1)m'iwiBmi [r, s](t)

w(%(t))bi,

where

w(%(t)) =m0

i=0

('1)m'iwiBmi [r, s](t),

and we obtain another proof our result (since we can multiply both the numerator and the denominator by('1)m+2i = ('1)m, getting weights of the form ('1)iwi). Note that the above proof does not account forcontrol vectors, but this can be done too. Of course, we prefer the geometric proof of Lemma 22.4.2 to thismore computational proof, which, in our opinion, obsures what’s really going on!

Lemma 22.4.2 shows that F and G have the same trace. It also shows that if the control points (in !E) ofF w.r.t. (r, s) are (&0, . . . ,&m), if &i is of the form (a, w), where a is a point in E and w (= 0 is a weight, then

!i = (a, ('1)iw),

and if &i is a control vector u " '#E , then!i = ('1)i u.

The upshot is that in order to render the entire trace of the curve F (over ['*,+*]), it is enough to renderboth F and G over [r, s], and the computation of the control points of G from those of F over (r, s) is verysimple. For example, in the case of the ellipse F specified by the fractions

x(t) =4t

1 + t2,

y(t) =t2 ' 3t+ 2

1 + t2,

Page 27: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.4. APPROXIMATING CLOSED RATIONAL CURVES 623

the control points w.r.t. ('1, 1) are

&0 = (('2, 3), 2), &1 = ((0, 1), 0), &2 = ((2, 0), 2),

where &1 is a control vector, and the control points !0, !1, !2 are

!0 = (('2, 3), 2), !1 = ((0,'1), 0), !2 = ((2, 0), 2).

Bajaj and Royappa have investigated another method for drawing closed rational curves (and moregenerally, rational varieties) [7]. Their method is based on the observation that the maps #1: t 0# t

1't and

#2: t 0# 't1't map [0, 1 [ bijectively onto [0,+* [ and [0,'* [ respectively. There is a simple geometric

explanation for the choice of their projectivities. This case corresponds to a square and to the choice wherethe line of projection H (of equation y = 1) passes through a vertex and is perpendicular to one of the maindiagonals of the square as shown in figure 22.10.

a

'a

b'bO

cH

Figure 22.10: Model of the projective line, Case 3

However, Bajaj and Royapa do not consider the problem of computing the control points of the curves

F

't

1't

(and F

''t1't

(. This can be done, but the resulting method is more complicated than ours. This is

because the projectivities #1 and #2 do not map c = (1, 1) to an already existing vertex.

Another method for drawing rational curves is due to DeRose [45]. Basically, the method consists in

using the homogeneous Bernstein polynomials

'mk

(ukvm'k and to view a rational curve as a rational map

from the projective line. Then, by using any 2D model of the projective line, it is possible to draw a closedrational curve in one piece. The model used by DeRose is the C0-continuous curve in A2 defined such thatt 0# (t, 1' |t|) over ['1, 1]. This curve is a model of the projective line in R2 (identifying the points ('1, 0)and (1, 0)). In fact, this corresponds to Case 3 above! We can draw the closed rational curve F in a singlepiece as the trace of F ([u, 1' |u|]).

The advantage of DeRose’s method is that it does not require a new control polygon, as in our method(although, computing this new control polygon is very simple, as we showed). The disadvantage is that itrequires sampling some model of the projective line, and that the subdivision version of the standard DeCasteljau algorithm cannot be used. Futher computer experimentation seems needed to compare the twomethods.

Page 28: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

624 CHAPTER 22. RATIONAL CURVES

The Mathematica function computing the control polygon ! (in the hat space) from the original controlpolygon (in the hat space) is shown below.

(* computes the weights of the complementary part of a closed *)(* curve, i.e. the part corresponding to t outside ]r, s[ *)

negpoly[{poly__}] :=Block[{cpoly = {poly}, l1, i, pol, pt, w, h},

pol = {}; l1 = Length[cpoly];Do[ pt = cpoly[[i]];

If[OddQ[l1 - i], pt = -pt];pol = Prepend[pol, pt], {i, 1, l1}

];pol];

Finally, we can render a closed rational curve using the following functions. The function rendclo2D isgiven in the 2D case, but the 3D case is just as easy.

(* To create a list of line segments from a list of control polygons *)makedgelis[{poly__}] :=Block[{res, sl, newsl = {poly},i, j, l1, l2},(l1 = Length[newsl]; res = {};Do[sl = newsl[[i]]; l2 = Length[sl];Do[If[j > 1, res = Append[res, Line[{sl[[j-1]], sl[[j]]}]]], {j, 1, l2}

], {i, 1, l1}];

res)];

(* Projects down the list of control polygons from the hat space *)(* onto the affine space, and creates the polyline. *)

tolineseg[{poly__}] :=Block[{pol = {poly}, res, newsl},(newsl = projlis[pol];res = makedgelis[newsl];res)];

(* computes the control polygon for display. *)(* Control vectors cause extra trouble *)

Page 29: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.4. APPROXIMATING CLOSED RATIONAL CURVES 625

controlfig2D[{poly__}] :=Block[{p = {poly}, polylin, cpoly, cvec, cpt, conpt, res,totnum, nodenum, ptnum, vecnum, w, i, n, pt, orig = 1},n := Length[p];polylin = {}; cpoly = {}; cvec = {}; cpt = {}; conpt = {};totnum = 0; nodenum = 0; ptnum = 0; vecnum = 0;Do[w := Last[p[[i]]];

If[w === 0, pt = Drop[p[[i]],-1] + orig;cvec = Append[cvec, Line[{{orig, orig}, pt}]];pt = pt + {0.1,0};cvec = Append[cvec, Text["v", pt, {-1,0}]];vecnum = vecnum + 1;If[nodenum > 1, polylin = Append[polylin, Line[cpoly]];

totnum = totnum + 1; nodenum = 0; cpoly = {}, nodenum = 0; cpoly = {}]

,pt = Drop[p[[i]],-1];cpt = Append[cpt, Point[pt]];ptnum = ptnum + 1;cpoly = Append[cpoly, pt];nodenum = nodenum + 1

], {i, 1, n}];

If[nodenum > 1, polylin = Append[polylin, Line[cpoly]];totnum = totnum + 1; nodenum = 0; cpoly = {}

, nodenum = 0; cpoly = {}];If[cvec =!= {}, cvec = Append[cvec, Point[{orig,orig}]]];conpt = Prepend[cpt, PointSize[0.01]];res = Join[conpt,cvec,polylin]; res = Prepend[res, RGBColor[0,1,0]];res];

(* rfig2 works as controlfig2D, except that it keeps track of the list *)(* of weights in wll, and appends it as second argument *)

rfig2D[{poly__}] :=Block[{p = {poly}, polylin, cpoly, cvec, cpt, conpt, res,totnum, nodenum, ptnum, vecnum, w, i, n, pt, wll, orig = 1},n := Length[p];polylin = {}; cpoly = {}; cvec = {}; cpt = {}; conpt = {}; wll = {};totnum = 0; nodenum = 0; ptnum = 0; vecnum = 0;Do[w := Last[p[[i]]]; wll = Append[wll, w];

If[w === 0, pt = Drop[p[[i]],-1] + orig;cvec = Append[cvec, Line[{{orig, orig}, pt}]];pt = pt + {0.1,0};cvec = Append[cvec, Text["v", pt, {-1,0}]];vecnum = vecnum + 1;If[nodenum > 1, polylin = Append[polylin, Line[cpoly]];

Page 30: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

626 CHAPTER 22. RATIONAL CURVES

totnum = totnum + 1; nodenum = 0; cpoly = {}, nodenum = 0; cpoly = {}]

,pt = Drop[p[[i]],-1];cpt = Append[cpt, Point[pt]];ptnum = ptnum + 1;cpoly = Append[cpoly, pt];nodenum = nodenum + 1

], {i, 1, n}];

If[nodenum > 1, polylin = Append[polylin, Line[cpoly]];totnum = totnum + 1; nodenum = 0; cpoly = {}

, nodenum = 0; cpoly = {}];If[cvec =!= {}, cvec = Append[cvec, Point[{orig,orig}]]];conpt = Prepend[cpt, PointSize[0.01]];res = Join[conpt,cvec,polylin]; res = Prepend[res, RGBColor[1,0,0]];res = Append[res, wll];res];

(* projects control polygon in hat space back onto affine space *)(* keeps the weights *)

newpoly[{cpoly__}, r_, s_, l_, m_] :=Block[{res = {cpoly}, l1, i, npt, pt, newpt, w},l1 = Length[res]; newp = {};Do[w = Last[res[[i]]]; pt = Drop[res[[i]],-1];If[w =!= 0, pt = pt/w; npt = Append[pt, w], npt = res[[i]]];newp = Append[newp, npt], {i, 1, l1}];

newp];

(* to display a closed rational 2D curve. *)(* If flagpol =!= 1, do not display control polygon *)(* If flagpol === -1, show original arc in black,

and dual arc in red *)

rendclo2D[{poly__},r_,s_,lx_,mx_,ly_,my_,flagpol_,n_] :=Block[{cpoly = {poly}, np1, np2, npol1, npol2, wl1, wl2, l, m, pol,curv1, curv2, pol1, pol2, image},

l = -1; m = 1;(* maps control poly to hat space *)

pol1 = prepare[cpoly];(* computes control polygon wrt [-1, 1] *)

np1 = newcpoly[pol1, r, s, l, m];(* projects down to affine space *)

npol1 = newpoly[np1, r, s, l, m];

Page 31: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.4. APPROXIMATING CLOSED RATIONAL CURVES 627

npol1 = rfig2D[npol1];wl1 = Last[npol1]; npol1 = Drop[npol1,-1];Print["Weights: ", wl1];Print["New Cont. Poly.: ", np1];

(* computes dual control polygon *)pol2 = negpoly[np1];np2 = newpoly[pol2, r, s, l, m];npol2 = rfig2D[np2];wl2 = Last[npol2]; npol2 = Drop[npol2,-1];Print["Dual Weights: ", wl2];Print["Dual Cont. Poly.: ", pol2];

(* subdivides *)curv1 = subdiv[np1, l, m, n];curv1 = tolineseg[curv1];Print["First curve segment done! "];curv2 = subdiv[pol2, l, m, n];curv2 = tolineseg[curv2];Print["Second curve segment done! "];Print["Ready to display! "];If[flagpol === 1,

image = {controlfig2D[{poly}], npol1, curv1,{RGBColor[1,0,0], curv2}},If[flagpol === -1,

image = {curv1, {RGBColor[1,0,0], curv2}},image = {curv1, curv2}

]];Show[Graphics[{image}],AspectRatio -> Automatic,PlotRange -> {{lx, mx}, {ly, my}},DisplayFunction -> $DisplayFunction];

];

The procedure rendclo2D assumes that it is given a control polygon over the a!ne frame (0, 1), and itcomputes a new control polygon over ('1, 1). It is very easy to modify this procedure so that it takes asinput a control polygon over any frame (r, s), omitting the computation of the new control polygon w.r.t.the frame ('1, 1). It is also immediate to write output procedures for the 3D case.

The method is illustrated in Figure 22.11 on the quartic given by the following control polygon w.r.t(0, 1):

inpol = {{0,0,1},{2,6,1},{6,8,2},{10,4,1},{10,0,1}}

In this example, we did not compute a new control polygon w.r.t. ('1, 1).

A remarkable feature of our method is that it works even for nonclosed rational curves with branchesgoing to infinity. Indeed, what happens is that Mathematica clips the parts of the curve outside of theviewing window! For example, Figure 22.12 shows the cubic given by the following control polygon over(0, 1) :

inpol = {{0,0,1}, {2,6,1}, {6,8,2}, {10,0,1}}

In the above example, a new control polygon over ('1, 1) was computed. More examples are given inthe next section.

Page 32: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

628 CHAPTER 22. RATIONAL CURVES

Figure 22.11: A Closed Quartic

Page 33: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.4. APPROXIMATING CLOSED RATIONAL CURVES 629

Figure 22.12: A Cubic with Asymptote

Page 34: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

630 CHAPTER 22. RATIONAL CURVES

22.5 A “Gallery” of Rational Curves

The purpose of this section is to illustrate the power and flexibility of the method of the previous section,as well as take a stroll in a small gallery of the immense museum of rational curves. We wish you a happystroll.

It will become clear that polarizing polynomials and computing control polygons by hand is very painful.Thus, we wrote Mathematica programs doing this, and we urge the readers to do the same.

We begin with a classic, known as the “Lemniscate of Bernoulli”,

Example 1. The “Lemniscate of Bernoulli” is a quartic defined by the polynomials

G1(X) = X +X3

G2(X) = X 'X3

G3(X) = 1 +X4.

We get the polar forms

g1(X1, X2, X3, X4) =X1 +X2 +X3 +X4

4+

X1X2X3 +X1X2X4 +X1X3X4 +X2X3X4

4

g2(X1, X2, X3, X4) =X1 +X2 +X3 +X4

4' X1X2X3 +X1X2X4 +X1X3X4 +X2X3X4

4g3(X1, X2, X3, X4) = 1 +X1X2X3X4.

With respect to the a!ne frame (0, 1) in A, we get the following five control points !0, !1, !2, !3, !4:

!0 = (0, 0, 1)

!1 =

'1

4,1

4, 1

(

!2 =

'1

2,1

2, 1

(

!3 =

'1,

1

2, 1

(

!4 = (2, 0, 2).

Letting a3 =.14 ,

14

/, a4 =

.12 ,

12

/, a5 =

.1, 12

/, and a = (1, 0), we have the control points !0 = %"1, 1&,

!1 = %a3, 1&, !2 = %a4, 1&, !3 = %a5, 1&, and !4 = %a, 2&. When t " [0, 1], the point F (t) = $(G(t)) travels onthe curve segment between the origin and a (a fourth of the curve).

"1

a3

a4 a5

a

Figure 22.13: Lemniscate of Bernoulli

Page 35: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.5. A “GALLERY” OF RATIONAL CURVES 631

The Lemniscate of Bernoulli is also defined by the implicit equation

(x2 + y2)2 ' (x ' y)(x+ y) = 0.

Example 2. Consider the following rational quartic

G1(t) = t(3 ' t2),

G2(t) = t2(3' t2),

G3(t) = (1 + t2)2.

The implicit equation of the above quartic is

(x2 + y2)2 ' 3x2y + y3 = 0.

If we parameterize the curve in terms of u = 1/t, we get

G1(u) = u(3u2 ' 1),

G2(u) = 3u2 ' 1,

G3(u) = (1 + u2)2.

The curve displayed in Figure 22.14 looks like a three-leafed rose.

Page 36: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

632 CHAPTER 22. RATIONAL CURVES

Figure 22.14: A three-leafed rose (quartic)

The curve is invariant under a rotation by 2(/3. We leave as exercise to show that the control polygonw.r.t. (0, 1) is

cpoly = {{0, 0, 1}, {3/4, 0, 1}, {9/8, 3/8, 4/3},{1, 3/4, 2}, {1/2, 1/2, 4}}

The next four examples show some pretty and perhaps surprising curves. The details of the constructionof these curves are left as instructive exercises.

Example 3. Consider the following rational curve of degree 6:

G1(t) = 4t(1' t2)2,

G2(t) = 8t2(1 ' t2),

G3(t) = (1 + t2)3.

The curve shown in Figure 22.15 looks like a four-leafed rose.

Page 37: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.5. A “GALLERY” OF RATIONAL CURVES 633

Figure 22.15: A four-leafed rose (sextic)

The implicit equation of the above sextic is

(x2 + y2)3 = 4x2y2,

and its control polygon w.r.t. (0, 1) is

cpoly = {{0, 0, 1}, {2/3, 0, 1}, {10/9, 4/9, 6/5},{1, 1, 8/5}, {4/9, 10/9, 12/5}, {0, 2/3, 4}, {0, 0, 8}}

Example 4. Consider the following rational curve of degree 6:

G1(t) = t(5 ' 10t2 + t4),

G2(t) = t2(5' 10t2 + t4),

G3(t) = (t2 + 1)3.

The implicit equation of the above sextic is

(x2 + y2)3 ' 5x4y + 10x2y3 ' y5 = 0,

and its control polygon w.r.t. (0, 1) is

Page 38: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

634 CHAPTER 22. RATIONAL CURVES

cpoly = {{0, 0, 1}, {2/3, 0, 1}, {10/9, 4/9, 6/5},{1, 1, 8/5}, {4/9, 10/9, 12/5}, {0, 2/3, 4}, {0, 0, 8}}

The curve looks like a five-leafed rose.

Figure 22.16: A five-leafed rose (sextic)

Example 5. Consider the following rational curve of degree 8:

G1(t) = t(7' 35t2 + 21t4 ' t6),

G2(t) = t2(7' 35t2 + 21t4 ' t6),

G3(t) = (t2 + 1)4.

The implicit equation of the above curve is

(x2 + y2)4 ' 7x6y + 35x4y3 ' 21x2y5 + y7 = 0,

and its control polygon w.r.t. (0, 1) is

Page 39: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.5. A “GALLERY” OF RATIONAL CURVES 635

cpoly = {{0, 0, 1}, {7/8, 0, 1}, {49/32, 7/32, 8/7}, {7/5, 21/40, 10/7},{35/68, 35/68, 68/35}, {-21/40, 0, 20/7}, {-35/32, -21/32, 32/7},{-1, -7/8, 8}, {-1/2, -1/2, 16}}

The curve looks like a seven-leafed rose.

Figure 22.17: A seven-leafed rose

Observant readers may have noticed a common pattern in the equations defining the previous roses.Indeed, we leave as an exercise (nontrivial) to show that these roses are examples of the curves defined inpolar coordinates by

) = sinn!.

Example 6. Consider the following rational curve of degree 6:

G1(t) = (1' t2)(1 ' 14t2 + t4),

G2(t) = 4t(1' t2)(1 + t2),

G3(t) = (1 + t2)3.

Page 40: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

636 CHAPTER 22. RATIONAL CURVES

We leave as exercise to show that the control polygon w.r.t. (0, 1) is

cpoly = {{1, 0, 1}, {1, 2/3, 1}, {0, 10/9, 6/5}, {-5/4, 5/4, 8/5},{-5/3, 10/9, 12/5}, {-1, 2/3, 4}, {0, 0, 8}}

The curve looks as follows:

Figure 22.18: A Lissajous curve

We leave as exercise to show that the curve is also defined parametrically by

x(u) = cos 3u,

y(u) = sin 2u.

It is a “Lissajous” curve. Such curves occur in dynamics when considering the small oscillations of a particlewith two degrees of freedom. Specifically, these curves are integral curves of the system of second-orderdi#erential equations

x1 = 'x1,

x2 = '*2x2.

We now give a three-dimensional example.

Page 41: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.6. PROBLEMS 637

Example 7. We consider the intersection of the cylinder of equation

X2 +

'Y ' 1

2

(2

=1

4,

with the sphere of equationX2 + Y 2 + Z2 = 1.

The resulting curve, called the “Viviani window”, looks like a bent figure-eight in space, whose projectionon the plane Z = 0 is a circle! It is defined by the polynomials

G1(X) = 2X ' 2X3

G2(X) = 4X2

G3(X) = 1'X4

G4(X) = (1 +X2)2.

We get the polar forms

g1(X1, X2, X3, X4) =X1 +X2 +X3 +X4

2' X1X2X3 +X1X2X4 +X1X3X4 +X2X3X4

2

g2(X1, X2, X3, X4) =2(X1X2 +X1X3 +X1X4 +X2X3 +X2X4 +X3X4)

3g3(X1, X2, X3, X4) = 1'X1X2X3X4

g4(X1, X2, X3, X4) = 1 +X1X2 +X1X3 +X1X4 +X2X3 +X2X4 +X3X4

3+X1X2X3X4.

With respect to the a!ne frame (0, 1) in A, we leave as an exercise to show that the five control points!0, !1, !2, !3, !4 are:

cpoly = {{0, 0, 1, 1}, {1/2, 0, 1, 1}, {3/4, 1/2, 3/4, 4/3},{1/2, 1, 1/2, 2}, {0, 1, 0, 4}}

The curve is displayed in Figure 22.19.

Our method can also be used to render curves on surfaces. This way, we can render surfaces in terms ofu-curves and v-curves. We will come back to this point when we deal with rational surfaces. A weaknessof the method is that it only applies to rational curves. In particular, it does not apply to curves definedimplicitly. Some methods to draw implicit curves are described in Ho#man [87]. Sometimes, it is desirable toconvert parametric rational definitions into implicit form, and to apply methods to rasterize nonparametriccurves. Some interesting algorithms tackling theses problems are investigated in Hobby [85, 86]. On theother hand, although restricted to rational curves, our method is very e!cient.

22.6 Problems

Problem 1. Compute the control polygon for the following curve (known as a tricuspoid) with respectto (0, 1):

x =a(3' 6t2 ' t4)

1 + 2t2 + t4,

y =8at3

1 + 2t2 + t4,

Page 42: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

638 CHAPTER 22. RATIONAL CURVES

-0.5-0.25

00.25

0.5

x

00.2

0.40.60.8

1y

-1

-0.5

0

0.5

1

z

-0.5-0.25

00.25

0.5

x

00.2

0.40.60.8

1y

-1

-0.5

0

0.5

1

Figure 22.19: A Viviani window

Page 43: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.6. PROBLEMS 639

Problem 2. Compute the control polygon for the following curve (known as Freeth’s nephroid) withrespect to (0, 1):

x =a(t2 + 4t+ 1)(t4 ' 6t2 + 1)

t6 + 3t4 + 3t2 + 1,

y =4at(t2 + 4t+ 1)(1' t2)

t6 + 3t4 + 3t2 + 1,

Problem 3. Compute the control polygon for the following curve (a type of rose) with respect to (0, 1):

x =4t(1' t2)2(1 ' 14t2 + t4)

(1 + t2)5,

y =8t2(1' t2)(3 ' 10t2 + 3t4)

(1 + t2)5,

Problem 4. Compute the control polygon for the following curve (known as an astroid) with respect to(0, 1):

x =a(1' 3t2 + 3t4 ' t6)

1 + 3t2 + 3t4 + t6,

y =8at3

1 + 3t2 + 3t4 + t6,

Problem 5. Compute the control polygon for the following curve (known as a bicorne) with respect to(0, 1):

x =a('t4 + t3 ' t+ 1)

t4 ' t3 + 2t2 ' t+ 1,

y =2at2

t4 ' t3 + 2t2 ' t+ 1,

Problem 6. Compute the control polygon for the following curve (known as a trisectrix of MacLaurin)with respect to (0, 1):

x =a(3' t2)

(t2 + 1),

y =at(3' t2)

(t2 + 1),

Problem 7. A limacon of Pascal is the curve defined as follows:

x = (a cos ! + l) cos !,

y = (a cos ! + l) sin !.

(i) Show that the following is a rational parameterization of the curve:

x =(a' l)t4 ' 2at2 + a+ l

t4 + 2t2 + 1,

y =2(l ' a)t3 + 2(a+ l)t

t4 + 2t2 + 1.

Page 44: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

640 CHAPTER 22. RATIONAL CURVES

(ii) Compute a control net with respect to (0, 1).

(iii) Study the di#erent shapes of the curve depending on a and l, in particular when

(1) l < a, for example a = 1, l = 1/2;

(2) a = l (a cardioid), for example a = l = 1;

(3) a < l < 2a, for example a = 1, l = 3/2;

(4) 2a . l, for example a = 1, l = 5/2.

Problem 8. Write your own program for drawing a closed rational curve. Draw the curve specified bythe following control polygon:

cpoly = {{0, 0, 1}, {2/5, 0, 1}, {18/25, 12/25, 10/9}, {1/2, 6/5, 4/3},{-14/45, 79/45, 12/7}, {-45/37, 69/37, 148/63}, {-71/45, 14/9, 24/7},{-6/5, 11/10, 16/3}, {-12/25, 18/25, 80/9}, {0, 2/5, 16}, {0, 0, 32}}

Problem 9. (i) Consider a rational curve F specified by the control polygon (!0, !1, . . ., !m) over (0, 1),where each !i is a vector in !E . Show that for every constant ) (= 0, the control polygon (!0, )!1, . . . , )m!m)also specifies the curve F . Show that if 0 < ) . 1, the curve segment defined over (0, 1) by (!0, )!1, . . . , )m!m)is equal to the curve segment defined over (0, 1) by (!0, !1, . . . , !m). What happens if ) < 0 or ) > 1?

Hint : Use the change of variable

t 0# )t

1 + ()' 1)t.

(ii) Assuming that every !i is a control point of the form %ai, wi&, show that if w0 and wm have the same

sign, then by choosing ) = m

;w0wm

, show that the curve F is specified by a control polygon in which both

the first and the last weight are 1.

Problem 10. Consider a conic specified by three weighted control points (b0, w0), (b1, w1), and (b2, w2),over (0, 1). Show that if the conic is not a hyperbola having an asymptote in the interval [0, 1], then it canbe specified by weighted control points such that w0, w1, w2 all have the same sign. In this case, show thatthe conic is specified by control points where w0 = 1, w1 > 0, and w2 = 1. Show that the conic is an ellipseif w1 < 1, a parabola if w1 = 1, and a hyperbola if w1 > 1.

Problem 11. Consider a conic defined by some control points (b0, 1), (b1, w1), and (b2, 1), over (0, 1),with w1 > 0. Show that the conic is a circle i# the triangle (b0, b1, b2) is isoceles (with base (b0, b2)). Showthat w1 = cos$, where $ is the angle between (b0, b2) and (b0, b1). Show that the full circle can be obtainedby putting together three arcs corresponding to the choice w1 = 1/2.

Problem 12. Let F be a rational curve of degree m specified by m + 1 control points (bi, wi), wherewi (= 0 (w.r.t. (0, 1)). The weight points qi (0 . i . m' 1) are the points defined such that

qi =wi bi + wi+1 bi+1

wi + wi+1.

Prove that if wi > 0 (0 . i . m), then the curve segment F over (0, 1) is contained in the convex hull of thepolygon

(b0, q0, . . . , qm'1, bm).

Problem 13. Let F be a rational curve of degree m specified by m + 1 control points (bi, wi) w.r.t.(0, 1). Show that the m+ 2 control points (b1i , w

1i ) of the curve obtained by raising the degree of F from m

Page 45: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.6. PROBLEMS 641

to m+ 1 are given by the formulae:

b1i =iwi'1 bi'1 + (m+ 1' i)wi bi

w1i

,

w1i = iwi'1 + (n+ 1' i)wi,

where 1 . i . m, (b10, w10) = (b0, w0), and (b1m+1, w

1m+1) = (bm, wm).

Problem 14. Show that the same rational curve can be specified by di#erent control polygons (usedegree raising and reparameterization).

Problem 15. (i) Given a polynomial cubic F specified by the control points (b0, b1, b2, b3) over (0, 1),define the points l1 and l2 as follows:

l1 =3

2b1 '

1

2b0,

l2 =3

2b2 '

1

2b3.

Prove that F (t) is given by the formula

F (t) = (1' t)2 b0 + 2(1' t)2t l1 + 2t2(1' t) l2 + t2 b3.

Show that if l1 = l2, then F is a curve of degree 2.

Remark : The points l1 and l2 are called the Ball points .

(ii) Assuming that l1 (= l2, pick any point c on the line (l1, l2), let H be any plane in A3 such that c /" H ,and consider the image Fc,H of F onto H under the central projection of center c. Show that Fc,H is a curveof degree 2. Conclude that every (true) cubic lies on a cone of degree 2. Show that F (*) = l1 ' l2 (a pointat infinity in "E). Thus, c = l1 ' l2 is on the cubic (at infinity), and in this case, the cone is a paraboliccylinder.

(iii) Generalize (i) and (ii) to rational cubics.

Problem 16. (i) Given a polynomial cubic F specified by the control points (b0, b1, b2, b3) over (0, 1),define the points a1 and a2 as follows:

a1 =3

2b1 '

1

2b3,

a2 =3

2b2 '

1

2b0.

Consider the rectangular bilinear patch X(u, v) defined such that

X(u, v) = (1' u)(1' v) b0 + (1' u)v a1 + uv a2 + u(1' v) b3.

Prove that the cubic F lies on the surface X .

Hint : Let v = 2(1' u)u in X(u, v).

(ii) Generalize (i) to rational cubics.

Conclude that every rational cubic lies on the intersection of a quadratic cone with a rational bilinearpatch. Is the converse true?

Page 46: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

642 CHAPTER 22. RATIONAL CURVES

Problem 17. Let F be a rational curve of degreem defined by the control points ((b0, w0), . . . , (bm, wm))over (0, 1). Prove that the curvature at b0 is

+(0) =(m' 1)

m

w0w2

w21

2b0b1 / b1b222b0b123

.

Show that the torsion at b0 is given by

,(0) = ' (m' 2)

m

w0w3

w1w2

(b0b1, b0b2, b0b3)

2b0b1 / b1b222.

Use the above to solve the following problem: Given a sequence of four control points (b0, b1, b2, b3) andtwo numbers +0 > 0 and +3 > 0, find w1, w2 such that the rational cubic specified by ((b0, 1), (b1, w1),(b2, w2), (b3, 1)) has curvature +0 at b0 and curvature +3 at b3.

Problem 18. Let F be a rational curve of degreem defined by the control points ((b0, w0), . . . , (bm, wm))over (0, 1). Prove that the derivative at b0 is given by

F %(0) =mw1

w0(b1 ' b0).

Problem 19. Let F be a rational curve of degree m defined by the multilinear map f : (!A)m # !E .Consider the change of variable

(t, z) 0# (at+ bz, ct+ dz),

where ad' bc (= 0. Let g be the multilinear map defined such that

g((t1, z1), . . . , (tm, zm)) = f((at1 + bz1, ct1 + dz1), . . . , (atm + bzm, ctm + dzm)).

Show that the control point g((r, 1), . . . , (r, 1)# $% &m'i

, (s, 1), . . . , (s, 1)# $% &i

) w.r.t. (r, s) are given by the expressions

(cr + d)m'i(cs+ d)if

''ar + b

cr + d, 1

(, . . . ,

'ar + b

cr + d, 1

(

# $% &m'i

,

'as+ b

cs+ d, 1

(, . . . ,

'as+ b

cs+ d, 1

(

# $% &i

(,

provided that cr + d (= 0 and cs+ d (= 0.

Problem 20. Let F be a rational curve of degree m defined by the multilinear map f : (!A)m # !E .

(i) Letting

Bmi (u, v) =

'mi

(uivm'i,

and assuming that the control points induced by f over (0, 1) are of the form %bi, wi& where wi (= 0, provethat if

3mi=0 wiBm

i (t, z) (= 0, then

F ([t, z]) =

m0

i=0

wiBmi (t, z) bi

m0

i=0

wiBmi (t, z)

,

for all homogeneous coordinates [t, z] " R2. Show that F (t, z) can be computed by a simple modificationof the de Casteljau algorithm (instead of computing the a!ne combination (1' u) bri + u bri+1, compute thelinear combination z bri + u bri+1).

Page 47: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

22.6. PROBLEMS 643

(ii) Consider the C0-continuous curve in R2 defined such that t 0# (t, 1' |t|) over ['1, 1]. This curve is amodel of the projective line in R2 (identifying the points ('1, 0) and (1, 0)). Explain how to draw a closedrational curve in a single piece using the results of (i) and (ii) (as the trace of F ([u, 1 ' |u|])). Apply thismethod to draw an ellipse. Experiment with other 2D models of the projective line.

Remark : This problem is an adaptation of results due to DeRose [45].

Problem 21. Let C be the curve C:RP1 # RP3 (called the twisted cubic) defined such that

C(u, v) = (u3, u2v, uv2, v3),

for all homogeneous coordinates (u, v) " R2.

(i) Prove that C is the intersection of the three quadrics Q1, Q2, Q3 of equations

Q1: xz ' y2 = 0,

Q2: xt' yz = 0,

Q3: yt' z2 = 0,

where (x, y, z, t) are homogeneous coordinates in R4.

Hint : Show that if p = (x, y, z, t) " Q1 , Q2 , Q3, then either x (= 0 or t (= 0. In the first case, phas homogeneous coordinates of the form (x3, x2y, xy2, y3), and in the second case, p has homogeneouscoordinates of the form (z3, z2t, zt2, t3).

(ii) Prove that the intersection of any two of Qi and Qj (where i (= j) is equal to the union of C withsome line. Conclude that C is not equal to the intersection of only two of the Qi’s.

(iii) Consider the a!ne trace of C obtained by setting u = 1. Show that in the a!ne patch in RP3

corresponding to x = 1, this is the curvet 0# (t, t2, t3).

Show that this curve is exactly the intersection of the a!ne traces of Q1 and Q2 (corresponding to x = 1).What are these two surfaces? How do you resolve the apparent conflict with the result of question (ii)?

Page 48: Rational Curves - Information and Computer Sciencecis610/supgeom3.pdf · Because the polynomials involved are homogeneous, the polar forms are actually multilinear, and rational curves

644 CHAPTER 22. RATIONAL CURVES