Interpolation and polynomial approximation Interpolation

Size: px
Start display at page:

Download "Interpolation and polynomial approximation Interpolation"

Transcription

1 Outline Interpolation and polynomial approximation Interpolation Lagrange Cubic Approximation Bézier curves B- 1

2 Some vocabulary (again ;) Control point : Geometric point that serves as support to the curve Knot : a specific value of the parameter u corresponding to a joint between pieces of a curve Knot sequence : the set of knots values (in an increasing order). Wolfram research 2

3 Interpolation The curve passes through the control points Approximation The curve doesn't necessary passes through the control points But these have an influence... Statistic approaches? Least squares «Kriging» Not very adapted to geometric modelling 3

4 Interpolation 4

5 Interpolation Interpolation We want draw a regular and smooth parametric curve through a certain number n of points Pi Several families of base functions are available Most obvious are polynomials There are others Trigonometric functions (by mean of a Fourier decomposition for instance) Power functions etc... 5

6 Interpolation We must choose the parametrization (nodal sequence) Uniform u2=2 u1=1 un-1=n-1 u0=0 6

7 Interpolation Or non-uniform u2=7 u1=2.5 un-1=15 u0=0 7

8 Interpolation Can we choose u as a curvilinear abscissa? In principle no since we don't know the final shape of the curve beforehand (with the exception of interpolation points) We will see later that it is often impossible that u corresponds with s exactly along the whole curve using analytical functions. But nothing forbids to get close to that numerically... 8

9 Interpolation Parametrization as an approximate arc length u2=d1+d2 d2 u1=d1 d1 dn-1 u0=0 un-1=d1+...+dn-1 9

10 Interpolation In all cases, we want to have : x u i = xi P u i =P i y u i = y i { We are going to interpolate the functions x(u) and y(u) with ONE polynomial with n parameters This one must be of order p=n-1 : 2 x u =a 0 a 1 u a 2 u a n 1 u n 1 n 1 = a j u j j=0 We set the linear system and solve... { x u 1 =x 1 x u n 1 =x n 1 10

11 Interpolation Vandermonde matrix { 1 u0 u u n 1 0 n 1 1 a0 x0 x u 1 =x 1 1 u1 u u a1 = x 1 x u n 1 =x n 1 2 n 1 x n 1 1 u n 1 u n 1 u n 1 a n 1 Can be solved by classical numerical methods, but... ( )( ) ( ) The condition number of this matrix is VERY bad It must be solved for each RHS member ( ( xi ) or ( yi ) ), or have to take the inverse of this matrix, or perform an LU decomposition. 11

12 Interpolation Instead of setting the polynomial in x and in y and solving, we can put it under the following n 1 form : p { x u = x i l i u 0 n 1 p i i y u = y l u 0 n 1 P u = P i l ip u 0, where the lip(u) are a polynomial basis of order p=n-1. These polynomials verify, for an interpolation : p i l u j = ij We have only one computation to do for any position of the interpolation points, knowing the ui (the parametrization) 12

13 Interpolation Lets determine the li(u) : they are of order n-1 and such that : l p u =1 ; i= j l ip u j = ij { i p i j l u j =0 ; i j lip may be factored by (u-uj) for j i p i l u =k u u 0 u u 1 u u i 1 u u i 1 u u n 1 k is such that l ip ui =1 k = ui u 0 ui u 1 ui u i 1 u i u i 1 ui un 1 1 p i l (u)= n 1 j=0, j i (u u j ) (ui u j ) The lip are the Lagrange polynomials of order p 13

14 Interpolation Lagrange polynomials p n 1 u u j l u l u = p ' = l u i u ui j=0,i j u i u j p i p n 1 l u = u u j p' j=0 n 1 l (u i )= (u i u j ) j=0, j i (first derivative w/r to u at u=u i ) Properties Interpolation l ip u j = ij Partition of unity n 1 n 1 p l i (u)=1 0 x(u)= x i l ip (u) with x i =1 i 0 14

15 Lagrange polynomials Order 4 The ui are evenly distributed between u=0 and u=1 The sum is equal to 1 (partition of unity) Presence of negative values 15

16 Lagrange polynomials Order 10 Presence of huge overshoots near the boundaries 16

17 Lagrange polynomials The interpolation is represented by the following form : n 1 p i i p i P (u)= P l (u) with l (u)= i=0 n 1 j=0, i j (u u i ) (u j u i ) Two things worth noting: The curve depends linearly on the position of the points It is formed by a weighted sum of basis functions that express the influence of each point on the curve 17

18 Lagrange polynomials An experiment We approximate a circle by an increasing number of points Simultaneously, approximation order increases In every case, the curve is C 18

19 Lagrange polynomials 3 points, order 2 (a parabola!) 19

20 Lagrange polynomials 5 points, order 4 20

21 Lagrange polynomials 11 points, order 10 21

22 Lagrange polynomials 21 points, order 20 22

23 Lagrange polynomials Does it work? The points were set exactly on the circle What occurs if their position is inaccurate? Or if the approximated shape is not so simple? We are going to see two cases The coordinates of the points are perturbed randomly A deterministic increase and decrease of the radius 23

24 Lagrange perturbation Random perturbation Each point is moved radially by a value between -0.5 and +0.5 % of the circle's radius 24

25 Lagrange polynomials 3 points, random perturbation 1% 25

26 Lagrange polynomials 5 points, random perturbation 1% 26

27 Lagrange polynomials 11 points, random perturbation 1% 27

28 Lagrange polynomials 21 points, random perturbation 1% 28

29 Lagrange polynomials Runge phenomenon Similar to Gibbs phenomenon of the decompositions in harmonic functions 29

30 Lagrange polynomials Deterministic perturbation Each point is moved radially by a value of -5 or +5 % of the circle's radius 30

31 Lagrange polynomials 3 points, deterministic perturbation 10% 31

32 Lagrange polynomials 5 points, deterministic perturbation 10% 32

33 Lagrange polynomials 11 points, deterministic perturbation 10% 33

34 Lagrange polynomials 21 points, deterministic perturbation 10% 34

35 Lagrange polynomials How to minimize Runge's phenomenon? The problem here is the use of a unique polynomial and regular intervals between knots. Instead, if we concentrate knots at the extremities, the interpolation is less prone to Runge's phenomenon. Make use of Chebyshev knots: 2i 1 u =cos π 2n ( n i ) in the interval [-1,1] or uin = cos 2i 1 π 2 2 ( 2n ) in the interval [0,1] 35

36 Lagrange polynomials 21 points, random perturbation 1% Uniform nodal intervals lagrange interpolation 36

37 Lagrange polynomials 21 points, random perturbation 1% Using Chebychev knots 37

38 Lagrange polynomials Perturbation of a point We shift one point by a big displacement 38

39 Lagrange polynomials 11 points, using Chebychev knots 39

40 Lagrange polynomials 11 points, using Chebychev knots 40

41 Lagrange polynomials 99 points, using Chebychev knots 41

42 Lagrange polynomials 499 points, using Chebychev knots 42

43 Lagrange polynomials Even without perturbations, we still do numerical approximations Up to how many points can we pass through? 43

44 Lagrange polynomials 51 points (lagrange polynomial of order 50) 44

45 Lagrange polynomials 61 points (lagrange polynomial of order 60) 45

46 Lagrange polynomials Here it has nothing to do with Runge's phenomenon It's rather an accumulation of errors due to arithmetic calculations done in finite precision In our case, near the boundaries, we do an inexact sum of very big numbers in absolute value, but whose sum (the exact sum) is close to the unit (partition of unity). n 1 n 1 p i i p i P (u)= P l (u) with l (u)= i=0 j=0, i j (u u i ) (u j u i ) Big numbers in absolute value, computed with a good relative accuracy Sum increasing the relative error 46

47 Lagrange polynomials How to evaluate a polynomial? Under its Lagrange form (here) : robust except at the boundaries Alternative : newton's formula and divided differences Horner's scheme n 1 P u = i u i P u = a 0 u a 1 u a 2 u a n 1 i=0 Others techniques adapted to particular forms of polynomials later in the course e.g. Optimal method with respect to the number of arithmetic operations for a polynomial expressed as a sum of monomials may be numerically unstable Algorithm of De Casteljau for Bernstein polynomials Algorithm of De Boor for the evaluation of Bsplines In any case, one should be cautious with numerical errors!47

48 Numerical errors Numerical errors Floating point calculations are (most of the time) inaccurate Analysis of the rounding done during operations in floating point : x y= x y 1 1, 1 2 x y= x y 1 2, 2 2 x y= xy 1 3, 3 Mathematically equivalent calculations but expressed differently give distinct results An example with x 2 y 2 = x y x y 48

49 Numerical errors Error made with the expression x y x y x y x y = x y 1 1 x y = x y x y No catastrophic increase of the relative error Error made with the expression x 2 y 2 = [ x 2 (1+ δ1 ) y 2 (1+ δ 2 )](1+ δ3 ) = (( x 2 y 2 )(1+ δ 1)+ (δ1 δ 2 ) y 2 )(1+ δ 3 ) = (( x y )(1+ δ1+ δ3+ (δ1 δ2 ) y + δ1 δ3 + (δ1 δ 2 ) y δ 3 )) ( x x) ( y y) When x is close to y, the error can be of the order of magnitude of the theoretical result... 49

50 Numerical errors Some useful rules (not a comprehensive list!) Prefer x y x y to 2 x y 2 Lagrange form more accurate than horner's scheme N E. g. sum of many terms S = X [ j ] Naive algorithm : j=1 S=0; for (j=1;j<=n;j++){ S=S+X[j] ; } return S ; involves an error N Kahan's summation algorithm S=X[1];C=0 for (j=2;j<=n;j++) { Y=X[j]-C; T=S+Y; C=(T-S)-Y; S=T } return S ; involves an error 2 50

51 Numerical errors Example of catastrophic rounding nx*ny samples Computation of an integral : ymax f ( x, y)dxdy with f (x, y)=x + y 2 S= 2 Ω nx 1 ny 1 S i=0 f x i, y j det J ymin j=0 dx= x max x min / nx dy= y max y min / ny x i = x min i dx dx / 2 y j = y min j dy dy /2 det J =dx dy xmin y xmax x 51

52 Numerical errors Computations made with the following parameters: xmin= ymin= 0.0 ; xmax= ymax= 1.0 ; nx = ny = 10, Sexact=2/3 1) Single precision floating point numbers 2) Double precision floating point numbers 3) Quad precision floating point numbers 4) Single precision floating points numbers with Kahan's summation algorithm bechet@yakusa:floating_error$./test 10 1) sum (float )= ) sum (double )= ) sum (ldouble)= ) sum (kahan )= Note : Program should be compiled without optimization! 52

53 Numerical errors 100 1) sum (float )= ) sum (double )= ) sum (ldouble)= ) sum (kahan )= ) sum (float )= ) sum (double )= ) sum (ldouble)= ) sum (kahan )=

