0% found this document useful (0 votes)
13 views3 pages

Mech Fun

Uploaded by

Rahul Rathod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Mech Fun

Uploaded by

Rahul Rathod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MATH 373 LECTURE NOTES 29

6.4. Parametric curves. We next study the approximation of curves which can not be
expressed as a function of one coordinate variable in terms of the other, e.g., we cannot write
y = f (x). More generally, we consider parametric curves of the form x = x(t), y = y(t),
where t ∈ [a, b]. A simple example is the unit circle x2 + y 2 = 1, which may be written in
parametric form as x(t) = cos(2πt), y(t) = sin(2πt), t ∈ [0, 1].

The polynomial interpolation problem then becomes the following: Given points (x0 , y0 ),
(x1 , y1 ), · · · , (xn , yn ), find polynomials Pn (t) and Qn (t) such that
Pn (ti ) = xi , Qn (ti ) = yi , i = 0, 1, . . . , n.
Instead of approximating by polynomials, we can also develop piecewise polynomial approx-
imations, using the methods we have already developed.

For some applications in computer graphics, piecewise Bézier curves are widely used to
model smooth curves. Given points P 0 , P 1 , . . . , P n , the Bézier curve of degree n is defined
as:
n  
X n
B(t) = (1 − t)n−i ti P i , t ∈ [0, 1].
i=0
i
So a Bézier curve is just a polynomial of degree ≤ n written in a special form.

Examples: n = 1. Linear Bézier curve B(t) = (1 − t)P 0 + tP 1 . This is just the straight
line joining P 0 and P 1 .

n = 2. Quadratic Bézier curve


B(t) = (1 − t)2 P 0 + 2(1 − t)tP 1 + t2 P 2 , t ∈ [0, 1].
Note that B(0) = P 0 and B(1) = P 2 , but B does not in general equal P 1 for any t.

n = 3. Cubic Bézier curve


B(t) = (1 − t)3 P 0 + 3(1 − t)2 tP 1 + 3(1 − t)t2 P 2 + t3 P 3 , t ∈ [0, 1].

The points P i are called the control points for the Bézier curve. In terms of our previous
discussion, they are the degrees of freedom for this form of a polynomial. For all values of n,
P 0 = B(0) and P n = B(1), so these degrees of freedom have an immediate interpretation.
We now give an interpretation of the other control points. Consider the case of a cubic
Bézier curve. Then
B ′ (t) = −3(1 − t)2 P 0 + 3(1 − 4t + 3t2 )P 1 + 3(2t − 3t2 )P 2 + 3t2 P 3 , t ∈ [0, 1].
Hence,
B ′ (0) = 3[P 1 − P 0 ], B ′ (1) = 3[P 3 − P 2 ].
From a geometric point of view, we see that the control points P 0 and P 3 determine the
end points of the curve. Since B ′ (0) is a tangent vector to the curve at t = 0, the equation
B ′ (0) = 3[P 1 −P 0 ] says that this tangent vector is a multiple of the vector from the point P 0
to the point P 1 . Thus moving P 1 changes the slope of the curve at P 0 . Similarly, moving
P 2 changes the slope of the curve at P 3 . Previously, we have seen that we completely
determine a cubic polynomial by choosing as degrees of freedom its value and the value of
30 MATH 373 LECTURE NOTES

its derivative at both end points. In the Bézier form, we choose to control the derivatives at
the end points by simply moving the control points P 1 and P 2 .
To approximate a curve, we make use of piecewise Bézier curves, just as we approximated
smooth functions by piecewise polynomials. Consider the points a = t0 < t1 · · · < tn = b and
suppose we wish to construct a piecewise cubic Bézier curve B(t) based on this partition,
i.e., for t ∈ [ti−1 , ti ], we set B(t) = B i (t), where
(ti − t)3 (ti − t)2 (t − ti−1 ) (ti − t)(t − ti−1 )2 (t − ti−1 )3
B i (t) = P i−1 + 3 Q i−1 + 3 R i + P i.
(ti − ti−1 )3 (ti − ti−1 )3 (ti − ti−1 )3 (ti − ti−1 )3
Note that this formula is obtained from the previous formula by making the change of
variable t → (t − ti−1 )/(ti − ti−1 ). Since the values of B(t) at the endpoints of the interval
are degrees of freedom, it is easy to join two Bézier curves together, so that the resulting
piecewise Bézier curve is continuous. We just use the same value for B at the common point,
i.e., B i (ti ) = Pi = B i+1 (ti ). If we want the derivative at the common point to be continuous,
we must have
3 3
(P i − Ri ) = (Q − P i ).
(ti − ti−1 ) (ti+1 − ti ) i
In the case when the ti are equally spaced, this means that P i = (Qi +Ri )/2, or equivalently
that once the control points Ri and P i are set, then Qi = 2P i − Ri .
For some applications in computer graphics, even smoother curves are desirable, and
then we want a piecewise cubic that is C 2 . Considering the case of equally spaced points,
we can use the B-spline basis defined previously to write any cubic spline S(t) satisfying
S ′′ (t0 ) = S ′′ (tn ) = 0 in the form
n
X
S(t) = P i (ti )Bi (t),
i=0

where Bi (t) is the cubic spline basis function centered at t = ti . In this case the values P i (ti )
are the control points (or degrees of freedom). An important aspect of this type of basis
is the each basis function Bi (t) is nonzero only on the four subintervals [ti−2 , ti−1 ], [ti−i , ti ],
[ti , ti+1 ], [ti+1 , ti+2 ]. Thus, if we change the value of the control point P i (ti ), we only change
the value of S on these four subintervals.
The following pictures show first a graph of a B-spline basis function centered at t = 0
and then a graph of a cubic spline that is equal to one at t = 0, equal to zero at the other
interpolation points ti = ±i/8, i = 1, 2, . . . , 8. Note that the second graph is different from
zero on more than four subintervals. The final plot is a blow up of the second graph on the
interval [.5, 1], showing that although the value of the interpolanting spline is small, it is not
zero on any of the subintervals.
MATH 373 LECTURE NOTES 31

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy