Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.

Slides:



Advertisements
Similar presentations
Lecture 14 Curves and Surfaces II
Advertisements

Lecture Notes #11 Curves and Surfaces II
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material.
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
ICS 415 Computer Graphics Bézier Splines (Chapter 8)
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
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.
© University of Wisconsin, CS559 Spring 2004
B-Spline Blending Functions
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.
Splines II – Interpolating Curves
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Rational Bezier Curves
09/04/02 Dinesh Manocha, COMP258 Bezier Curves Interpolating curve Polynomial or rational parametrization using Bernstein basis functions Use of control.
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
Designing Parametric Cubic Curves Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Cubic Bezier and B-Spline Curves
Curves Mortenson Chapter 2-5 and Angel Chapter 9
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
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 Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
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.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
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.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
1 Bezier Curves and Surfaces © Jeff Parker, Nov 2011.
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 445/645 Fall 2001 Splines/Film/Animation. Final Exam Thursday, December 13 th from 7 – 10 p.m. –Room Olsson 011 You may use one sheet of notes (8.5.
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
Keyframing and Splines Jehee Lee Seoul National University.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
Rendering Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel:
11/26/02(C) University of Wisconsin Last Time BSplines.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
(c) 2002 University of Wisconsin
Slide 129 October 1999CS Computer Graphics (Top Changwatchai) Bézier Curves - Results of Derivation Tangents at endpoints are equal to endpoint slopes.
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.
1 CS 430/536 Computer Graphics I B-Splines and NURBS Week 5, Lecture 9 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing.
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
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.
© University of Wisconsin, CS559 Spring 2004
Introduction to Parametric Curve and Surface Modeling
CS5500 Computer Graphics May 11, 2006
Representation of Curves & Surfaces
CS 445 / 645 Introduction to Computer Graphics
University of New Mexico
© University of Wisconsin, CS559 Fall 2004
Rendering Curves and Surfaces
Designing Parametric Cubic Curves
UNIT-5 Curves and Surfaces.
Introduction to Parametric Curve and Surface Modeling
Designing Parametric Cubic Curves
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel

Objectives Introduce the Bezier curves and surfaces. Derive the required matrices. Introduce the B-spline and compare it to the standard cubic Bezier. CS4395: Computer Graphics 2

Bezier’s Idea In graphics and CAD, we do not usually have derivative data. Bezier: use the same 4 data points as with the cubic interpolating curve to approximate the derivatives in the Hermite form. CS4395: Computer Graphics 3

Approximating Derivatives CS4395: Computer Graphics 4 p0p0 p1p1 p2p2 p3p3 p 1 located at u=1/3 p 2 located at u=2/3 slope p’(0) slope p’(1) u

Equations CS4395: Computer Graphics 5 p(0) = p 0 = c 0 p(1) = p 3 = c 0 +c 1 +c 2 +c 3 p’(0) = 3(p 1 - p 0 ) = c 0 p’(1) = 3(p 3 - p 2 ) = c 1 +2c 2 +3c 3 Interpolating conditions are the same: Approximating derivative conditions: Solve four linear equations for c=M B p

Bezier Matrix CS4395: Computer Graphics 6 p(u) = u T M B p = b(u) T p blending functions

Blending Functions CS4395: Computer Graphics 7 Note that all zeros are at 0 and 1 which forces the functions to be smooth over (0,1).

Bernstein Polynomials The blending functions are a special case of the Bernstein polynomials: These polynomials give the blending polynomials for any degree Bezier form: – All zeros at 0 and 1. – For any degree they all sum to 1. – They are all between 0 and 1 inside (0,1). CS4395: Computer Graphics 8

Convex Hull Property The properties of the Bernstein polynomials ensure that all Bezier curves lie in the convex hull of their control points. Hence, even though we do not interpolate all the data, we cannot be too far away. CS4395: Computer Graphics 9 p0p0 p1p1 p2p2 p3p3 convex hull Bezier curve

Bezier Patches CS4395: Computer Graphics 10 Using same data array P=[p ij ] as with interpolating form: Patch lies in convex hull

Analysis Although Bezier form is much better than interpolating form, the derivatives are not continuous at join points. Can we do better? Go to higher order Bezier: – More work. – Derivative continuity still only approximate. – Supported by OpenGL. Apply different conditions: – Tricky without letting order increase! CS4395: Computer Graphics 11

B-Splines Basic splines: use the data at p=[p i-2 p i-1 p i p i-1 ] T to define curve only between p i-1 and p i Allows to apply more continuity conditions to each segment. For cubics, we can have continuity of function, first and second derivatives at join points. Cost is 3 times as much work for curves: – Add one new point each time rather than three. For surfaces, we do 9 times as much work! CS4395: Computer Graphics 12

Cubic B-spline CS4395: Computer Graphics 13 p(u) = u T M S p = b(u) T p

Blending Functions CS4395: Computer Graphics 14 convex hull property

B-Spline Patches CS4395: Computer Graphics 15 defined over only 1/9 of region

Splines and Basis If we examine cubic B-splines from the perspective of each control (data) point, each interior point contributes (through the blending functions) to four segments. We can rewrite p(u) in terms of the data points as: defining the basis functions {B i (u)} CS4395: Computer Graphics 16

Basis Functions CS4395: Computer Graphics 17 In terms of the blending polynomials:

Generalizing Splines We can extend to splines of any degree. Data and conditions do not have to given at equally spaced values (the knots). – Non-uniform and uniform splines. – Can have repeated knots: Can force splines to interpolate points. Cox-deBoor recursion gives method of evaluation. CS4395: Computer Graphics 18

NURBS Non-Uniform Rational B-Spline curves and surfaces add a fourth variable w to x, y, z. – Interpret as weight to give importance to some data. – Can also interpret as moving to homogeneous coordinates! Requires a perspective division – NURBS act correctly for perspective viewing. Quadrics are a special case of NURBS. CS4395: Computer Graphics 19