54 Numerical errors ) sum (float )= ) sum (double )= ) sum (ldouble)= ) sum (kahan )= ) sum (float )= ) sum (double )= ) sum (ldouble)= ) sum (kahan )= Compensated summation algorithm coming from : William Kahan. Further remarks on reducing truncation errors. Comm. ACM, 8(1):40,

55 Numerical errors y=p(x)=(1-x)n for x=1.333 and 2<n<41 S. Graillat, Ph. Langlois, N. Louvet Compensated Horner Scheme Research Report RR , LP2A, University of Perpignan, France, july

56 Numerical errors Definition of the condition number of a numerical expression Ratio of the direct error to the inverse error y K P, x =lim sup 0 x D x For a polynomial K P, x = i=0 ai x p p i n inverse error δ x x +δ x ( monomial form ) n p x y= p( x ) δy direct error y = p ( x )= y +δ y = p( x +δ x ) i a x i=0 i 56

57 Numerical errors There are various compensated algorithms to carry out calculations on floating point numbers. Ex. Kahan summation, Compensated Horner scheme... In general, they allow to have similar results as when using internal floating point with a precision twice that of the input data, following by a final rounding. See references available on the course's website for the compensated Horner scheme and other documents. 57

58 Lagrange polynomials Morality : Lagrange interpolation is not suited beyond 10's of control points because of the Runge phenomenon A modification of the position of a control point leads to global changes of the curve. The evaluation of high order polynomials expressed as monomials leads to numerical problems. No control of the slopes at the boundary of the curve (start and finish). 65

59 66

60 Motivation Let us imagine that we have many (100's of) control points But we don't want a Lagrange interpolation! We should stay with a low order scheme but conserve enough freedom to pass through every point Curve defined by pieces... and of low order (1) 67

61 We are going to build a low order interpolation for each knot interval, such that we can impose slopes at the knots. P'=P'i+1 u=ui+1 P'=P'i P=Pi+1 P=Pi u=ui 68

62 In each range [i,i+1], we want to have an independent polynomial We have 4 parameters : position at each knot and associated tangents. The basis must have 4 degrees of freedom, thus be of order 3 in the case of polynomials. x (u i )=x i P (ui )=P i y (u i )= y i... { x [i ] u = A[i ]0 A[i ]1 u A[i ]2 u2 A[i ]3 u3, u [ui, u i 1 ] 69

63 First, every interval has a unit length i.e. ui 1 ui =1 Then we ensure identical intervals [0...1] between each interpolation point : u u i u = =u u i u i 1 u i d u =1 du On each interval i, we thus have the following relation: 2 3 x[i] ( u )=a + a u +a u + a u [i] 0 [i]1 [i ]2 [i] 3,u [0,1] 70

64 P'=P'i+1 u =1 P'=P'i P=Pi+1 P=Pi u =0 71

65 We pass through both control points: 2 3 P ( u =0)=P i a [i ]0 +a [i ]1 u + a[i ]2 u + a[i ]3 u =x i 2 3 P ( u =1)=P i+1 a [i]0 +a [i]1 u +a [i] 2 u +a [i ]3 u = x i+1 We impose both slopes : P ' ( u 0 =0)=P 'i a[i ]1 +2 a [i ]2 u +3 a [i ]3 u 2= xi' ' 2 ' P ( u =1)=P 'i+1 a[i ]1 +2 a [i] 2 u +3 a[i ]3 u = x i +1 At the end : { a[i]0 = xi a[i]1 =x 'i a[i] 2=3 xi 1 x i 2 x'i x 'i 1 a[i]3 =2 xi x i 1 xi' x 'i 1 72

66 We have continuity We have continuity of the derivatives But how to choose the slopes? Let the user choose ( artistic freedom) Automatically... 73

67 By finite differences with three points : xi 1 xi xi xi 1 x= 2 u i 1 u i 2 u i u i 1 ' i At the boundaries, we use finite differences (asymmetric) x1 x 0 x= u 1 u0 ' 0 x ' n 1 x n 1 x n 2 = u n 1 u n 2 The result depends on the parametrization! Cardinal spline x i 1 xi 1 x = 1 c, 0 c 1 2 ' i x '0=(1 c)( x 1 x 0 ) ' x n 1 =(1 c)( x n 1 x n 2 ) c is a «tension» parameter. c=0 gives yields the so called Catmull-Rom spline, c=1 a zigzagging line. 74

68 Continuity of the curve/parameter but loss of regularity (and of geometric continuity in many cases) 5 points, finite differences by varying the parametrization [0..1], [0..2], [0..5], [0..10] 75

69 5 points, Cardinal Spline (Catmull-Rom) c=0 76

70 Catmull-Rom are widely used in computer graphics Simple to compute, effective Local control (price to pay : discontinuous secd derivative) Animations with keyframing Ensures a fluid motion because of the continuity of the slope 77

71 5 points, Cardinal Spline c=

72 5 points, Cardinal Spline c=0.5 79

73 5 points, Cardinal Spline c=

74 5 points, Cardinal Spline c=1.0 81

75 We can impose the continuity of second derivatives... On a curve with n points, we have n extra relations to impose We may impose the continuity of the second derivative only on the n-2 interior knots What about the 2 points on the boundary? Impose a vanishing second derivative. We obtain what is called «natural spline» We could also impose the slopes (i.e. only n-2 relations remaining) Or, impose that the third derivative is zero on the points 1 and n-2 That means a single polynomial expression for the first two knot intervals, and the last two. 82

76 Natural Spline : mathematical approximation of the spline historically used in naval construction. C. DeBoor 83

77 Boeing 84

78 We impose the continuity of the second derivatives '' x[i 1] 1 =x ''[i ] 0 2a[i 1] 2 6a [i 1]3 =2a [i ]2 We substitute in the internal equations 2[3 x i x i 1 2 x 'i 1 x 'i ] 6[2 x i 1 x i x 'i 1 x 'i ] ' ' =2[3 x i 1 x i 2 x i x i 1 ] Finally we obtain : x ' i 1 ' i 4 x x ' i 1 =3 xi 1 x i 1 85

79 At the boundaries we want '' x [0] 0 =0 2a[0] 2=0 '' x [n 2] 1 =0 2a[n 2] 2 6a[ n 2] 3=0 ' ' 2 x0 x1 =3 x 1 x0 ' ' x n 2 2 x n 1=3 x n 1 x n 2 We have then a linear system with n unknowns : ' x0 3 x 1 x0 x '1 3 x 2 x0 1 x '2 = 3 x 3 x x' 3 x n 1 x n 3 n ' 3 x n 1 x n 2 x n 1 86

80 By solving the system, we have : x '0 ' 1 ' 2 x x ' x n 2 x 'n 1, which is substituted in { a [i]0 = xi ' a [i]1 =x i ' ' a [i] 2=3 xi 1 x i 2 xi x i 1 ' ' a [i]3 =2 xi x i 1 xi x i 1,to get the polynomial in each portion : x [i ] u =a [i] 0 a[i ]1 u a [i ]2 u 2 a[i]3 u 3, 0 u 1 From the global parameter u, we have to find in which portion we are ( the value of i ), then compute right polynomial... 87

81 Catmull-Rom spline 5 control points, natural spline 88

82 Another experiment We approximate a circle by a number of increasing points Simultaneously, the order of the approximation the number of pieces increases. In all the cases, the curve is C C2 89

83 3 points, order 3! 90

84 5 points 91

85 11 points 92

86 21 points 93

87 Random perturbation Each point is moved radially by a value between -0.5 and +0.5 % of the circle's radius 94

88 3 points, random perturbation 1% 95

89 5 points, random perturbation 1% 96

90 11 points, random perturbation 1% 97

91 21 points, random perturbation 1% 98

92 Deterministic perturbation Each point is shifted radially depending on its position by -5 or +5 % of the circle's radius 99

93 3 points, deterministic perturbation 5% 100

94 5 points, deterministic perturbation 5% 101

95 11 points, deterministic perturbation 5% 102

96 21 points, deterministic perturbation 5% 103

97 non local control 11 points 104

98 105

99 Perturbation of a point We shift one point by a significant amount 106

100 21 points 107

101 99 points 108

102 999 points 109

103 Stable interpolation scheme Weak Runge phenomenon The displacement of a point yet affects all the curve Nevertheless, the perturbation fades very quickly further away from the shifted point «Overshoots» are limited. 110

104 Closed curve? The curve can be closed, just impose everywhere that the second derivative is continuous. 111

105 Instead of '' x [0] 0 =0 2a[0] 2=0 x ''[n 2] 1 =0 2a[n 2] 2 6a[ n 2] 3=0... we have x '' [n 2] '' [0 ] (1)= x (0) 2a[ n 2 ]2 +6a[ n 2 ]3=2a [0] 2 ' 0 ' 1 ' 2 3( x1 x n 2 ) x x 3( x 2 x 0 ) Circulant x = 3( x 3 x 1) x n 1 = x 0 and ' ' matrix x n 1 = x x 'n 3 3( x n 2 x n 4 ) x' 3( x 0 x n 3 ) n 2 ( )( ) ( ) 112

106 General case : arbitrary parametrization P (ui )= P i { x (ui )= xi y (ui )= y i x[i] (u)= A[i] 0 + A[i ]1 u+ A[i ] 2 u 2 + A[i ]3 u 3, u [u i, u i+1 ] We again change the parametrization... u ui u = u i +1 u i du = 1 = 1 du u i+1 ui hi 2 3 x[i] ( u )=a + a u +a u + a u [i] 0 [i]1 [i ]2 [i] 3,u [0,1] 113

107 We pass through both points : P u0 =0 = P i a [i ]0 a [i]1 u 0 a [i ] 2 u a [i ]3 u = xi 2 3 P u1=1 = P i 1 a [i ]0 a [i ]1 u1 a [i] 2 u 1 a [i]3 u1= x i 1 We impose both slopes : dp dp 1 2 ' P u 0 =0 = 0 = 0 = P 'i a[i ]1 2a [i] 2 u 0 3a [i] 3 u 0 = x i hi du d u hi dp dp 1 P ' u 1=1 = 1 = 1 = P ' i 1 a [i ]1 2a[i ]2 u 1 3a[i ]3 u 21 = x 'i 1 h i du d u hi a[i ]0 = x i Finally : a = x ' h [i ]1 i i a[i ]2 =3 x i 1 xi 2 x 'i h i x 'i 1 h i ' { ' i a[i ]3=2 x i x i 1 x h i x ' i 1 hi 114

108 We impose the second derivative for a natural spline d P [i] d P [i] d 2 u d P [i] 1 2 u = 2 2 = du d u d u d u 2a[i 1] 2 6a [i 1] 3 2a [i] 2 '' '' x[i 1] 1 = x[i ] 0 = 2 2 hi 1 hi 2 hi 2 We substitute in the internal equations 2[3 xi x i 1 2 x 'i 1 hi 1 x 'i hi 1 ] 6[ 2 x i 1 x i x 'i 1 hi 1 x 'i hi 1 ] 2 i 1 = h 2[3 x i 1 x i 2 x 'i hi x 'i 1 hi ] 2 i h 115

109 We obtain finally : x 'i 1 2 x 'i 2 x 'i x 'i 1 x i x i 1 x i 1 x i =3 3 2 hi 1 hi hi 1 hi2 hi x ' i 1 ' i ' i 2 x hi 1 2 x x ' i 1 hi hi 1 =3 x i x i 1 3 x i 1 x i h i 1 hi 116

110 At the boundaries we want a vanishing second derivative '' [0] x (0)=0 x '' [n 2] (1)=0 2a [0] =0 (h ) 2a[ n 2 ]2 +6a[ n 2 ]3 (h 2 n 2 ) h0 (2 x '0 + x '1)=3( x 1 x 0 ) =0 ' ' h n 2 ( x n 2 +2 x n 1 )=3( x n 1 x n 2 ) We have then a linear system of n unknowns: (next page) 117

111 ( ' 0 ' 1 2 h0 h0 h1 2 h1 + 2 h 0 h0 x x = x 'n 2 )( ) h n 2 2 hn h n 3 h n 3 h n 2 2 h n 2 x 'n 1 ( 3( x 1 x 0 ) h1 h0 3 ( x 1 x 0 )+3 ( x 2 x 1 ) h0 h1 h n 2 h n 3 3 ( x n 2 x n 3 )+3 ( x n 1 x n 2 ) h n 3 h n 2 3( x n 1 x n 2 ) ) 118

112 u=3 Natural Spline (uniform parametrization) u=4 u=1 u=4 u=5 u=2 u=0 Natural Spline (non uniform parametrization) 119

113 Compact notation We would like a compact representation as for the Lagrange interpolation. a [i]0 = xi 2 x [i ] ( u )=a [i ]0 +a [i]1 u +a [i ]2 u +a [i ]3 u 0 u <1 { n p i0 n ' i p i1 x[i] ( u )= xi h ( u )+ x h ( u ) 0 n p i0 0 n 0 { ' a [i]1 =x i ' ' a [i] 2=3 xi 1 x i 2 xi x i 1 a [i]3 =2 xi x i 1 xi' x 'i 1 n ' i p i1 y[i ] ( u )= yi h ( u )+ y h ( u ) 0 3 p i0 n ' i p i1 P [i ] ( u )= P i h ( u )+ P h ( u ) This on each interval [i,i+1]. 120

114 We have on each interval : { a [i]0 = xi a [i]1 =x 'i ' ' a [i] 2=3 xi 1 x i 2 xi x i 1 a [i]3 =2 xi x i 1 xi' x 'i 1 x [i ] u = xi x 'i u 3 x i 1 x i 2 x 'i x'i 1 u 2 2 xi x i 1 x'i x 'i 1 u 3 By rearranging equations x [i ] u = xi 1 3 u 2 2 u 3 x 'i u 2 u 2 u ' 2 3 x i 1 3 u 2 u xi 1 u u 121

115 Hermite polynomials (for two points) { p h 00 =1 3 u 2 2 u 3 p 2 3 h10 =3 u 2 u p 2 3 h 01= u 2 u u p 2 3 h11= u u 122

116 The more general Hermite basis of degree 2n-1 allows to do an interpolation of n points on an interval, as the Lagrange basis, additionally imposing slopes at each point. [ hi0n (u)= 1 n i1 n '' l (u i ) n' l (u i ) n i ] (u ui ) [l in (u)]2 h u = u ui [l u ] 2 n 1 n u ui l u n l i u = n ' = l ui u ui j=0,i j u j u i n n 1 l u = u u j j=0 123

117 Properties of the Hermite basis Interpolation of the positions hi0n u j = ij h i0n ' u j =0 n hi1 u j =0 h i1n ' u j = ij Interpolation of the slopes n i0 h i u =1 124

118 Property of affine invariance It is a useful property such that the curves we define for a set of control points can undergo linear affine transformations without hassle. Let Pi* the affine transformation of the control points Pi Let P*(u,Pi) the affine transformation of the points of the curve P(u,Pi) defined from the original points Pi Let P(u,Pi*) the new curve based on the modified control points Pi*, with the same parametrization. The affine invariance is verified iff P*(u,Pi) = P(u,Pi*) for all u. 125

119 Affine transformations P A P u Translation a u= b ; A= c [] [ ] Scaling 3 rotations d 0 0 u=0 ; A= 0 e f Shear 1 g h u=0 ; A= 0 1 i [ ] 12 degrees of freedom [ ] [ ] cos sin 0 u=0 ; A= sin cos

120 Let P a parametric curve built this way : n 1 P (u, P i )= P i K ni (u) 0 Let's verify the invariance by a translation t: * i n 1 n 1 n i n 1 n i n i P (u, P )= ( P i +t) K (u)= P i K (u)+ t K (u) 0 n 1 0 n i = P (u, P i )+ t K (u) 0 = P (u, P i )+t=p * (u, P i ) 0 Partition of unity n 1 iff n K i (u)=

121 For the other multiplicative transformations * i n 1 n i n 1 n i P (u, P )= (A P i ) K (u)=a P i K (u) 0 0 =A P (u, P i )=P * (u, P i ) (no particular conditions except linearity with respect to the coordinates of the control points) Consequently, iff the basis functions form a partition of unity, and the dependence with respect to the control points is linear, then the representation is invariant by any affine transformation. 128

122 Do Hermite's basis form a partition of unity? n 1 { n h?? u =1 0 F u =1 F 0 =1 F 1 =1 ' p h 00 =1 3 u 2 2 u 3 p 2 3 h10 =3 u 2 u p 2 3 h 01= u 2 u u p 2 3 h11= u u F 0 =0 ' F 1 =0 129

123 Let's check the invariance If we apply a translation to the control points Pi, the derivatives Pi' should not change... * i '* i P = P i +t P =P ' i P ( P *i )= ( P i +t ) h ni0 (u)+ P i' hi1n (u) 1 n i0 1 n i0 1 ' i n i1 = th (u)+ P i h (u)+ P h (u) * =t + P (P i )= P ( P i ) 130

124 We must also check the invariance for the other multiplicative transformations : those affect both the coordinates and the derivatives * '* P i = A P i * ' P i = A P i 1 1 n ' n P P i = A P i h i0 u A P i hi1 u n i0 ' i n i1 = A P i h u P h u 0 0 * = A P ( P i )= P (P i ) QED 131

125 Beware of the computation of the slopes x'i... Natural : x ' 0 ' 1 ' 2 3 x 1 x0 x 3 x 2 x0 1 x = 3 x 3 x x' 3 x n 1 x n 3 n ' 3 x n 1 x n 2 x n 1 Linear operator P 'i = L( P i P j ) P 'i * = L (P *i P *j )= L(( A P i +t) ( A P j +t)) ' = A L( P i P j )= A P i It is OK in this case 132

126 Rotation of 45 Scaling x direction (times 0.5) Followed by a translation 133

127 3D Curves Minimal order so that a curve can have a torsion (non planar curve) n 1 p Let's consider a Lagrange interpolation P u = P i l i u i=0 2 points on a straight line (no curvature) 3 points in a plane (no torsion) 4 points torsion becomes possible Minimal order to join smoothly two arbitrarily oriented curves = 3 134

Interpolation and polynomial approximation Interpolation

Interpolation and polynomial approximation Interpolation Outline Interpolation and polynomial approximation Interpolation Lagrange Cubic Splines Approximation B-Splines 1 Outline Approximation B-Splines We still focus on curves for the moment. 2 3 Pierre Bézier

More information

Bézier Curves and Splines

Bézier Curves and Splines CS-C3100 Computer Graphics Bézier Curves and Splines Majority of slides from Frédo Durand vectorportal.com CS-C3100 Fall 2017 Lehtinen Before We Begin Anything on your mind concerning Assignment 1? CS-C3100

More information

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

Arsène Pérard-Gayot (Slides by Piotr Danilewski) Computer Graphics - Splines - Arsène Pérard-Gayot (Slides by Piotr Danilewski) CURVES Curves Explicit y = f x f: R R γ = x, f x y = 1 x 2 Implicit F x, y = 0 F: R 2 R γ = x, y : F x, y = 0 x 2 + y 2 =

More information

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama Introduction to Computer Graphics Modeling (1) April 13, 2017 Kenshi Takayama Parametric curves X & Y coordinates defined by parameter t ( time) Example: Cycloid x t = t sin t y t = 1 cos t Tangent (aka.

More information

CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier

CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier Modeling Creating 3D objects How to construct complicated surfaces? Goal Specify objects with few control points Resulting object should be visually

More information

Lecture 10 Polynomial interpolation

Lecture 10 Polynomial interpolation Lecture 10 Polynomial interpolation Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University, tieli@pku.edu.cn

More information

Curves. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Taku Komura

Curves. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Taku Komura Curves Hakan Bilen University of Edinburgh Computer Graphics Fall 2017 Some slides are courtesy of Steve Marschner and Taku Komura How to create a virtual world? To compose scenes We need to define objects

More information

Keyframing. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

Keyframing. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University Keyframing CS 448D: Character Animation Prof. Vladlen Koltun Stanford University Keyframing in traditional animation Master animator draws key frames Apprentice fills in the in-between frames Keyframing

More information

M2R IVR, October 12th Mathematical tools 1 - Session 2

M2R IVR, October 12th Mathematical tools 1 - Session 2 Mathematical tools 1 Session 2 Franck HÉTROY M2R IVR, October 12th 2006 First session reminder Basic definitions Motivation: interpolate or approximate an ordered list of 2D points P i n Definition: spline

More information

Computer Aided Design. B-Splines

Computer Aided Design. B-Splines 1 Three useful references : R. Bartels, J.C. Beatty, B. A. Barsky, An introduction to Splines for use in Computer Graphics and Geometric Modeling, Morgan Kaufmann Publications,1987 JC.Léon, Modélisation

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 7 Interpolation Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted

More information

CGT 511. Curves. Curves. Curves. What is a curve? 2) A continuous map of a 1D space to an nd space

CGT 511. Curves. Curves. Curves. What is a curve? 2) A continuous map of a 1D space to an nd space Curves CGT 511 Curves Bedřich Beneš, Ph.D. Purdue University Department of Computer Graphics Technology What is a curve? Mathematical ldefinition i i is a bit complex 1) The continuous o image of an interval

More information

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016 Computergrafik Matthias Zwicker Universität Bern Herbst 2016 2 Today Curves Introduction Polynomial curves Bézier curves Drawing Bézier curves Piecewise curves Modeling Creating 3D objects How to construct

More information

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation Outline Interpolation 1 Interpolation 2 3 Michael T. Heath Scientific Computing 2 / 56 Interpolation Motivation Choosing Interpolant Existence and Uniqueness Basic interpolation problem: for given data

More information

1 Piecewise Cubic Interpolation

1 Piecewise Cubic Interpolation Piecewise Cubic Interpolation Typically the problem with piecewise linear interpolation is the interpolant is not differentiable as the interpolation points (it has a kinks at every interpolation point)

More information

Approximation of Circular Arcs by Parametric Polynomials

Approximation of Circular Arcs by Parametric Polynomials Approximation of Circular Arcs by Parametric Polynomials Emil Žagar Lecture on Geometric Modelling at Charles University in Prague December 6th 2017 1 / 44 Outline Introduction Standard Reprezentations

More information

Animation Curves and Splines 1

Animation Curves and Splines 1 Animation Curves and Splines 1 Animation Homework Set up a simple avatar E.g. cube/sphere (or square/circle if 2D) Specify some key frames (positions/orientations) Associate a time with each key frame

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

CHAPTER 4. Interpolation

CHAPTER 4. Interpolation CHAPTER 4 Interpolation 4.1. Introduction We will cover sections 4.1 through 4.12 in the book. Read section 4.1 in the book on your own. The basic problem of one-dimensional interpolation is this: Given

More information

Reading. w Foley, Section 11.2 Optional

Reading. w Foley, Section 11.2 Optional Parametric Curves w Foley, Section.2 Optional Reading w Bartels, Beatty, and Barsky. An Introduction to Splines for use in Computer Graphics and Geometric Modeling, 987. w Farin. Curves and Surfaces for

More information

MAT300/500 Programming Project Spring 2019

MAT300/500 Programming Project Spring 2019 MAT300/500 Programming Project Spring 2019 Please submit all project parts on the Moodle page for MAT300 or MAT500. Due dates are listed on the syllabus and the Moodle site. You should include all neccessary

More information

Chapter 1 Numerical approximation of data : interpolation, least squares method

Chapter 1 Numerical approximation of data : interpolation, least squares method Chapter 1 Numerical approximation of data : interpolation, least squares method I. Motivation 1 Approximation of functions Evaluation of a function Which functions (f : R R) can be effectively evaluated

More information

Module 2: Reflecting on One s Problems

Module 2: Reflecting on One s Problems MATH55 Module : Reflecting on One s Problems Main Math concepts: Translations, Reflections, Graphs of Equations, Symmetry Auxiliary ideas: Working with quadratics, Mobius maps, Calculus, Inverses I. Transformations

More information

Lecture 23: Hermite and Bezier Curves

Lecture 23: Hermite and Bezier Curves Lecture 23: Hermite and Bezier Curves November 16, 2017 11/16/17 CSU CS410 Fall 2017, Ross Beveridge & Bruce Draper 1 Representing Curved Objects So far we ve seen Polygonal objects (triangles) and Spheres

More information

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34 Interpolation Escuela de Ingeniería Informática de Oviedo (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34 Outline 1 Introduction 2 Lagrange interpolation 3 Piecewise polynomial

More information

Lecture 20: Bezier Curves & Splines

Lecture 20: Bezier Curves & Splines Lecture 20: Bezier Curves & Splines December 6, 2016 12/6/16 CSU CS410 Bruce Draper & J. Ross Beveridge 1 Review: The Pen Metaphore Think of putting a pen to paper Pen position described by time t Seeing

More information

November 20, Interpolation, Extrapolation & Polynomial Approximation

November 20, Interpolation, Extrapolation & Polynomial Approximation Interpolation, Extrapolation & Polynomial Approximation November 20, 2016 Introduction In many cases we know the values of a function f (x) at a set of points x 1, x 2,..., x N, but we don t have the analytic

More information

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005 4 Interpolation 4.1 Polynomial interpolation Problem: LetP n (I), n ln, I := [a,b] lr, be the linear space of polynomials of degree n on I, P n (I) := { p n : I lr p n (x) = n i=0 a i x i, a i lr, 0 i

More information

Numerical Methods I: Interpolation (cont ed)

Numerical Methods I: Interpolation (cont ed) 1/20 Numerical Methods I: Interpolation (cont ed) Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 30, 2017 Interpolation Things you should know 2/20 I Lagrange vs. Hermite interpolation

More information

We consider the problem of finding a polynomial that interpolates a given set of values:

We consider the problem of finding a polynomial that interpolates a given set of values: Chapter 5 Interpolation 5. Polynomial Interpolation We consider the problem of finding a polynomial that interpolates a given set of values: x x 0 x... x n y y 0 y... y n where the x i are all distinct.

More information

Geometric Interpolation by Planar Cubic Polynomials

Geometric Interpolation by Planar Cubic Polynomials 1 / 20 Geometric Interpolation by Planar Cubic Polynomials Jernej Kozak, Marjeta Krajnc Faculty of Mathematics and Physics University of Ljubljana Institute of Mathematics, Physics and Mechanics Avignon,

More information

Curve Fitting. 1 Interpolation. 2 Composite Fitting. 1.1 Fitting f(x) 1.2 Hermite interpolation. 2.1 Parabolic and Cubic Splines

Curve Fitting. 1 Interpolation. 2 Composite Fitting. 1.1 Fitting f(x) 1.2 Hermite interpolation. 2.1 Parabolic and Cubic Splines Curve Fitting Why do we want to curve fit? In general, we fit data points to produce a smooth representation of the system whose response generated the data points We do this for a variety of reasons 1

More information

Scientific Computing

Scientific Computing 2301678 Scientific Computing Chapter 2 Interpolation and Approximation Paisan Nakmahachalasint Paisan.N@chula.ac.th Chapter 2 Interpolation and Approximation p. 1/66 Contents 1. Polynomial interpolation

More information

Orthogonality of hat functions in Sobolev spaces

Orthogonality of hat functions in Sobolev spaces 1 Orthogonality of hat functions in Sobolev spaces Ulrich Reif Technische Universität Darmstadt A Strobl, September 18, 27 2 3 Outline: Recap: quasi interpolation Recap: orthogonality of uniform B-splines

More information

Engineering 7: Introduction to computer programming for scientists and engineers

Engineering 7: Introduction to computer programming for scientists and engineers Engineering 7: Introduction to computer programming for scientists and engineers Interpolation Recap Polynomial interpolation Spline interpolation Regression and Interpolation: learning functions from

More information

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter Key References: Interpolation 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter 6. 2. Press, W. et. al. Numerical Recipes in C, Cambridge: Cambridge University Press. Chapter 3

More information

Polynomials. p n (x) = a n x n + a n 1 x n 1 + a 1 x + a 0, where

Polynomials. p n (x) = a n x n + a n 1 x n 1 + a 1 x + a 0, where Polynomials Polynomials Evaluation of polynomials involve only arithmetic operations, which can be done on today s digital computers. We consider polynomials with real coefficients and real variable. p

More information

Numerical Methods I: Polynomial Interpolation

Numerical Methods I: Polynomial Interpolation 1/31 Numerical Methods I: Polynomial Interpolation Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 16, 2017 lassical polynomial interpolation Given f i := f(t i ), i =0,...,n, we would

More information

MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs

MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs David L. Finn December 9th, 2004 We now start considering the basic curve elements to be used throughout this course; polynomial curves and

More information

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count

More information

Introduction to Curves. Modelling. 3D Models. Points. Lines. Polygons Defined by a sequence of lines Defined by a list of ordered points

Introduction to Curves. Modelling. 3D Models. Points. Lines. Polygons Defined by a sequence of lines Defined by a list of ordered points Introduction to Curves Modelling Points Defined by 2D or 3D coordinates Lines Defined by a set of 2 points Polygons Defined by a sequence of lines Defined by a list of ordered points 3D Models Triangular

More information

Computer Graphics Keyframing and Interpola8on

Computer Graphics Keyframing and Interpola8on Computer Graphics Keyframing and Interpola8on This Lecture Keyframing and Interpola2on two topics you are already familiar with from your Blender modeling and anima2on of a robot arm Interpola2on linear

More information

Computational Physics

Computational Physics Interpolation, Extrapolation & Polynomial Approximation Lectures based on course notes by Pablo Laguna and Kostas Kokkotas revamped by Deirdre Shoemaker Spring 2014 Introduction In many cases, a function

More information

2. Interpolation. Closing the Gaps of Discretization...

2. Interpolation. Closing the Gaps of Discretization... 2. Interpolation Closing the Gaps of Discretization... Numerisches Programmieren, Hans-Joachim Bungartz page 1 of 48 2.1. Preliminary Remark The Approximation Problem Problem: Approximate a (fully or partially

More information

Smooth Path Generation Based on Bézier Curves for Autonomous Vehicles

Smooth Path Generation Based on Bézier Curves for Autonomous Vehicles Smooth Path Generation Based on Bézier Curves for Autonomous Vehicles Ji-wung Choi, Renwick E. Curry, Gabriel Hugh Elkaim Abstract In this paper we present two path planning algorithms based on Bézier

More information

Lecture 28 The Main Sources of Error

Lecture 28 The Main Sources of Error Lecture 28 The Main Sources of Error Truncation Error Truncation error is defined as the error caused directly by an approximation method For instance, all numerical integration methods are approximations

More information

Math 10C - Fall Final Exam

Math 10C - Fall Final Exam Math 1C - Fall 217 - Final Exam Problem 1. Consider the function f(x, y) = 1 x 2 (y 1) 2. (i) Draw the level curve through the point P (1, 2). Find the gradient of f at the point P and draw the gradient

More information

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lectures 9-10: Polynomial and piecewise polynomial interpolation Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j

More information

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few:

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few: .. Methods for Obtaining FD Expressions There are several methods, and we will look at a few: ) Taylor series expansion the most common, but purely mathematical. ) Polynomial fitting or interpolation the

More information

In manycomputationaleconomicapplications, one must compute thede nite n

In manycomputationaleconomicapplications, one must compute thede nite n Chapter 6 Numerical Integration In manycomputationaleconomicapplications, one must compute thede nite n integral of a real-valued function f de ned on some interval I of

More information

Cubic Splines; Bézier Curves

Cubic Splines; Bézier Curves Cubic Splines; Bézier Curves 1 Cubic Splines piecewise approximation with cubic polynomials conditions on the coefficients of the splines 2 Bézier Curves computer-aided design and manufacturing MCS 471

More information

Sample Exam 1 KEY NAME: 1. CS 557 Sample Exam 1 KEY. These are some sample problems taken from exams in previous years. roughly ten questions.

Sample Exam 1 KEY NAME: 1. CS 557 Sample Exam 1 KEY. These are some sample problems taken from exams in previous years. roughly ten questions. Sample Exam 1 KEY NAME: 1 CS 557 Sample Exam 1 KEY These are some sample problems taken from exams in previous years. roughly ten questions. Your exam will have 1. (0 points) Circle T or T T Any curve

More information

Q1. Discuss, compare and contrast various curve fitting and interpolation methods

Q1. Discuss, compare and contrast various curve fitting and interpolation methods Q1. Discuss, compare and contrast various curve fitting and interpolation methods McMaster University 1 Curve Fitting Problem statement: Given a set of (n + 1) point-pairs {x i,y i }, i = 0,1,... n, find

More information

Ay190 Computational Astrophysics

Ay190 Computational Astrophysics CALIFORNIA INSTITUTE OF TECHNOLOGY Division of Physics, Mathematics, and Astronomy Ay190 Computational Astrophysics Christian D. Ott and Andrew Benson cott@tapir.caltech.edu, abenson@tapir.caltech.edu

More information

Mathematics for Engineers. Numerical mathematics

Mathematics for Engineers. Numerical mathematics Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set

More information

1 Roots of polynomials

1 Roots of polynomials CS348a: Computer Graphics Handout #18 Geometric Modeling Original Handout #13 Stanford University Tuesday, 9 November 1993 Original Lecture #5: 14th October 1993 Topics: Polynomials Scribe: Mark P Kust

More information

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points,

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, 1 Interpolation 11 Introduction In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, {x i, y i = f(x i ) i = 1 n, obtained,

More information

13 Path Planning Cubic Path P 2 P 1. θ 2

13 Path Planning Cubic Path P 2 P 1. θ 2 13 Path Planning Path planning includes three tasks: 1 Defining a geometric curve for the end-effector between two points. 2 Defining a rotational motion between two orientations. 3 Defining a time function

More information

Numerical Analysis Exam with Solutions

Numerical Analysis Exam with Solutions Numerical Analysis Exam with Solutions Richard T. Bumby Fall 000 June 13, 001 You are expected to have books, notes and calculators available, but computers of telephones are not to be used during the

More information

Mathematical Economics: Lecture 2

Mathematical Economics: Lecture 2 Mathematical Economics: Lecture 2 Yu Ren WISE, Xiamen University September 25, 2012 Outline 1 Number Line The number line, origin (Figure 2.1 Page 11) Number Line Interval (a, b) = {x R 1 : a < x < b}

More information

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University Lagrange Interpolation and Neville s Algorithm Ron Goldman Department of Computer Science Rice University Tension between Mathematics and Engineering 1. How do Mathematicians actually represent curves

More information

Interpolation and Deformations A short cookbook

Interpolation and Deformations A short cookbook Interpolation and Deformations A short cookbook 600.445 Fall 2000; Updated: 29 September 205 Linear Interpolation p ρ 2 2 = [ 40 30 20] = 20 T p ρ = [ 0 5 20] = 5 p 3 = ρ3 =? 0?? T [ 20 20 20] T 2 600.445

More information

PRACTICE PROBLEMS. Please let me know if you find any mistakes in the text so that i can fix them. 1. Mixed partial derivatives.

PRACTICE PROBLEMS. Please let me know if you find any mistakes in the text so that i can fix them. 1. Mixed partial derivatives. PRACTICE PROBLEMS Please let me know if you find any mistakes in the text so that i can fix them. 1.1. Let Show that f is C 1 and yet How is that possible? 1. Mixed partial derivatives f(x, y) = {xy x

More information

6x 2 8x + 5 ) = 12x 8. f (x) ) = d (12x 8) = 12

6x 2 8x + 5 ) = 12x 8. f (x) ) = d (12x 8) = 12 AMS/ECON 11A Class Notes 11/6/17 UCSC *) Higher order derivatives Example. If f = x 3 x + 5x + 1, then f = 6x 8x + 5 Observation: f is also a differentiable function... d f ) = d 6x 8x + 5 ) = 1x 8 dx

More information

S chauder Theory. x 2. = log( x 1 + x 2 ) + 1 ( x 1 + x 2 ) 2. ( 5) x 1 + x 2 x 1 + x 2. 2 = 2 x 1. x 1 x 2. 1 x 1.

S chauder Theory. x 2. = log( x 1 + x 2 ) + 1 ( x 1 + x 2 ) 2. ( 5) x 1 + x 2 x 1 + x 2. 2 = 2 x 1. x 1 x 2. 1 x 1. Sep. 1 9 Intuitively, the solution u to the Poisson equation S chauder Theory u = f 1 should have better regularity than the right hand side f. In particular one expects u to be twice more differentiable

More information

Lösning: Tenta Numerical Analysis för D, L. FMN011,

Lösning: Tenta Numerical Analysis för D, L. FMN011, Lösning: Tenta Numerical Analysis för D, L. FMN011, 090527 This exam starts at 8:00 and ends at 12:00. To get a passing grade for the course you need 35 points in this exam and an accumulated total (this

More information

Applied Math 205. Full office hour schedule:

Applied Math 205. Full office hour schedule: Applied Math 205 Full office hour schedule: Rui: Monday 3pm 4:30pm in the IACS lounge Martin: Monday 4:30pm 6pm in the IACS lounge Chris: Tuesday 1pm 3pm in Pierce Hall, Room 305 Nao: Tuesday 3pm 4:30pm

More information

Numerical Methods for Partial Differential Equations

Numerical Methods for Partial Differential Equations Numerical Methods for Partial Differential Equations CAAM 45 Spring 005 Lecture 15 Instructor: Tim Warburton Two-Dimensional Advection Recall in one-dimensions we chose an arbitrary section of a pipe.

More information

Double integrals using polar coordinates Let s look at a motivating example:

Double integrals using polar coordinates Let s look at a motivating example: Double integrals using polar coordinates Let s look at a motivating example: Example Evaluate e x +y da where is the bounded region in the first quadrant (x 0, y 0) between the circles of radius 1 and

More information

9.4 Cubic spline interpolation

9.4 Cubic spline interpolation 94 ubic spline interpolation Instead of going to higher and higher order, there is another way of creating a smooth function that interpolates data-points A cubic spline is a piecewise continuous curve

More information

2.2 The derivative as a Function

2.2 The derivative as a Function 2.2 The derivative as a Function Recall: The derivative of a function f at a fixed number a: f a f a+h f(a) = lim h 0 h Definition (Derivative of f) For any number x, the derivative of f is f x f x+h f(x)

More information

Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?

Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2? Applied Numerical Analysis Interpolation Lecturer: Emad Fatemizadeh Interpolation Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. 0 1 4 1-3 3 9 What for x = 1.? Interpolation

More information

Math 1310 Final Exam

Math 1310 Final Exam Math 1310 Final Exam December 11, 2014 NAME: INSTRUCTOR: Write neatly and show all your work in the space provided below each question. You may use the back of the exam pages if you need additional space

More information

(Refer Slide Time: 2:08 min)

(Refer Slide Time: 2:08 min) Applied Mechanics Prof. R. K. Mittal Department of Applied Mechanics Indian Institute of Technology, Delhi Lecture No. 11 Properties of Surfaces (Contd.) Today we will take up lecture eleven which is a

More information

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Integration, differentiation, and root finding. Phys 420/580 Lecture 7 Integration, differentiation, and root finding Phys 420/580 Lecture 7 Numerical integration Compute an approximation to the definite integral I = b Find area under the curve in the interval Trapezoid Rule:

More information

Geometric Lagrange Interpolation by Planar Cubic Pythagorean-hodograph Curves

Geometric Lagrange Interpolation by Planar Cubic Pythagorean-hodograph Curves Geometric Lagrange Interpolation by Planar Cubic Pythagorean-hodograph Curves Gašper Jaklič a,c, Jernej Kozak a,b, Marjeta Krajnc b, Vito Vitrih c, Emil Žagar a,b, a FMF, University of Ljubljana, Jadranska

More information

Topics. CS Advanced Computer Graphics. Differential Geometry Basics. James F. O Brien. Vector and Tensor Fields.

Topics. CS Advanced Computer Graphics. Differential Geometry Basics. James F. O Brien. Vector and Tensor Fields. CS 94-3 Advanced Computer Graphics Differential Geometry Basics James F. O Brien Associate Professor U.C. Berkeley Topics Vector and Tensor Fields Divergence, curl, etc. Parametric Curves Tangents, curvature,

More information

Affine invariant Fourier descriptors

Affine invariant Fourier descriptors Affine invariant Fourier descriptors Sought: a generalization of the previously introduced similarityinvariant Fourier descriptors H. Burkhardt, Institut für Informatik, Universität Freiburg ME-II, Kap.

More information

Section 4.3 Vector Fields

Section 4.3 Vector Fields Section 4.3 Vector Fields DEFINITION: A vector field in R n is a map F : A R n R n that assigns to each point x in its domain A a vector F(x). If n = 2, F is called a vector field in the plane, and if

More information

Tangent spaces, normals and extrema

Tangent spaces, normals and extrema Chapter 3 Tangent spaces, normals and extrema If S is a surface in 3-space, with a point a S where S looks smooth, i.e., without any fold or cusp or self-crossing, we can intuitively define the tangent

More information

Solving Triangular Systems More Accurately and Efficiently

Solving Triangular Systems More Accurately and Efficiently 17th IMACS World Congress, July 11-15, 2005, Paris, France Scientific Computation, Applied Mathematics and Simulation Solving Triangular Systems More Accurately and Efficiently Philippe LANGLOIS and Nicolas

More information

Engineering Mechanics Prof. U. S. Dixit Department of Mechanical Engineering Indian Institute of Technology, Guwahati Kinematics

Engineering Mechanics Prof. U. S. Dixit Department of Mechanical Engineering Indian Institute of Technology, Guwahati Kinematics Engineering Mechanics Prof. U. S. Dixit Department of Mechanical Engineering Indian Institute of Technology, Guwahati Kinematics Module 10 - Lecture 24 Kinematics of a particle moving on a curve Today,

More information

Ideas from Vector Calculus Kurt Bryan

Ideas from Vector Calculus Kurt Bryan Ideas from Vector Calculus Kurt Bryan Most of the facts I state below are for functions of two or three variables, but with noted exceptions all are true for functions of n variables..1 Tangent Line Approximation

More information

Review of Multi-Calculus (Study Guide for Spivak s CHAPTER ONE TO THREE)

Review of Multi-Calculus (Study Guide for Spivak s CHAPTER ONE TO THREE) Review of Multi-Calculus (Study Guide for Spivak s CHPTER ONE TO THREE) This material is for June 9 to 16 (Monday to Monday) Chapter I: Functions on R n Dot product and norm for vectors in R n : Let X

More information

Notice that this is not just theory. Applying +5 F and -5 F in a point, has exactly the same effect as applying no force in this point at all.

Notice that this is not just theory. Applying +5 F and -5 F in a point, has exactly the same effect as applying no force in this point at all. 1 2 3 4 In this text is explained why our universe exists and why there are nature s laws. The explanation is given in two parts: Part 1: Why does our universe exist? Part 2: Why does nature s laws exist?

More information

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning 76 Chapter 7 Interpolation 7.1 Interpolation Definition 7.1.1. Interpolation of a given function f defined on an interval [a,b] by a polynomial p: Given a set of specified points {(t i,y i } n with {t

More information

HUDSONVILLE HIGH SCHOOL COURSE FRAMEWORK

HUDSONVILLE HIGH SCHOOL COURSE FRAMEWORK HUDSONVILLE HIGH SCHOOL COURSE FRAMEWORK COURSE / SUBJECT A P C a l c u l u s ( B C ) KEY COURSE OBJECTIVES/ENDURING UNDERSTANDINGS OVERARCHING/ESSENTIAL SKILLS OR QUESTIONS Limits and Continuity Derivatives

More information

MATHEMATICS LEARNING AREA. Methods Units 1 and 2 Course Outline. Week Content Sadler Reference Trigonometry

MATHEMATICS LEARNING AREA. Methods Units 1 and 2 Course Outline. Week Content Sadler Reference Trigonometry MATHEMATICS LEARNING AREA Methods Units 1 and 2 Course Outline Text: Sadler Methods and 2 Week Content Sadler Reference Trigonometry Cosine and Sine rules Week 1 Trigonometry Week 2 Radian Measure Radian

More information

Bernstein polynomials of degree N are defined by

Bernstein polynomials of degree N are defined by SEC. 5.5 BÉZIER CURVES 309 5.5 Bézier Curves Pierre Bézier at Renault and Paul de Casteljau at Citroën independently developed the Bézier curve for CAD/CAM operations, in the 1970s. These parametrically

More information

Interpolation Theory

Interpolation Theory Numerical Analysis Massoud Malek Interpolation Theory The concept of interpolation is to select a function P (x) from a given class of functions in such a way that the graph of y P (x) passes through the

More information

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 Petros Koumoutsakos Gerardo Tauriello (Last update: July 27, 2015) IMPORTANT DISCLAIMERS 1. REFERENCES: Much of the material

More information

Ch 4 Differentiation

Ch 4 Differentiation Ch 1 Partial fractions Ch 6 Integration Ch 2 Coordinate geometry C4 Ch 5 Vectors Ch 3 The binomial expansion Ch 4 Differentiation Chapter 1 Partial fractions We can add (or take away) two fractions only

More information

CLASSICAL PROBABILITY MODES OF CONVERGENCE AND INEQUALITIES

CLASSICAL PROBABILITY MODES OF CONVERGENCE AND INEQUALITIES CLASSICAL PROBABILITY 2008 2. MODES OF CONVERGENCE AND INEQUALITIES JOHN MORIARTY In many interesting and important situations, the object of interest is influenced by many random factors. If we can construct

More information

Vector Calculus, Maths II

Vector Calculus, Maths II Section A Vector Calculus, Maths II REVISION (VECTORS) 1. Position vector of a point P(x, y, z) is given as + y and its magnitude by 2. The scalar components of a vector are its direction ratios, and represent

More information

Polynomial Interpolation

Polynomial Interpolation Polynomial Interpolation (Com S 477/577 Notes) Yan-Bin Jia Sep 1, 017 1 Interpolation Problem In practice, often we can measure a physical process or quantity (e.g., temperature) at a number of points

More information

February 13, Option 9 Overview. Mind Map

February 13, Option 9 Overview. Mind Map Option 9 Overview Mind Map Return tests - will discuss Wed..1.1 J.1: #1def,2,3,6,7 (Sequences) 1. Develop and understand basic ideas about sequences. J.2: #1,3,4,6 (Monotonic convergence) A quick review:

More information

Friday 09/15/2017 Midterm I 50 minutes

Friday 09/15/2017 Midterm I 50 minutes Fa 17: MATH 2924 040 Differential and Integral Calculus II Noel Brady Friday 09/15/2017 Midterm I 50 minutes Name: Student ID: Instructions. 1. Attempt all questions. 2. Do not write on back of exam sheets.

More information

Global polynomial interpolants suffer from the Runge Phenomenon if the data sites (nodes) are not chosen correctly.

Global polynomial interpolants suffer from the Runge Phenomenon if the data sites (nodes) are not chosen correctly. Piecewise polynomial interpolation Global polynomial interpolants suffer from the Runge Phenomenon if the data sites (nodes) are not chosen correctly. In many applications, one does not have the freedom

More information

Math 365 Homework 5 Due April 6, 2018 Grady Wright

Math 365 Homework 5 Due April 6, 2018 Grady Wright Math 365 Homework 5 Due April 6, 018 Grady Wright 1. (Polynomial interpolation, 10pts) Consider the following three samples of some function f(x): x f(x) -1/ -1 1 1 1/ (a) Determine the unique second degree

More information