19 interpolation and splines
play

19 Interpolation and splines How are smooth surfaces drawn (when - PowerPoint PPT Presentation

19 INTERPOLATION AND SPLINES 19 Interpolation and splines How are smooth surfaces drawn (when polygonal approximation fails)? Aim: understand principles of interpolation and extrapolation. Reading: Foley Sections 9.2 Parametric


  1. ✬ ✩ 19– INTERPOLATION AND SPLINES 19 Interpolation and splines How are smooth surfaces drawn (when polygonal approximation fails)? Aim: understand principles of interpolation and extrapolation. Reading: • Foley Sections 9.2 Parametric bubic curves, 9.2.1 Basic characteristics, 9.2.3 B´ ezier curves, 9.3 Parametric bicubic surfaces, 9.3.1 Hermite surfaces, 9.3.2 B´ ezier surfaces and 9.3.4 Normals to surfaces, 9.4 Quadric surfaces. Further reading: • Heath’s lecture 7 on interpolation, (see http://www.cse.uiuc.edu/heath/scicomp/notes/) from Scientific Computing: An Introductory Survey, Second Edition by Michael T. Heath, McGraw-Hill 2002; ✫ ✪ ISBN 0-07-239910-4. 278

  2. ✬ ✩ 19– INTERPOLATION AND SPLINES Introduction to interpolation Say know value of a function f ( x ) at a set of points x 1 , x 2 , . . . , x n ( x 1 < x 2 < . . . < x n ) but f ( x ) not known in analytic form. i.e. don’t know equation for f ( x ) . e.g. may get f ( x i ) values from a physical measurement in an experiment, or from a long, complicated calculation. ✫ ✪ 279

  3. ✬ ✩ 19– INTERPOLATION AND SPLINES How do we estimate f ( x ) for arbitrary x ? If desired x within range of x i then use interpolation If desired x outside range of x i then use extrapolation 50 45 40 35 30 25 20 15 x 1 Interpolation 10 5 0 0 2 4 6 8 10 12 ✫ ✪ 280

  4. ✬ ✩ 19– INTERPOLATION AND SPLINES Most common functional form used are polynomials . Also use • rational functions (quotients of polynomials) and • trigonometric functions (sines, cosines etc.) • as well as others, e.g. ax 2 + bx + c dx + c ✫ ✪ 281

  5. ✬ ✩ 19– INTERPOLATION AND SPLINES y ( t ) y ( t ) 1 t x ( t ) 1 2 1 0 x ( t ) 1 2 t Two joined 2D parametric curve segments (Foley Figure 9.7). ✫ ✪ 282

  6. 19– INTERPOLATION AND SPLINES Parametric curve x ( t ) = a x t 3 + b x t 2 + c x t + d x y ( t ) = a y t 3 + b y t 2 + c y t + d y z ( t ) = a z t 3 + b z t 2 + c x t + d z where 0 ≤ t ≤ 1 ⎡ ⎤ a x b x c x d x C = a y b y c y d y ⎣ ⎦ a z b z c z d z Can rewrite parametric curve as � T = C · T � Q ( t ) = x ( t ) y ( t ) z ( t ) 282-2

  7. 19– INTERPOLATION AND SPLINES Tangent vectors The derivative of Q ( t ) is the parametric tangent vector of the curve. x ( t ) = a x t 3 + b x t 2 + c x t + d x y ( t ) = a y t 3 + b y t 2 + c y t + d y z ( t ) = a z t 3 + b z t 2 + c x t + d z where 0 ≤ t ≤ 1 � d � T d d d dt Q ( t ) = Q ′ ( t ) = dt x ( t ) dt y ( t ) dt z ( t ) � T = d � 3 t 2 dt C · T = C · 2 t 1 0 � 3 a x t 2 + 2 b x t + c x 3 a y t 2 + 2 b y t + c y 3 a z t 2 + 2 b z t + c z � T = 282-3

  8. 19– INTERPOLATION AND SPLINES Parametric continuity If the direction and magnitutde of the d n � Q ( t ) � dt n through the n th derivative are equal at the join point, the curve is called c n continuous. 282-4

  9. ✬ ✩ 19– INTERPOLATION AND SPLINES y ( t ) y ( t ) TV 3 Join point C 1 C 2 TV 2 C 0 S Q 3 P 1 P 3 P 2 Q 2 Q 1 x ( t ) x ( t ) Left: Curve segment S joined to segments C 0 , C 1 and C 2 . Right: Curve segments Q 1 , Q 2 and Q 3 join at the point P 2 and are identical except for their tangent vectors at P 2 (Foley Figures 9.8 and 9.9). ✫ ✪ 283

  10. 19– INTERPOLATION AND SPLINES B´ ezier curves B´ ezier curves are defined by the starting and ending vectors of a curve, P 1 P 2 and P 3 P 4 and are therefore determined by four control points. 283-3

  11. ✬ ✩ 19– INTERPOLATION AND SPLINES 19.1 B´ ezier curves P 3 P 2 P 1 P 4 P 4 P 1 P 2 P 3 Two B´ ezier curves and their control points (Foley Figure 9.15). ✫ ✪ 284

  12. ✬ ✩ 19– INTERPOLATION AND SPLINES 19.2 B-Splines The term spline relates to strips of metal used by draftsmen to lay out surfaces in aeroplanes, cars and ships. These metal splines had second-order continuity. The mathematical equivalent of these are C 0 , C 1 , and C 2 continuous cubic polynomial that interpolates (passes through) the control points. Splines have one more degree of continuity that B ´ ezier forms, thus splines are smoother. ✫ ✪ 285

  13. ✬ ✩ 19– INTERPOLATION AND SPLINES 19.3 Uniform nonrational B-splines P 9 y ( t ) P 8 P 1 P 3 t 10 Q 9 P 4 Q 5 P 7 t 9 t 6 t 5 Q 8 t 3 t 8 Q 6 Q 4 P 6 t 4 t 7 Q 3 Q 7 P 5 Knot P 0 P 2 Control point x ( t ) (Foley Figure 9.18) ✫ ✪ 286

  14. ✬ ✩ 19– INTERPOLATION AND SPLINES y ( t ) P'' 4 Curve P'' 4 P' 4 P' 4 Curve P 4 P 1 P 4 Curve P 8 P 7 P 3 Q 3 P 0 Q 5 Q 6 Q 4 Q 8 P 5 Q 7 P 6 P 2 Knot Control point x ( t ) Moving control point P 4 to different positions (Foley Figure 9.19). ✫ ✪ 287

  15. ✬ ✩ 19– INTERPOLATION AND SPLINES 19.4 Parametric bicubic surfaces P 21 P 11 P 12 P 31 P 22 P 13 P 32 P 23 P 33 P 41 P 42 P 14 P 24 P 34 P 43 P 44 Sixteen control points of a B´ ezier bicubic surface (Foley Figure 9.24). ✫ ✪ 288

  16. 19– INTERPOLATION AND SPLINES 19.5 Parametric bicubic surfaces P 11 P 12 P 21 P 13 P 14 P 15 P 22 P 16 P 31 P 23 P 32 P 24 P 33 P 25 P 26 P 27 P 17 P 42 P 34 P 41 P 43 P 35 P 37 P 36 P 44 P 47 Common edge P 46 P 45 (Foley Figure 9.25). 288-1

  17. ✬ ✩ 19– INTERPOLATION AND SPLINES 19.6 Computing parametric curves and surfaces Despite the computational complexity involved in rendering Parametric curves and surfaces (see Foley Section 9.3.5 Displaying bicubic surfaces) they clearly have benefits, including • the production of very high resolution, photo-realistic images for visualising designs (in the automotive industry bicubic splines have been extensively used for visualising new body shapes). • the production of high-tolerance surfaces with very few errors or artifacts (useful for the design of industrial components such as engine parts). Although many of these applications are presently limited either expensive hardware accelerators and/or batch processing before the final results are ready to visualise. ✫ ✪ 289

  18. ✬ ✩ 19– INTERPOLATION AND SPLINES 19.7 Parametric in real-time graphics? What kinds of real-time rendering and shading applications can you think of that might benefit from parametric surfaces? What kinds of parametric surfaces do you think might be good candidates for real-time computer graphics why? What advantages might a parametric approach have over a polygonal approach to modelling surfaces in animation? ✫ ✪ 290

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend