1 Chapter 2 Bézier curves are named after their inventor, Dr. Pierre Bézier. Bézier was an engineer with the Renault car company and set out in the early 196 s to develop a curve formulation which would lend itself to shape design. Engineers may find it most understandable to think of Bézier curves in terms of the center of mass of a set of point masses. For example, consider the four masses m, m 1, m 2, and m 3 located at points,, P 2, P 3. The center of mass of these four point masses is given by the equation P 2 P P 3 Figure 2.1: Center of mass of four points. P = m + m 1 + m 2 P 2 + m 3 P 3 m + m 1 + m 2 + m 3. Next, imagine that instead of being fixed, constant values, each mass varies as a function of some parameter t. In specific, let m = (1 t) 3, m 1 = 3t(1 t) 2, m 2 = 3t 2 (1 t) and m 3 = t 3. The values of these masses as a function of t is shown in this graph: Now, for each value of t, the masses assume different weights and their center of mass changes continuously. In fact, as t varies between and 1, a curve is swept out by the center of masses. This curve is a cubic Bézier curve cubic because the mass equations are cubic polynomials in t. Notice that, for any value of t, m + m 1 + m 2 + m 3 1, and so we can simply write the equation of this Bézier curve as P = m + m 1 + m 2 P 2 + m 3 P 3. Note that when t =, m = 1 and m 1 = m 2 = m 3 =. This forces the curve to pass through. Also, when t = 1, m 3 = 1 and m = m 1 = m 2 =, thus the curve also passes through point P 3. Furthermore, the curve is tangent to and P 3 P 2. These properties make Bézier curves 13
2 14 CHAPTER 2. m 1 m m 3 m 1 m 2 1 t Figure 2.2: Cubic Bézier blending functions. P 2 P 3 Figure 2.3: Cubic Bézier curve.
3 15 an intuitively meaningful means for describing free-form shapes. Here are some other examples of cubic Bézier curves which illustrate these properties. These variable masses m i are normally called Figure 2.4: Examples of cubic Bézier curves. blending functions and their locations P i are known as control points or Bézier points. If we draw straight lines between adjacent control points, as in a dot to dot puzzle, the resulting figure is known as a control polygon. The blending functions, in the case of Bézier curves, are known as Bernstein polynomials. We will later look at other curves formed with different blending functions. Bézier curves of any degree can be defined. Figure 2.5 shows sample curves of degree one through four. A degree n Bézier curve has n + 1 control points whose blending functions are denoted B n i (t), Degree 1 Degree 2 Degree 3 Degree 4 Figure 2.5: Bézier curves of various degree. where B n i (t) = ( n i ) (1 t) n i t i, i =, 1,..., n. Recall that ( n i) is called a binomial coefficient, sometimes spoken n - choose - i, and is equal to n! i!(n i)!. In our introductory example, n = 3 and m = B 3 = (1 t)3, m 1 = B1 3 = 3t(1 t)2, m 2 = B2 3 = 3t2 (1 t) and m 3 = B3 3 = t3. Bi n (t) is also referred to as the ith Bernstein polynomial
4 16 CHAPTER 2. of degree n. The equation of a Bézier curve is thus: P(t) = n i= ( ) n (1 t) n i t i P i. (2.1) i Figure 2.6: Font definition using Bézier curves. A common use for Bézier curves is in font definition. Figure 2.6 shows the outline a letter g created using Bézier curves. All PostScript font outlines are defined use cubic and linear Bézier curves. 2.1 Bézier Curves over Arbitrary Parameter Intervals Equation 2.1 gives the equation of a Bézier curve which starts at t = and ends at t = 1. It is useful, especially when fitting together a string of Bézier curves, to allow an arbitrary parameter interval: t t t 1 such that P(t ) = and P(t 1 ) = P n. This can be accomplished by modifying equation 2.1: n ( n ) i= i (t1 t) n i (t t ) i P i P(t) = (t 1 t ) n = (2.2) n i= ( ) n ( t 1 t ) n i ( t t ) i P i. i t 1 t t 1 t 2.2 Subdivision of Bézier Curves The most fundamental algorithm for dealing with Bézier curves is the subdivision algorithm. This was devised in 1959 by Paul de Casteljau (who was working for the Citroen automobile company) and is referred to as the de Casteljau algorithm. It is sometimes known as the geometric construction algorithm. Consider a Bézier curve defined over the parameter interval [, 1]. It is possible to subdivide such a curve into two new Bézier curves, one of them over the domain t τ and the other over
5 2.2. SUBDIVISION OF 17 τ t 1. These two new Bézier curves, considered together, are equivalent to the single original curve from which they were derived. As illustrated in Figure 2.7, begin by adding a superscript of to the original control points, then compute P j i = (1 τ)pj 1 i + τp j 1 i+1 ; j = 1,..., n; i =,..., n j. (2.3) Then, the curve over the parameter domain t τ is defined using control points, P1, P2,..., Pn and the curve over the parameter domain τ t 1 is defined using control points P n, P n 1 1, P2 n 2,..., n P 3 P 2 1 P P P 2 P 3 t =.4 t =.6 Figure 2.7: Subdividing a cubic Bézier curve. Figure 2.8 shows that when a Bézier curve is repeatedly subdivided, the collection of control polygons converge to the curve. 1 curve 2 curves 4 curves 8 curves Figure 2.8: Recursively subdividing a quadratic Bézier curve. One immediate value of the de Casteljau algorithm is that it provides a numerically stable means of computing the coordinates of any point along the curve. Its extension to curves of any degree should be obvious.
6 18 CHAPTER 2. It can be shown that if a curve is repeatedly subdivided, the resulting collection of control points converges to the curve. Thus, one way of plotting a Bézier curve is to simply subdivide it an appropriate number of times and plot the control polygons. The de Casteljau algorithm works even for parameter values outside of the original parameter interval. Fig. 2.9 shows a quadratic Bézier curve subdivided at τ = 2. The de Castelau algorithm 1 P 2 1 t = 2 2 Figure 2.9: Subdividing a quadratic Bézier curve. is numerically stable as long as the parameter subdivision parameter is within the parameter domain of the curve. 2.3 Degree Elevation Another useful algorithm is the degree elevation algorithm. This has many uses. For example, some modeling systems use only cubic Bézier curves. However, it is important to be able to represent degree two curves exactly. A curve of degree two can be exactly represented as a Bézier curve of degree three or higher. In fact, any Bézier curve can be represented as a Bézier curve of higher degree. We illustrate by raising the degree of a cubic Bézier curve to degree four. We denote the cubic Bézier curve in the usual way: x(t) = B 3 (t) + B 3 1(t) + P 2 B 3 2(t) + P 3 B 3 3(t) Note that this curve is not changed at all if we multiply it by [t + (1 t)] 1. However, multiplication in this way does serve to raise the degree of the Bézier curve by one. Its effect in the cubic case is to create five control points from the original four. Those five control points thus define a degree four Bézier curve which is precisely the same as the original degree three curve. The new control points P i are easily found as follows: P = P 1 =
7 2.3. DEGREE ELEVATION 19 old P 2 * P 2 * new P 3 * 1/2 1/4 * P 3 P 4 * Figure 2.1: Degree elevation. P 2 = P 2 P 3 = 3 4 P P 3 This works for any degree n as follows: P 4 = P 3 P i = α i P i 1 + (1 α i )P i, α i = i n + 1. Furthermore, this degree elevation can be applied repeatedly to raise the degree to any level, as shown in Figure Note that the control polygon converges to the curve itself. Degree 2 Degree 3 Degree 4 Degree 5 Degree 6 Degree 7 Figure 2.11: Repeated degree elevation.
8 2 CHAPTER Distance between Two Bézier Curves The problem often arises of determining how closely a given Bézier curve is approximated by a second Bézier curve. For example, if a given cubic curve can be adequately represented by a degree elevated quadratic curve, it would be computationally advantageous to replace the cubic curve with the quadratic curve. Given two Bézier curves n n P(t) = P i Bi n (t); Q(t) = Q i Bi n (t) i= the vector P(t) Q(t) between points of equal parameter value on the two curves can itself be expressed as a Bézier curve D(t) = P(t) Q(t) = i= n (P i Q i )Bi n (t) whose control points are D i = P i Q i. The vector from the origin to the point D(t) is P(t) Q(t). Thus, the distance between the two curves is bounded by the largest distance from the origin to any of the control points D i. i= Q 1 Q2 P 2 P 3 -Q 3 t=1/2 -Q P 2 -Q 2 P 3 -Q 1 Q Q 3 Figure 2.12: Difference curve. 2.5 Derivatives The parametric derivatives of a Bézier curve can be determined geometrically from its control points. For a curve of degree n with control points P i, the first parametric derivative can be expressed as a curve of degree n 1 with control points D i where D i = n(p i+1 P i )
9 2.6. CONTINUITY 21 D 3( - ) P(t) 3(P 3 -P 2 ) (,) P (t) P 3 P 2 3(P 2 - ) D 2 D 1 Figure 2.13: Hodograph. For example, the cubic Bézier curve in Fig has a first derivative curve as shown. Of course, the first derivative of a parametric curve provides us with a tangent vector. This is illustrated in Fig for the point t =.3. This differentiation can be repeated to obtain higher derivatives as well. The first derivative curve is known as a hodograph. It is interesting to note that if the hodograph passes through the origin, there is a cusp corresponding to that point on the original curve! Note that the hodograph we have just described relates only to Bézier curves, NOT to rational Bézier curves or any other curve that we will study. The derivative of any other curve must be computed by differentiation. 2.6 Continuity In describing a shape using free-form curves, it is common to use several curve segments which are joined together with some degree of continuity. Normally, a single Bézier curve will not suffice to define a complex shape. Recall the last time you used a French curve. You most likely were not able to find a single stretch along the French curve which met your needs, and were forced to segment your curve into three or four pieces which could be drawn by the French curve. These adjoining pieces probably had the same tangent lines at their common endpoints. This same piecewise construction is used in Bézier curves. There are two types of continuity that can be imposed on two adjoining Bézier curves: parametric continuity and geometric continuity. In general, two curves which are parametric continuous to a certain degree are also geometric continuous to that same degree, but the reverse is not so. Parametric continuity is given the notation C i, which means ith degree parametric continuity. This means that the two adjacent curves have identical ith degree parametric derivatives, as well as all lower derivatives. Thus, C means simply that the two adjacent curves share a common endpoint. C 1 means that the two curves not only share the same endpoint, but also that they have the same tangent vector at their shared endpoint, in magnitude as well as in direction. C 2 means that two curves are C 1 and in addition that they have the same second order parametric derivatives at their
10 22 CHAPTER 2. shared endpoint, both in magnitude and in direction. In Fig. 2.14, the two curves are obviously at least C because p 3 q. Furthermore, they are p q 3 p 1 q 2 p 2 p 3 q q 1 Figure 2.14: C 2 Bézier curves. C 1 if line segments p 2 p 3 and q q 1 are collinear and of equal length. It also appears that they are C 2, which you can verify by sketching the second derivative curves. The conditions for geometric continuity (also known as visual continuity) are less strict than for parametric continuity. For G 1, we merely require that line segments p 2 p 3 and q q 1 are collinear, but they need not be of equal length. This amounts to saying that they have a common tangent line, though the magnitude of the tangent vector may be different. G 2 (second order visual or geometric continuity) means that the two neighboring curves have the same tangent line and also the same curvature at their common boundary. The curvature of a Bézier curve at its endpoint is given by κ = n 1 h n a 2 where n is the degree of the curve and a and h are as shown in Fig Note that a is the length of the first leg of the control polygon, and h is the perpendicular distance from P 2 to the first leg of the control polygon. Two curves that are G n can always be reparameterized so that they are C n. This provides a practical definition of G n continuity. 2.7 Three Dimensional Bézier Curves It should be obvious that if the control points happen to be defined in three dimensional space, the resulting Bézier curve is also three dimensional. Such a curve is sometimes called a space curve, and a two dimensional curve is called a planar curve. Note that since a degree two Bézier curve is defined using three control points, every degree two curve is planar, even if the control points are in a three dimensional coordinate system. 2.8 Rational Bézier Curves It is possible to change the shape of a Bézier curve by scaling the blending functions Bi n of the control points by values which we denote w i. These w i are known as control point weights. Since it
11 P RATIONAL 23 P 2 h a Figure 2.15: Endpoint curvature. is essential for the blending functions to sum to one (or else the curve will change with the coordinate system), we must normalize the blending functions by dividing through by their total value. Thus, the equation becomes w B n (t) w n Bn(t)P n n w B n(t) w nbn(t) n. The effect of changing a control point weight is illustrated in Fig This type of curve is known as a rational Bézier curve, because the blending functions are rational polynomials, or the ratio of two polynomials. The Bézier curves that we have dealt with up to now are sometimes known as non-rational or integral Bézier curves. There are more important reasons for using rational Bézier curves than simply the increased control it provides over the shape of the curve. For example, a perspective drawing of a 3D Bézier curve (integral or rational) is a rational Bézier curve. Also, rational Bézier curves are needed to exactly express all conic sections. A degree two integral Bézier curve can only represent a parabola. Exact representation of circles requires rational degree two Bézier curves. A rational Bézier curve can be viewed as the projection of a 3-D curve. Fig shows two curves: a 3-D curve and a 2-D curve. The 2-D curve lies on the plane z = 1 and it is defined as the projection of the 3-D curve onto the plane z = 1. One way to consider this is to imagine a funny looking cone whose vertex is at the origin and which contains the 3-D curve. In other words, this cone is the collection of all lines which contain the origin and a point on the curve. Then, the 2-D rational Bézier curve is the intersection of the cone with the plane z = 1. If the 2-D rational Bézier curve has control points (x i, y i ) with corresponding weights w i, then the (X, Y, Z) coordinates of the 3-D curve are (x i w i, y i w i, w i ). Denote points on the 3-D curve using upper case variables (X(t), Y (t), Z(t)) and on the 2-D curve using lower case variables (x(t), y(t)). Then, any point on the 2-D rational Bézier curve can be computed by computing the corresponding point on the 3-D curve, (X(t), Y (t), Z(t)), and projecting it to the plane z = 1 by setting x(t) = X(t) Z(t), y(t) = Y (t) Z(t).
12 24 CHAPTER 2. P 2 w 2 =5 w 2 =2 w 2 =1 w 2 =.5 w 2 =1 w 2 = P Tangency and Curvature Figure 2.16: Rational Bézier curve. The equations for the endpoint tangency and curvature of a rational Bézier curve must be computed using the quotient rule for derivatives it does not work to simply compute the tangent vector and curvature for the three dimensional non-rational Bézier curve and then project that value to the (x, y) plane. For a degree n rational Bézier curve, x(t) = x n(t) d(t) = ( w x n ( ) (1 t) n + w 1 x n ( 1 1) (1 t) n 1 t + w 2 x n 2 2) (1 t) n 2 t ( w n ( ) (1 t)n + w n ( 1 1) (1 t) n 1 t + w n ; 2 2) (1 t) n 2 t y(t) = y n(t) d(t) = w y ( n ) (1 t) n + w 1 y 1 ( n 1) (1 t) n 1 t + w 2 y 2 ( n 2) (1 t) n 2 t w ( n ) (1 t)n + w 1 ( n 1) (1 t) n 1 t + w 2 ( n 2) (1 t) n 2 t the equation for the tangent vector t = must be found by evaluating the following equations: ẋ() = d()ẋ n() d()x n () d 2 ; ẏ() = d()ẏ n() d()y n () () d 2 () from which P () = w 1 w n( ).
13 2.9. TANGENCY AND CURVATURE 25 (x 1,y 1,1)w 1 (x,y,1)w z (x 2,y 2,1)w 2 (x 1,y 1,1) (x 2,y 2,1) (x 3,y 3,1)w 3 z=1 (x,y,1) (x 3,y 3,1) z y x z=1 x i 1 w i x x i w i Figure 2.17: Rational curve as the projection of a 3-D curve.
14 26 CHAPTER 2. and the curvature κ at t = is found by evaluating the curvature equation from which it can be shown where a and h are as shown in Figure Reparametrization ẋÿ ẏẍ κ = (ẋ 2 + ẏ 2 ) 3 2 κ() = w w 2 w 2 1 n 1 n Any integral parametric curve X(t) = (x(t), y(t)) can be reparametrized by the substitution t = f(u). If f(u) = a + a 1 u, then the reparametrization has the effect of changing the range over which the curve segment is defined. Thus, two Bézier subdivisions can always accomplish exactly what a linear parameter substitution does. It is also legal for f(u) to be nonlinear. This, of course, does not change the shape of the curve but it does cause the curve to be improperly parametrized, which means that to each point on the curve there corresponds more than one parameter value u. There are occasions when it is desirable to do this. If so, however, it is advisable that the curve does not end up being multiply traced, which means that portions of the curve get redrawn as the parameter sweeps from zero to one. A rational parametric curve can be reparametrized with the substitution t = f(u)/g(u). In this case, it is actually possible to perform a rational-linear reparametrization which does not change the endpoints of our curve segment. If we let h a 2 t = a(1 u) + bu c(1 u) + du and want u = when t = and u = 1 when t = 1, then a = and b = d. Since we can scale then numerator and denominator without affecting the reparametrization, set c = 1 and we are left with t = bu (1 u) + bu A rational Bézier curve ( n X(t) = ) w (1 t) n + ( ) n 1 w1 (1 t) n 1 t ( ) n n wn P n t n ( n ) w (1 t) n + ( ) n 1 w1 (1 t) n 1 t ( ) n n wn t n can be raparametrized without changing its endpoints by making the substitutions t = bu (1 u) + bu, (1 t) = (1 u) (1 u) + bu. After multiplying numerator and denominator by ((1 u) + bu) n, we obtain X(t) = ( n ) (b w ) (1 t) n + ( ) n 1 (b 1 w 1 ) (1 t) n 1 t ( ) n n (b n w n )P n t n ( n ) b w (1 t) n + ( ) n b1 w 1 (1 t) n 1 t ( ) n bn w n t n 1 n In other words, if we scale the weights w i by b i, the curve will not be changed!
15 2.11. CIRCULAR ARCS 27 r ; w = 1 ; w 1 = cosq/2 Q ; w = 1 r e Q 1 ; w 1 = (1 + 2cosq/2)/3 q d q Q 2 ; w 2 = (1 + 2cosq/2)/3 e P 2 ; w 2 = 1 Q 3 ; w 3 = 1 Figure 2.18: Circular arcs Circular Arcs Circular arcs can be exactly represented using rational Bézier curves. Figure 2.18 shows a circular arc as both a degree two and a degree three rational Bézier curve. Of course, the control polygons are tangent to the circle. The degree three case is a simple degree elevation of the degree two case. The length e is given by e = 2 sin θ cos θ r. 2 The degree two case has trouble when θ approaches 18 since moves to infinity, although this can be remedied by just using homogeneous coordinates. The degree three case has the advantage that it can represent a larger arc, but even here the length e goes to infinity as θ approaches 24. For large arcs, a simple solution is to just cut the arc in half and use two cubic Bézier curves. A complete circle can be represented as a degree five Bézier curve as shown in Figure Here, the p 3 = (-2,4) p 2 = (2,4) p 4 = (-4,) p 5 = (,) p = (,) p 1 = (4,) Figure 2.19: Circle as Degree 5 Rational Bézier Curve. weights are w = w 5 = 1 and w 1 = w 2 = w 3 = w 4 = 1 5.
16 28 CHAPTER Explicit Bézier Curves An explicit Bézier curve is one for which the x-coordinates of the control points are evenly spaced between and 1. That is, P i = ( i n, y i), i =,..., n. Since n i= i n Bn i (t) t[(1 t) + t]n t, such a Bézier curve takes on the important special form or simply x = t y = f(t) y = f(x). An explicit Bézier curve is sometimes called a non-parametric Bézier curve. It is just a polynomial function expressed in the Bernstein polynomial basis. Figure 2.2 shows a degree five explicit Bézier curve..2 P 4 P P 2 P 3 Figure 2.2: Explicit Bézier curve Integrating Bernstein polynomials Recall that the hodograph (first derivative) of a Bézier curve is easily found by simply differencing adjacent control points (Section 2.5). It is equally simple to compute the integral of a Bernstein polynomial. Since the integral of a polynomial in Bernstein form p(t) = n p i Bi n (t) (2.4) i= is that polynomial whose derivative is p(t). If the desired integral is a degree n + 1 polynomial in Bernstein form n+1 q(t) = q i B n+1 i (t), (2.5) i=
17 2.14. FORWARD DIFFERENCING 29 we have Hence, q = and q i = p i = (n + 1)(q i+1 q i ). (2.6) i 1 j= p j, i = 1, n + 1. (2.7) n + 1 Note that if p(t) is expressed as an explicit Bézier curve, q(t) can be interpreted as the area under p(t) between the lines x = and x = t. Thus, the entire area under an explicit Bézier curve can be computed as simply the average of the control points! This is so because q(1) = q n+1 = n j= p j n + 1. (2.8) 2.14 Forward Differencing Horner s algorithm is the fastest method for evaluating a polynomial at a single point. For a degree n polynomial, it requires n multiplies and n adds. If a polynomial is to be evaluated at several evenly spaced values t, t + δ, t + 2δ,..., t + kδ, the fastest method is to use forward differences. Consider a degree 1 polynomial f(t) = a + a 1 t. The difference between two adjacent function values is 1 (t) = f(t + δ) f(t) = [a + a 1 (t + δ)] [a + a 1 t] = a 1 δ. Thus, f(t) can be evaluated at several evenly spaced points using the algorithm: 1 = a 1 δ t = f() = a for i = 1 to k do t i = t i 1 + δ f(t i ) = f(t i 1 ) + 1 endfor Thus, each successive evaluation requires only one add, as opposed to one add and one multiply for Horner s algorithm. This idea extends to polynomials of any degree. For the quadratic case, f(t) = a + a 1 t + a 2 t 2. The difference between two adjacent function values is 1 (t) = f(t + δ) f(t) = [a + a 1 (t + δ) + a 2 (t + δ) 2 ] [a + a 1 t + a 2 t 2 ] We can now write 1 (t) = a 1 δ + a 2 δ 2 + 2a 2 tδ.
18 3 CHAPTER 2. t = f() = a for i = 1 to k do t i = t i 1 + δ 1 (t i ) = a 1 δ + a 2 δ 2 + 2a 2 t i 1 δ f(t i ) = f(t i 1 ) + 1 (t i 1 ) endfor In this case, (t) is a linear polynomial, so we can evaluate it as above, by defining and our algorithm now becomes t = f() = a 1 = a 1 δ + a 2 δ 2 2 = 2a 2 δ 2 for i = 1 to k do t i = t i 1 + δ f(t i ) = f(t i 1 ) = endfor 2 (t) = 1 (t + δ) 1 (t) = 2a 2 δ 2 It should be clear that for a degree n polynomial, each successive evaluation requires n adds and no multiplies! For a cubic polynomial the forward difference algorithm becomes t = f() = a 1 = a 1 δ + a 2 δ 2 + a 3 δ 3 2 = 2a 2 δ 2 + 6a 3 δ 3 3 = 6a 3 δ 3 for i = 1 to k do t i = t i 1 + δ f(t i ) = f(t i 1 ) = = endfor f(t) = a + a 1 t + a 2 t 2 + a 3 t 3,
19 2.14. FORWARD DIFFERENCING 31 Several questions remain. First, what are the initial values for the i if we want to start at some value other than t =. Second, what is a general equation for the i for a general degree n polynomial f(t). Also, what if our polynomial is not in power basis. These questions can be answered almost trivially by observing the following. Since t i+1 = t i + δ, we have 1 (t i ) = f(t i+1 ) f(t); j (t i ) = j 1 (t i+1 ) j 1 (t i ), j = 2,..., n; n (t i ) = n (t i+1 ) = n (t i+k ) = a constant n+1 = Thus, our initial values for j (t i ) can be found by simply computing f(t i ), f(t i+1 ),..., f(t i+n ) and from them computing the initial differences. This lends itself nicely to a table. Here is the table for a degree four case: f(t i ) f(t i+1 ) f(t i+2 ) f(t i+3 ) f(t i+4 ) 1 (t i ) 1 (t i+1 ) 1 (t i+2 ) 1 (t i+3 ) 2 (t i ) 2 (t i+1 ) 2 (t i+2 ) 3 (t i ) 3 (t i+1 ) 4 (t i ) To compute f(t i+5 ), we simply note that every number R in this table, along with its right hand neighbor R right and the number directly beneath it R down obey the rule Thus, we can simply fill in the values R right = R + R down. 4 (t i+1 ) = 4 (t i ) + 3 (t i+2 ) = 3 (t i+1 ) + 4 (t i+1 ) 2 (t i+3 ) = 2 (t i+2 ) + 3 (t i+2 ) 1 (t i+4 ) = 1 (t i+3 ) + 2 (t i+3 ) f(t i+5 ) = f(t i+4 ) + 1 (t i+4 ) Note that this technique is independent of the basis in which f(t) is defined. Thus, even if it is defined in Bernstein basis, all we need to do is to evaluate it n + 1 times to initiate the forward differencing. For example, consider the degree 4 polynomial for which f(t i ) = 1, f(t i+1 ) = 3, f(t i+2 ) = 2, f(t i+3 ) = 5, f(t i+4 ) = 4. We can compute f(t i+5 ) = 24, f(t i+6 ) = 117, and f(t i+7 ) = 328 from the following difference table: t : t i t i+1 t i+2 t i+3 t i+4 t i+5 t i+6 t i+7 f(t) : (t) : (t) : (t) : (t) : (t) :
20 32 CHAPTER Forward Differencing Horner s algorithm is the fastest method for evaluating a polynomial at a single point. For a degree n polynomial, it requires n multiplies and n adds. If a polynomial is to be evaluated at several evenly spaced values t, t + δ, t + 2δ,..., t + kδ, the fastest method is to use forward differences. Consider a degree 1 polynomial f(t) = a + a 1 t. The difference between two adjacent function values is 1 (t) = f(t + δ) f(t) = [a + a 1 (t + δ)] [a + a 1 t] = a 1 δ. Thus, f(t) can be evaluated at several evenly spaced points using the algorithm: 1 = a 1 δ t = f() = a for i = 1 to k do t i = t i 1 + δ f(t i ) = f(t i 1 ) + 1 endfor Thus, each successive evaluation requires only one add, as opposed to one add and one multiply for Horner s algorithm. This idea extends to polynomials of any degree. For the quadratic case, f(t) = a + a 1 t + a 2 t 2. The difference between two adjacent function values is We can now write t = f() = a 1 (t) = f(t + δ) f(t) = [a + a 1 (t + δ) + a 2 (t + δ) 2 ] [a + a 1 t + a 2 t 2 ] for i = 1 to k do t i = t i 1 + δ 1 (t i ) = a 1 δ + a 2 δ 2 + 2a 2 t i 1 δ f(t i ) = f(t i 1 ) + 1 (t i 1 ) endfor 1 (t) = a 1 δ + a 2 δ 2 + 2a 2 tδ. In this case, (t) is a linear polynomial, so we can evaluate it as above, by defining and our algorithm now becomes 2 (t) = 1 (t + δ) 1 (t) = 2a 2 δ 2
21 2.15. FORWARD DIFFERENCING 33 t = f() = a 1 = a 1 δ + a 2 δ 2 2 = 2a 2 δ 2 for i = 1 to k do t i = t i 1 + δ f(t i ) = f(t i 1 ) = endfor It should be clear that for a degree n polynomial, each successive evaluation requires n adds and no multiplies! For a cubic polynomial the forward difference algorithm becomes t = f() = a 1 = a 1 δ + a 2 δ 2 + a 3 δ 3 2 = 2a 2 δ 2 + 6a 3 δ 3 3 = 6a 3 δ 3 for i = 1 to k do t i = t i 1 + δ f(t i ) = f(t i 1 ) = = endfor f(t) = a + a 1 t + a 2 t 2 + a 3 t 3, Several questions remain. First, what are the initial values for the i if we want to start at some value other than t =. Second, what is a general equation for the i for a general degree n polynomial f(t). Also, what if our polynomial is not in power basis. These questions can be answered almost trivially by observing the following. Since t i+1 = t i + δ, we have 1 (t i ) = f(t i+1 ) f(t); j (t i ) = j 1 (t i+1 ) j 1 (t i ), j = 2,..., n; n (t i ) = n (t i+1 ) = n (t i+k ) = a constant n+1 =
22 34 CHAPTER 2. Thus, our initial values for j (t i ) can be found by simply computing f(t i ), f(t i+1 ),..., f(t i+n ) and from them computing the initial differences. This lends itself nicely to a table. Here is the table for a degree four case: f(t i ) f(t i+1 ) f(t i+2 ) f(t i+3 ) f(t i+4 ) 1 (t i ) 1 (t i+1 ) 1 (t i+2 ) 1 (t i+3 ) 2 (t i ) 2 (t i+1 ) 2 (t i+2 ) 3 (t i ) 3 (t i+1 ) 4 (t i ) To compute f(t i+5 ), we simply note that every number R in this table, along with its right hand neighbor R right and the number directly beneath it R down obey the rule Thus, we can simply fill in the values R right = R + R down. 4 (t i+1 ) = 4 (t i ) + 3 (t i+2 ) = 3 (t i+1 ) + 4 (t i+1 ) 2 (t i+3 ) = 2 (t i+2 ) + 3 (t i+2 ) 1 (t i+4 ) = 1 (t i+3 ) + 2 (t i+3 ) f(t i+5 ) = f(t i+4 ) + 1 (t i+4 ) Note that this technique is independent of the basis in which f(t) is defined. Thus, even if it is defined in Bernstein basis, all we need to do is to evaluate it n + 1 times to initiate the forward differencing. For example, consider the degree 4 polynomial for which f(t i ) = 1, f(t i+1 ) = 3, f(t i+2 ) = 2, f(t i+3 ) = 5, f(t i+4 ) = 4. We can compute f(t i+5 ) = 24, f(t i+6 ) = 117, and f(t i+7 ) = 328 from the following difference table: t : t i t i+1 t i+2 t i+3 t i+4 t i+5 t i+6 t i+7 f(t) : (t) : (t) : (t) : (t) : (t) :
CHAPTER 4 CURVES 4.1 Introduction In order to understand the significance of curves, we should look into the types of model representations that are used in geometric modeling. Curves play a very significant
parametric spline curves 1 curves used in many contexts fonts (2D) animation paths (3D) shape modeling (3D) different representation implicit curves parametric curves (mostly used) 2D and 3D curves are
Geometric Modelling & Curves Geometric Modeling Creating symbolic models of the physical world has long been a goal of mathematicians, scientists, engineers, etc. Recently technology has advanced sufficiently
Chapter 7 Planar Curve Intersection Curve intersection involves finding the points at which two planar curves intersect. If the two curves are parametric, the solution also identifies the parameter values
Chapter 7 Curve Intersection Several algorithms address the problem of computing the points at which two curves intersect. Predominant approaches are the Bézier subdivision algorithm [LR80], the interval
Computer Graphics CS 54 Lecture 1 (Part 1) Curves Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) So Far Dealt with straight lines and flat surfaces Real world objects include
Department of Applied Mathematics and Computational Sciences University of Cantabria UC-CAGD Group COMPUTER-AIDED GEOMETRIC DESIGN AND COMPUTER GRAPHICS: BEZIER CURVES AND SURFACES Andrés Iglesias e-mail:
Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 10 Curves So today we are going to have a new topic. So far
Corollary For equidistant knots, i.e., u i = a + i (b-a)/n, we obtain with (f є C n+1 [a,b]). Proof: This follows directly from the preceding theorem using the inequality 120202: ESM4A - Numerical Methods
The Calculus of Functions of Several Variables Section. Introduction to R n Calculus is the study of functional relationships and how related quantities change with each other. In your first exposure to
Chapter 1 Vocabulary identity - A statement that equates two equivalent expressions. verbal model- A word equation that represents a real-life problem. algebraic expression - An expression with variables.
Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks Welcome to Thinkwell s Homeschool Precalculus! We re thrilled that you ve decided to make us part of your homeschool curriculum. This lesson
Chapter 1 DEGREE OF A CURVE Road Map The idea of degree is a fundamental concept, which will take us several chapters to explore in depth. We begin by explaining what an algebraic curve is, and offer two
Chapter 4 Spline Curves A spline curve is a mathematical representation for which it is easy to build an interface that will allow a user to design and control the shape of complex curves and surfaces.
Solutions to old Exam 1 problems Hi students! I am putting this old version of my review for the first midterm review, place and time to be announced. Check for updates on the web site as to which sections
Name: Solutions to Practice Final. Consider the line r(t) = 3 + t, t, 6. (a) Find symmetric equations for this line. (b) Find the point where the first line r(t) intersects the surface z = x + y. (a) We
Parametric Curves, Vectors and Calculus Jeff Morgan Department of Mathematics University of Houston firstname.lastname@example.org Online Masters of Arts in Mathematics at the University of Houston http://www.math.uh.edu/matweb/grad_mam.htm
Calculus C/Multivariate Calculus Advanced Placement G/T Essential Curriculum UNIT I: The Hyperbolic Functions basic calculus concepts, including techniques for curve sketching, exponential and logarithmic
LINES AND PLANES CHRIS JOHNSON Abstract. In this lecture we derive the equations for lines and planes living in 3-space, as well as define the angle between two non-parallel planes, and determine the distance
Appendix H H.Calculating Normal Vectors This appendix describes how to calculate normal vectors for surfaces. You need to define normals to use the OpenGL lighting facility, which is described in Chapter
Parametric Curves (Com S 477/577 Notes) Yan-Bin Jia Oct 8, 2015 1 Introduction A curve in R 2 (or R 3 ) is a differentiable function α : [a,b] R 2 (or R 3 ). The initial point is α[a] and the final point
Higher Education Math Placement Placement Assessment Problem Types 1. Whole Numbers, Fractions, and Decimals 1.1 Operations with Whole Numbers Addition with carry Subtraction with borrowing Multiplication
John Vince Essential Mathematics for Computer Graphics fast Springer Contents 1. MATHEMATICS 1 Is mathematics difficult? 3 Who should read this book? 4 Aims and objectives of this book 4 Assumptions made
Exam Sample Question SOLUTIONS. Eliminate the parameter to find a Cartesian equation for the curve: x e t, y e t. SOLUTION: You might look at the coordinates and notice that If you don t see it, we can
Math 241, Exam 1 Information. 9/24/12, LC 310, 11:15-12:05. Exam 1 will be based on: Sections 12.1-12.5, 14.1-14.3. The corresponding assigned homework problems (see http://www.math.sc.edu/ boylan/sccourses/241fa12/241.html)
Further Pure Summary Notes. Roots of Quadratic Equations For a quadratic equation ax + bx + c = 0 with roots α and β Sum of the roots Product of roots a + b = b a ab = c a If the coefficients a,b and c
A Geometric Characterization of Parametric Cubic Curves MAUREEN C. STONE Xerox PARC and TONY D. DEROSE University of Washington In this paper, we analyze planar parametric cubic curves to determine conditions
AP Calculus BC Course Description: Advanced Placement Calculus BC is primarily concerned with developing the students understanding of the concepts of calculus and providing experiences with its methods
MATH 32: CALCULUS II SYLLABUS Prerequisites: Successful completion of Math 3 (or its equivalent elsewhere). Math 27 is normally not a sufficient prerequisite for Math 32. Required Text: Calculus: Early
A QUIK GUIDE TO THE FOMULAS OF MULTIVAIABLE ALULUS ontents 1. Analytic Geometry 2 1.1. Definition of a Vector 2 1.2. Scalar Product 2 1.3. Properties of the Scalar Product 2 1.4. Length and Unit Vectors
206 CHAP. 4 INTERPOLATION AND POLYNOMIAL APPROXIMATION Lagrange Polynomial Approximation 4.3 Lagrange Approximation Interpolation means to estimate a missing function value by taking a weighted average
MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem David L. Finn November 30th, 2004 In the next few days, we will introduce some of the basic problems in geometric modelling, and
The line L through the points A and B is parallel to the vector AB = 3, 2, and has parametric equations x = 3t + 2, y = 2t +, z = t Therefore, the intersection point of the line with the plane should satisfy:
Mathematics Review for MS Finance Students Anthony M. Marino Department of Finance and Business Economics Marshall School of Business Lecture 1: Introductory Material Sets The Real Number System Functions,
Ch. 8 Solving Quadratic & Higher Degree Inequalities We solve quadratic and higher degree inequalities very much like we solve quadratic and higher degree equations. One method we often use to solve quadratic
SOLUTIONS Problem. Find the critical points of the function f(x, y = 2x 3 3x 2 y 2x 2 3y 2 and determine their type i.e. local min/local max/saddle point. Are there any global min/max? Partial derivatives
olutions for Review Problems 1. Let be the triangle with vertices A (,, ), B (4,, 1) and C (,, 1). (a) Find the cosine of the angle BAC at vertex A. (b) Find the area of the triangle ABC. (c) Find a vector
Modeling Curves and Surfaces Graphics I Modeling for Computer Graphics!? 1 How can we generate this kind of objects? Umm!? Mathematical Modeling! S Do not worry too much about your difficulties in mathematics,
Simplify the following vector expressions: 1. a (a + b). (a + b) (a b) 3. (a b) (a + b) Chapter 1 Vectors, lines, planes 1. Recall that cross product distributes over addition, so a (a + b) = a a + a b.
olutions to Practice Problems for Test 4 1. Let be the line segmentfrom the point (, 1, 1) to the point (,, 3). Evaluate the line integral y ds. Answer: First, we parametrize the line segment from (, 1,
Chapter 22 Parametric Equations Imagine a car is traveling along the highway you look down at the situation from high above highway curve (static) place car moving point (dynamic) Figure 22.1 The dynamic
Biggar High School Mathematics Department National 5 Learning Intentions & Success Criteria: Assessing My Progress Expressions & Formulae Topic Learning Intention Success Criteria I understand this Approximation
Algebra I Vocabulary Cards Table of Contents Expressions and Operations Natural Numbers Whole Numbers Integers Rational Numbers Irrational Numbers Real Numbers Absolute Value Order of Operations Expression
Implicit Functions Defining Implicit Functions Up until now in this course, we have only talked about functions, which assign to every real number x in their domain exactly one real number f(x). The graphs
Centre for Education in Mathematics and Computing Euclid eworkshop # Functions and Equations c 014 UNIVERSITY OF WATERLOO Euclid eworkshop # TOOLKIT Parabolas The quadratic f(x) = ax + bx + c (with a,b,c
11 Vectors and the Geometry of Space 11.1 Vectors in the Plane Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. 2 Objectives! Write the component form of
Section 13.5 Equations of Lines and Planes Generalizing Linear Equations One of the main aspects of single variable calculus was approximating graphs of functions by lines - specifically, tangent lines.
Practice Final Math Spring Instructor: Jeff Lang. Find the limit of the sequence a n = ln (n 5) ln (3n + 8). A) ln ( ) 3 B) ln C) ln ( ) 3 D) does not exist. Find the limit of the sequence a n = (ln n)6
3. Interpolation Closing the Gaps of Discretization... Beyond Polynomials Closing the Gaps of Discretization... Beyond Polynomials, December 19, 2012 1 3.3. Polynomial Splines Idea of Polynomial Splines
Core Standards of the Course Standard 1 Students will acquire number sense and perform operations with real and complex numbers. Objective 1.1 Compute fluently and make reasonable estimates. 1. Simplify
Practice Problems for Midterm () For each of the following, find and sketch the domain, find the range (unless otherwise indicated), and evaluate the function at the given point P : (a) f(x, y) = + 4 y,
Content Expectations for Precalculus Michigan Precalculus 2011 REVERSE CORRELATION CHAPTER/LESSON TITLES Chapter 0 Preparing for Precalculus 0-1 Sets There are no state-mandated Precalculus 0-2 Operations
Visit this link to read the introductory text for this syllabus. 1. Circular Measure Lengths of Arcs of circles and Radians Perimeters of Sectors and Segments measure in radians 2. Trigonometry (i) Sine,
The Calculus of Functions of Several Variables Section 1.4 Lines, Planes, Hyperplanes In this section we will add to our basic geometric understing of R n by studying lines planes. If we do this carefully,
Mathematics 31 Pre-calculus and Limits Overview After completing this section, students will be epected to have acquired reliability and fluency in the algebraic skills of factoring, operations with radicals
Review of Fundamental Mathematics As explained in the Preface and in Chapter 1 of your textbook, managerial economics applies microeconomic theory to business decision making. The decision-making tools
Equations Involving Lines and Planes In this section we will collect various important formulas regarding equations of lines and planes in three dimensional space Reminder regarding notation: any quantity
Chapter 10 Series and Approximations An important theme in this book is to give constructive definitions of mathematical objects. Thus, for instance, if you needed to evaluate 1 0 e x2 dx, you could set
MATHEMATICS: THE LEVEL DESCRIPTIONS In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data. Attainment target
Name: Class: Date: ID: A Algebra II Semester Exam Review Sheet 1. Translate the point (2, 3) left 2 units and up 3 units. Give the coordinates of the translated point. 2. Use a table to translate the graph
Chapter 4 Differentiation of vectors 4.1 Vector-valued functions In the previous chapters we have considered real functions of several (usually two) variables f : D R, where D is a subset of R n, where
Solving Polynomial Equations 3.3 Introduction Linear and quadratic equations, dealt within Sections 3.1 and 3.2, are members of a class of equations, called polynomial equations. These have the general
Math 1d Instructor: Padraic Bartlett Lectures 5-: Taylor Series Weeks 5- Caltech 213 1 Taylor Polynomials and Series As we saw in week 4, power series are remarkably nice objects to work with. In particular,
DETAILED SOLUTIONS AND CONCEPTS - POLYNOMIAL FUNCTIONS Prepared by Ingrid Stewart, Ph.D., College of Southern Nevada Please Send Questions and Comments to email@example.com. Thank you! PLEASE NOTE
South Carolina College- and Career-Ready (SCCCR) Algebra 1 South Carolina College- and Career-Ready Mathematical Process Standards The South Carolina College- and Career-Ready (SCCCR) Mathematical Process
Analytic Geometry Section 2-6: Circles Objective: To find equations of circles and to find the coordinates of any points where circles and lines meet. Page 81 Definition of a Circle A circle is the set
Solving Simultaneous Equations and Matrices The following represents a systematic investigation for the steps used to solve two simultaneous linear equations in two unknowns. The motivation for considering
MATH 55 SOLUTIONS TO PRACTICE FINAL EXAM x 2 4.Compute x 2 x 2 5x + 6. When x 2, So x 2 4 x 2 5x + 6 = (x 2)(x + 2) (x 2)(x 3) = x + 2 x 3. x 2 4 x 2 x 2 5x + 6 = 2 + 2 2 3 = 4. x 2 9 2. Compute x + sin
Student Performance Q&A: AP Calculus AB and Calculus BC Free-Response Questions The following comments on the free-response questions for AP Calculus AB and Calculus BC were written by the Chief Reader,
NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS TEST DESIGN AND FRAMEWORK September 2014 Authorized for Distribution by the New York State Education Department This test design and framework document
2.2. Instantaneous Velocity toc Assuming that your are not familiar with the technical aspects of this section, when you think about it, your knowledge of velocity is limited. In terms of your own mathematical
2.6.2 Cramer s Rule Determinants can be used to solve a linear system of equations using Cramer s Rule. Cramer s Rule for Two Equations in Two Variables Given the system This system has the unique solution
Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are
Understanding Basic Calculus S.K. Chung Dedicated to all the people who have helped me in my life. i Preface This book is a revised and expanded version of the lecture notes for Basic Calculus and other
LINEAR ALGEBRA W W L CHEN c W W L Chen, 1982, 2008. This chapter originates from material used by author at Imperial College, University of London, between 1981 and 1990. It is available free to all individuals,
Limits Limits: Graphical Solutions Graphical Limits Let be a function defined on the interval [-6,11] whose graph is given as: The limits are defined as the value that the function approaches as it goes
LINE INTEGRALS OF VETOR FUNTIONS: GREEN S THEOREM ontents 1. A differential criterion for conservative vector fields 1 2. Green s Theorem 3 1. A differential criterion for conservative vector fields We