Designing Parametric Cubic Curves

Slides:



Advertisements
Similar presentations
Lecture Notes #11 Curves and Surfaces II
Advertisements

Lecture 10 Curves and Surfaces I
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
Dr. S.M. Malaek Assistant: M. Younesi
08/30/00 Dinesh Manocha, COMP258 Hermite Curves A mathematical representation as a link between the algebraic & geometric form Defined by specifying the.
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Slide 127 October 1999CS Computer Graphics (Top Changwatchai) Review of Spline Concepts Sections 10-6 to in Hearn & Baker Splines can be 2D.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
Designing Parametric Cubic Curves Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Drawing Parametric Curves Jean-Paul Mueller. Curves - The parametric form of a curve expresses the value of each spatial variable for points on the curve.
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Modelling: Curves Week 11, Wed Mar 23
RASTER CONVERSION ALGORITHMS FOR CURVES: 2D SPLINES 2D Splines - Bézier curves - Spline curves.
Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
COEN Computer Graphics I
Chapter 10: Curves and Surfaces Part 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Designing Parametric Cubic Curves
Curve Modeling Bézier Curves
Bresenham’s Algorithm. Line Drawing Reference: Edward Angel’s book: –6 th Ed. Sections 6.8 and 6.9 Assuming: –Clipped (to fall within the window) –2D.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
Picking and Curves Week 6 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University of New Mexico CS 480/680.
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel: Interactive.
June D Object Representation Shmuel Wimer Bar Ilan Univ., School of Engineering.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Curves and Surfaces Chapter 10. CS 480/680 2Chapter 9 -- Hierarchical Models Introduction: Introduction: Until now we have worked with flat entities such.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
Rendering Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel:
11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 10.
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
CS552: Computer Graphics Lecture 19: Bezier Curves.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Introduction to Parametric Curve and Surface Modeling.
Introduction to Computer Graphics with WebGL
© University of Wisconsin, CS559 Spring 2004
Introduction to Parametric Curve and Surface Modeling
Representation of Curves & Surfaces
Sampling and Aliasing Ed Angel Professor Emeritus of Computer Science
Computer Graphics Lecture 37
Introduction to Computer Graphics with WebGL
University of New Mexico
University of New Mexico
University of New Mexico
Rendering Curves and Surfaces
Designing Parametric Cubic Curves
© University of Wisconsin, CS559 Spring 2004
Curves and Surfaces Ed Angel
Introduction to Computer Graphics with WebGL
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
UNIT-5 Curves and Surfaces.
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Parametric Curve and Surface Modeling
Curves and Surfaces (I)
Type to enter a caption. Computer Graphics Week 10 Lecture 1.
Presentation transcript:

Designing Parametric Cubic Curves Ed Angel Professor Emeritus of Computer Science University of New Mexico E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Objectives Introduce the types of curves Analyze their performance Interpolating Hermite Bezier B-spline Analyze their performance E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Matrix-Vector Form define then E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Interpolating Curve p1 p3 p0 p2 Given four data (control) points p0 , p1 ,p2 , p3 determine cubic p(u) which passes through them Must find c0 ,c1 ,c2 , c3 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Interpolation Equations apply the interpolating conditions at u=0, 1/3, 2/3, 1 p0=p(0)=c0 p1=p(1/3)=c0+(1/3)c1+(1/3)2c2+(1/3)3c2 p2=p(2/3)=c0+(2/3)c1+(2/3)2c2+(2/3)3c2 p3=p(1)=c0+c1+c2+c2 or in matrix form with p = [p0 p1 p2 p3]T p=Ac E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Interpolation Matrix c=MIp Solving for c we find the interpolation matrix c=MIp Note that MI does not depend on input data and can be used for each segment in x, y, and z E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Interpolating Multiple Segments use p = [p3 p4 p5 p6]T use p = [p0 p1 p2 p3]T Get continuity at join points but not continuity of derivatives E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Blending Functions Rewriting the equation for p(u) p(u)=uTc=uTMIp = b(u)Tp where b(u) = [b0(u) b1(u) b2(u) b3(u)]T is an array of blending polynomials such that p(u) = b0(u)p0+ b1(u)p1+ b2(u)p2+ b3(u)p3 b0(u) = -4.5(u-1/3)(u-2/3)(u-1) b1(u) = 13.5u (u-2/3)(u-1) b2(u) = -13.5u (u-1/3)(u-1) b3(u) = 4.5u (u-1/3)(u-2/3) E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Blending Functions These functions are not smooth Hence the interpolation polynomial is not smooth E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Interpolating Patch Need 16 conditions to determine the 16 coefficients cij Choose at u,v = 0, 1/3, 2/3, 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Matrix Form Define v = [1 v v2 v3]T C = [cij] P = [pij] p(u,v) = uTCv If we observe that for constant u (v), we obtain interpolating curve in v (u), we can show C=MIPMI p(u,v) = uTMIPMITv E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Blending Patches Each bi(u)bj(v) is a blending patch Shows that we can build and analyze surfaces from our knowledge of curves E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Other Types of Curves and Surfaces How can we get around the limitations of the interpolating form Lack of smoothness Discontinuous derivatives at join points We have four conditions (for cubics) that we can apply to each segment Use them other than for interpolation Need only come close to the data E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Hermite Form p’(1) p’(0) p(0) p(1) Use two interpolating conditions and two derivative conditions per segment Ensures continuity and first derivative continuity between segments E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Equations Interpolating conditions are the same at ends p(0) = p0 = c0 p(1) = p3 = c0+c1+c2+c3 Differentiating we find p’(u) = c1+2uc2+3u2c3 Evaluating at end points p’(0) = p’0 = c1 p’(1) = p’3 = c1+2c2+3c3 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Matrix Form Solving, we find c=MHq where MH is the Hermite matrix E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Blending Polynomials p(u) = b(u)Tq Although these functions are smooth, the Hermite form is not used directly in Computer Graphics and CAD because we usually have control points but not derivatives However, the Hermite form is the basis of the Bezier form E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Parametric and Geometric Continuity We can require the derivatives of x, y,and z to each be continuous at join points (parametric continuity) Alternately, we can only require that the tangents of the resulting curve be continuous (geometry continuity) The latter gives more flexibility as we have need satisfy only two conditions rather than three at each join point E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Example Here the p and q have the same tangents at the ends of the segment but different derivatives Generate different Hermite curves This techniques is used in drawing applications E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012

Higher Dimensional Approximations The techniques for both interpolating and Hermite curves can be used with higher dimensional parametric polynomials For interpolating form, the resulting matrix becomes increasingly more ill-conditioned and the resulting curves less smooth and more prone to numerical errors In both cases, there is more work in rendering the resulting polynomial curves and surfaces E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012