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
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
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 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
On-Line Geometric Modeling Notes QUADRATIC BÉZIER CURVES Kenneth I. Joy Visualization and Graphics Research Group Department of Computer Science University of California, Davis Overview The Bézier curve
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
COMPUTER AIDED GEOMETRIC DESIGN Thomas W. Sederberg September 28, 2016 ii T. W. Sederberg iii Preface I have taught a course at Brigham Young University titled Computer Aided Geometric Design since 1983.
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:
Not The Not-Formula Book for C1 Everything you need to know for Core 1 that won t be in the formula book Examination Board: AQA Brief This document is intended as an aid for revision. Although it includes
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
lecture 10 - cubic curves - cubic splines - bicubic surfaces We want to define smooth curves: - for defining paths of cameras or objects - for defining 1D shapes of objects We want to define smooth surfaces
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
4.B. Tangent and normal lines to conics Apollonius work on conics includes a study of tangent and normal lines to these curves. The purpose of this document is to relate his approaches to the modern viewpoints
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.
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
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
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
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
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, Vectors and Calculus Jeff Morgan Department of Mathematics University of Houston email@example.com Online Masters of Arts in Mathematics at the University of Houston http://www.math.uh.edu/matweb/grad_mam.htm
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
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
Assignment. Solutions. Problems. February.. Find a vector of magnitude in the direction opposite to the direction of v = i j k. The vector we are looking for is v v. We have Therefore, v = 4 + 4 + 4 =.
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
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
12 Vector-Valued Functions 12.1 Vector-Valued Functions Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. Objectives! Analyze and sketch a space curve given
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)
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
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
The Derivative and the Tangent Line Problem Calculus grew out of four major problems that European mathematicians were working on during the seventeenth century. 1. The tangent line problem 2. The velocity
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
PROBLEM SET Practice Problems for Exam #2 Math 2350, Fall 2004 Nov. 7, 2004 Corrected Nov. 10 ANSWERS i Problem 1. Consider the function f(x, y) = xy 2 sin(x 2 y). Find the partial derivatives f x, f y,
Voronoi Diagrams 4 A city builds a set of post offices, and now needs to determine which houses will be served by which office. It would be wasteful for a postman to go out of their way to make a delivery
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 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
1. Simplify each expression, and eliminate any negative exponent(s). a. b. c. 2. Simplify the expression. Assume that a and b denote any real numbers. (Assume that a denotes a positive number.) 3. Find
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
AQA Qualifications AQA Level 2 Certificate FURTHER MATHEMATICS Level 2 (8360) Our specification is published on our website (www.aqa.org.uk). We will let centres know in writing about any changes to the
Able Enrichment Centre - Prep Level Curriculum Unit 1: Number Systems Number Line Converting expanded form into standard form or vice versa. Define: Prime Number, Natural Number, Integer, Rational Number,
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
Common Curriculum Map Discipline: Math Course: College Algebra August/September: 6A.5 Perform additions, subtraction and multiplication of complex numbers and graph the results in the complex plane 8a.4a
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
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,
3. Double Integrals 3.. Volume of an enclosed region Consider the diagram in Figure. It shows a curve in two variables z f(x, y) that lies above some region on the xy-plane. How can we calculate the volume
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.
Chapter 4 Surfaces In this chapter we turn to surfaces in general. We discuss the following topics. Describing surfaces with equations and parametric descriptions. Some constructions of surfaces: surfaces
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 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,
Comal Independent School District Pre- Pre-Calculus Scope and Sequence Third Quarter Assurances. The student will plot points in the Cartesian plane, use the distance formula to find the distance between
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,
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
Curvature 13.4 Introduction Curvature is a measure of how sharply a curve is turning as it is traversed. At a particular point along the curve a tangent line can be drawn; this line making an angle ψ with
REVISED GCSE Scheme of Work Mathematics Higher Unit 6 For First Teaching September 2010 For First Examination Summer 2011 This Unit Summer 2012 Version 1: 28 April 10 Version 1: 28 April 10 Unit T6 Unit
Math 497C Sep 17, 2004 1 Curves and Surfaces Fall 2004, PSU Lecture Notes 4 1.9 Curves of Constant Curvature Here we show that the only curves in the plane with constant curvature are lines and circles.
Terms and Definitions Absolute Value the magnitude of a number, or the distance from 0 on a real number line Additive Property of Area the process of finding an the area of a shape by totaling the areas
arxiv:cs/0503054v1 [cs.gr] 22 Mar 2005 ANALYTIC DEFINITION OF CURVES AND SURFACES BY PARABOLIC BLENDING by A.W. Overhauser Mathematical and Theoretical Sciences Department Scientific Laboratory, Ford Motor
REVISED GCSE Scheme of Work Mathematics Higher Unit T3 For First Teaching September 2010 For First Examination Summer 2011 Version 1: 28 April 10 Version 1: 28 April 10 Unit T3 Unit T3 This is a working
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
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
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
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
Number Theory Homework. 1. Pythagorean triples and rational points on quadratics and cubics. 1.1. Pythagorean triples. Recall the Pythagorean theorem which is that in a right triangle with legs of length
Advanced Algebra 2 I. Equations and Inequalities A. Real Numbers and Number Operations 6.A.5, 6.B.5, 7.C.5 1) Graph numbers on a number line 2) Order real numbers 3) Identify properties of real numbers
Question: What is the quadratic fmula? Question: What is the discriminant? Question: How do you determine if a quadratic equation has no real roots? The discriminant is negative ie Question: How do you
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 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,
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
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
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
Your consent to our cookies if you continue to use this website.