CHAPTER 3: RATIONAL CURVES

 

1  Introduction

Although the polynomial curves are the easiest tool for curve design, they lack flexibility (for instance, they have as many roots as its degree). Let us see, as an example, how a cubic approximates five points over a sinusoidal curve:

grado

The lack of flexibility of the polynomials can cause, as well, the existence of parts of the curve with a high degree of curvature or undesirable and rough oscillations:

grado

On the other hand, the amount of curves that can be described in an precise way by polynomial parametrizations is quite limited. The result of  approximating a circle by pieces of parabolas is, at least, unsatisfactory:

grado

An alternative possibility, that we will consider in the next chapter, is working with piecewise polynomial curves and functions. Another possibility is using rational curves.

2  Rational Curves 

We shall define the rational parametrizations of degree n as those whose components are polynomial curves of degree n.

Let (c0(t),c1(t),c2(t)), t∊[0,1] be a polynomial curve in R3 such that does not pass through the origin. We know that its projection onto the affine plane is a parametrization (c1(t)/c0(t),c2(t)/c0(t)).

We shall split the coordinates of the vertices in two parts: ci = (wi,wici), where  wi is the first component of the i-th vertex, and wici are the two remaining components (three, if we are working with a spatial curve). ci is just the projection of ci over the affine plane.

In this case, we are describing the rational curves via a control polygon {c0,...,cn} and some parameters, {wi,...,wn}, that we shall call weights.

proy

c(t) = ( n
Σ
i = 0 
wiBni(t), n
Σ
i = 0 
wiciBni(t))∊R3  ,    t∊[0,1]  ,
c(t) =
n
Σ
i = 0 
wiciBni(t)

n
Σ
i = 0 
wiBni(t)
A2  ,    t∊[0,1]  .
(1)
grado

If all the wieghts have the same value, w = wi, i = 0,...,n, then we recover the polynomial curve,

c(t) = n
Σ
i = 0 
ciBni(t)   ,
 

of control polygon {c0,...,cn}.

If we want to continue working with positive expressions, we need to use positive values for the weights as well. In design it is usual working with weight values around one. Here is an example of a curve with some negative weights.

grado

The interpretation of the weights is this: The larger the weight wk is (leaving unchanged the rest of weights), the closer the curve approaches the corresponding vertex ck . Example 

This fact can be used to increase the "tension" of the curve. Example

If we multiply all the weights by the same factor, the curve remains the same. Example

This well known fact can be used for normalizing the weights by taking the first weight equal to one.

What if one of the vertices ci is a point at infinity?

In this case, there is no sense in talking about the weight wi, because the first component of the vertex is equal to zero, ci = (0,ci). Its image is an affine vector, not a point, and therefore, we shall call it control vector. Hence, making this distinction, the expression of a rational curve is:

c(t) =
n
Σ
points 
wiciBni(t) + n
Σ
vectors 
ciBni(t)

n
Σ
points 
wiBni(t)
  .
(2)
vector

The presence of control vectors is quite disturbing because, the expression (2) is no longer a barycentric combination of points, and, consequently, the property of convex hull will be no longer true. Example

2.1  Properties of Rational Curves

Many of the properties of Bézier curves can be straightaway translated to rational ones, because we are still using barycentric combinations of the control polygon vertices.

The following properties, derived from this fact, remain the same: the convex hull property, the variation diminishing property and the invariance under affine maps. Example

Other properties, as passing through the first and the last vertices c0, cn or being symmetric, remain the same as well.

c(0) = c0  ,       c(1) = cn  .

The rational curves are invariant under projective maps. Let f be a projective map of the plane and {c0,...,cn}, {w0,...,wn} the control polygon and the list of weights of a rational parametrization. Consequently: 

c(t) =
n
Σ
i = 0 
wiciBni(t)

n
Σ
i = 0 
wiBni(t)
  ,      f(c(t)) =
n
Σ
i = 0 
w'ic'iBni(t)

n
Σ
i = 0 
w'iBni(t)
  ,
(3)
 

where the vertices and weights ci = (wi,wici) of the transformed curve are related to those of the original curve ci = (wi,wici) by the relation: c'i = f(ci) = (w'i,w'ic'i). 

This maps are particular useful because they include the change of perspective. Example

proyectiva

A projective map of the real line transforms a rational parametrization of degree n c(t) into another of the same degree c'(u) = c(t(u)),

t(u) = cu+d
au+b
   .

We shall reparametrize making keeping the final interval equal to [0,1]. This can be done with transformations of this form:

t(u) = u
(1-b)u+b
  ,    u∊[0,1]  ,
(4)
 

and this is impossible with affine maps.

These transformations cause the changes of the weights: {w'0,...,w'n}, w'i = bn-iwi. But the control polygon remains the same, {c0,...,cn}.

There are infinite lists of weights that give us the same rational curve. The graphic of the curve is the same, but the velocity of the parametrization is different.

If b < 1, we travel along the curve faster at the beginning than at the end. When we reach u = 1/2, we are beyond t = 1/2 in the original parametrization. And the contrary happens when b > 1. Example In the following graphic we can see t(u) for b=1/2, green and  b=2, red.

 

repar

We can freely choose the value of b in order to fix a value for a particular weight. If we choose b = (wn/w0)1/n, then w'0 = wn = w'n.

