Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.

Slides:



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

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
BEZIER CURVES Part II. Assume we are given two endpoints labelled E1 and E2 and two control points labelled C1 and C2. create a smooth curve whose endpoints.
© University of Wisconsin, CS559 Spring 2004
#8: Curves and Curved Surfaces CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006.
Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Bezier Curves and Splines David Eno MAT 499 Fall ‘06.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Splines II – Interpolating Curves
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
CHAPTER 10 Curves and Surfaces Vivian by Richard S. Wright Jr.
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
1 Dr. Scott Schaefer The Bernstein Basis and Bezier Curves.
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
ENDS 375 Foundations of Visualization Geometric Representation 9/30/04.
RASTER CONVERSION ALGORITHMS FOR CURVES: 2D SPLINES 2D Splines - Bézier curves - Spline curves.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
COEN Computer Graphics I
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Splines III – Bézier Curves
Parametric Curves & Surfaces
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
19/13/ :20 UML Graphics II Parametric Curves and Surfaces Session 3.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 16.
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.
Introduction to Computer Graphics with WebGL
Numerical Computation
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Vector Computer Graphic. Vector entities Line Circle, Ellipse, arc,… Curves: Spline, Bezier’s curve, … … Areas Solids Models.
Bézier Algorithms & Properties Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, March 3, 2004.
Chapter VI Parametric Curves and Surfaces
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
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.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
1 Bezier Curves and Surfaces © Jeff Parker, Nov 2009.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
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/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
Spline Interpolation A Primer on the Basics by Don Allen.
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Parametric Curves & Surfaces
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 30 of 42 Wednesday, 09.
CS552: Computer Graphics Lecture 19: Bezier Curves.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Introduction to Parametric Curve and Surface Modeling.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Introduction to Parametric Curve and Surface Modeling
CS 445 / 645 Introduction to Computer Graphics
© University of Wisconsin, CS559 Fall 2004
Rendering Curves and Surfaces
© University of Wisconsin, CS559 Spring 2004
The Bernstein Basis and Bezier Curves
PPT9: Global and local interpolation
Introduction to Parametric Curve and Surface Modeling
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College PowerPoint Instructor’s Resource

Interpolation and Spline Modeling Creating curves and surfaces with just a few control points

Interpolations If we have just a few points, we can define curves or surfaces from polygons of relatively low degree that go through the points OR: We could modify this requirement to have the curves or surfaces influenced by the points

Interpolations (2) For example, with any three points P0, P1, P2 we can define a quadratic function of one variable f0(t)P0+f1(t)P1+f2(t)P2 with the quadratic functions f0(t)=(1-t)2, f1(t)=2t(1-t), and f2(t)=t2 with domain [0,1] that goes through P0 and P2 and goes towards P1

Interpolations (3) These three functions are called the quadratic Bernstein basis for the quadratic Bézier curves, and an example curve is:

Interpolations (4) There are Bernstein basis functions of all degrees; the general form for the n+1 functions of degree n on [0,1] is Notice that these are the terms in expanding (1-t)n

Interpolations (5) The cubic Bézier curve is the most commonly used of these. It takes four control points, goes through the two endpoints, and interpolates the others. An example curve is:

Other Interpolations Catmull-Rom spline: a cubic spline that uses four control points and goes through the second and third of them in directions determined by the first and fourth

Another Way to Compute Splines Another way to compute spline functions uses matrices and may be more efficient For the Bézier cubic spline, this is:

Extending Spline Curves Using P0-P1-P2-P3 then P3-P4-P5-P6 is not smooth Adding midpoints Q0 and Q1 between points P2-P3 and P4-P5:

Spline Curves in 3D Everything said about spline curves is valid in 3D as well as 2D, and we have:

Spline Surfaces Simplest surface is a patch, defined by a square array of control points The interpolating functions are used for both variables (u,v) in the square domain [0,1]x[0,1] If the functions are cubic in each variable, the result is a bicubic whose coefficients depend on the control points:

Spline Surface (2) An example of a single bicubic patch of a Bézier surface, with control points:

Spline Surface (3) OpenGL gives you some tools that let you avoid the details of programming all the basis functions These are the evaluator functions, and they let you get normals and texture coordinates automatically. The downside is that you can only use the kind of splines that OpenGL gives you.

Spline Surface (4) Examples of an extended surface with automatic normals (left) and a patch with automatic texture coordinates (right)