Usually the initial and final weights are chosen in a way that w0 = 1 = wn.

3  Conics

Rational parametrizations describe arcs of any sort of conic sections. 

Assume w0 = 1 = w2, w1 = w (a normalized parametrization), on a rational curve of degree two,

c(t) = (1-t)2c0+2wt(1-t)c1+t2c2
(1-t)2+2wt(1-t)+t2
  .

Considering  only positive values of the weights, for 0 < w < 1 we shall get an arch of ellipse. For w = 1, we have an arc of parabola, and for w > 1, we have a hyperbola. Example

With a simple geometrical construction, we can find the vertices of the control polygon of an arc of circumference.

construc

In the figure, if we put the centre in (0,0) and the endpoints c0, c2 in (-Rsinα,Rcosα), (Rsinα,Rcosα), respectively, the vertex c1 will be (0,R/cosα).

The value of the weight is w = cosα. For example, in order to trace a quarter of a circumference, the weight takes the value 21/2/2 and for and arch of 2π/3, takes 1/2.

proyectiva

For half a circumference, we can trace it if we use control vectors, Example

c(t) = (1-t)2(-R,0)+2t(1-t)(0,R)+t2(R,0)
(1-t)2+t2
  ,    t∊[0,1]  .

4  Degree Elevation

If we multiply both numerator and denominator by the same function f(t), the parametrization is invariant, but both expressions change notably. As our purpose is increasing the degree in one, we choose a function of degree one,

w1i = α n+1-i
n+1
wi+ β i
n+1
wi-1  ,
w1ic1i = α n+1-i
n+1
wici+ β i
n+1
wi-1ci-1  ,
(5)
 

Using this expression, we have countless ways of increasing in one degree the parametrization's degree. It depends on the value of the parameters α,β. It is reasonable to choose them both positive in order to avoid negative terms. Example

If we take α = 1 = β, we get the degree elevation formula derived in the previous chapter (Chapter 2).

Degree elevation (5) and (4) are not commutative. This means that if we first increase the degree of the curve and then reparametrize, we shall not get the same result as if we first reparametrize and then increase the degree of the curve, as it can be seen in the following figure: 

 

proyectiva

5  The de Casteljau Algorithm

The de Casteljau Algorithm can be generalized to rational curves:

wr)i(t) = (1-t) wr-1)i(t)+t wr-1)i+1(t)  ,    i = 0,... , n-r  ,    r = 1,... , n  ,
cr)i(t) = (1-t) wr-1)i(t)
wr)i(t)
cr-1)i(t)+ t wr-1)i+1
wr)i(t)
cr-1)i+1(t)  ,
(6)
 

where, obviously, w0)i = wi, c0)i = ci.

6  Derivatives

For a given control polygon {c0,... ,cn}, and a list of weights, {w0,... ,wn},

p(t) = w(t) c(t)  ,    p(t): = n
Σ
i = 0 
wiciBni(t)  ,    w(t): = n
Σ
i = 0 
wiBni(t)  ,
 

the expression of the derivatives of a product give us the derivative of the rational parametrization,

c'(t) = p'(t)
w(t)
- w'(t)
w(t)
c(t)  ,

cr)(t) = pr)(t)
w(t)
- 1
w(t)
r
Σ
i = 1 
(
n
i
) wi)(t)cr-i)(t)  .

These expressions are very intricate, because they involve lower derivatives in both numerator and denominator.

Due to the formulae for the derivatives of the polynomial parametrizations,

c'(0) = n w1
w0
Δc0  ,       c'(1) = n wn-1
wn
Δcn-1  ,
(7)
 

regarding the first derivative there is only one new thing, the weights of the first and the last point. Example

 

derivada

Let {c0,... ,cn}, {c'0,... ,c'n} and {w0,... ,wn}, {w'0,...,w'n} be the control polygons and list of weights of two rational curves defined over the intervals [u0,u1] and [u1,u2] respectively. The condition for forming a continuous curve is:

cn = c'0  ,
(8)
 

This is the same condition studied for Bézier curves.

As cn, c'0 are the same point, it seems reasonable to impose wn = w'0.

Besides, if we want the parametrization to be C1 class, 

wn-1 Δcn-1
Δu0
= w'1 Δc'0
Δu1
  .
(9)

From the second derivative on, things get more complicated. If we want the rational parametrization to be Cr class, we can impose a sufficient condition, but not necessary, in order to achieve our goal:

Δs( wn-scn-s)
(Δu0)s
= Δs( w'0c'0)
(Δu1)s
  ,       Δs wn-s
(Δu0)s
= Δs w'0
(Δu1)s
  ,       s = 0,...,r  .
(10)

7  Interpolation and approximation

Rational curves add many degrees of freedom to those of Bézier curves, and we shall use them in order to solve more complex problems of interpolation and approximation.

We could see the rational problem as a polynomial problem in R3 where the given data are the values c(ti) = ai, i = 0,...,m, for ai = (vi,viai). As the given data of the problem are: c(ti) = ai, consequently, the weights of the given points vi, i = 0,...,m remain as free parameters.

There are no general algorithms to determine those weights. Thus we are to consider them as degrees of freedom that will allow us to improve the resulting curve. Example

 


© Leonardo Fernández Jambrina and Rubén López Pulido