Lecture 14 Curves and Surfaces II

Slides:



Advertisements
Similar presentations
SI23 Introduction to Computer Graphics
Advertisements

Splines IV – B-spline Curves
Splines I – Curves and Properties
Curves Jim Van Verth Essential Math for Games Animation Problem: want to replay stored set of transformations  Generated by.
Lecture Notes #11 Curves and Surfaces II
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Lecture 10 Curves and Surfaces I
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material.
ICS 415 Computer Graphics Bézier Splines (Chapter 8)
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
Dr. S.M. Malaek Assistant: M. Younesi
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.
Curves Chiew-Lan Tai.
Curves Chiew-Lan Tai. Curves 2 Reading Required Hearn & Baker, 8-8 – 8-10, 8-12 Foley, 11.2.
Rational Bezier Curves
Spline Interpretation ABC Introduction and outline Based mostly on Wikipedia.
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.
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.
Modelling: Curves Week 11, Wed Mar 23
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
COEN Computer Graphics I
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Computer Graphics Lecture 13 Curves and Surfaces I.
Curve Modeling Bézier Curves
Curve Modeling B-Spline Curves
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 16.
(Spline, Bezier, B-Spline)
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.
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.
Splines Vida Movahedi January 2007.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
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.
Computer Graphics Representing Curves and Surfaces.
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.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
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 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
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.
© University of Wisconsin, CS559 Spring 2004
CS5500 Computer Graphics May 11, 2006
Representation of Curves & Surfaces
CS 445 / 645 Introduction to Computer Graphics
(Spline, Bezier, B-Spline)
Chapter 10-2: Curves.
© University of Wisconsin, CS559 Spring 2004
Chapter XVII Parametric Curves and Surfaces
Three-Dimensional Object Representation
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

Lecture 14 Curves and Surfaces II Computer Graphics Lecture 14 Curves and Surfaces II

Spline A long flexible strips of metal used by draftspersons to lay out the surfaces of airplanes, cars and ships Ducks weights attached to the splines were used to pull the spline in different directions The metal splines had second order continuity 10/10/2008 Lecture 5

B-Splines (for basis splines) Another polynomial curve for modelling curves and surfaces Consists of curve segments whose polynomial coefficients only depend on just a few control points Local control Segments joined at knots 10/10/2008 Lecture 5

B-splines The curve does not necessarily pass through the control points The shape is constrained to the convex hull made by the control points Uniform cubic b-splines has C2 continuity Higher than Hermite or Bezier curves

Basis Functions knots t We can create a long curve using many knots and B-splines The unweighted cubic B-Splines have been shown for clarity. These are weighted and summed to produce a curve of the desired shape t 4 8 12 10/10/2008 Lecture 5

Generating a curve X(t)‏ t Opposite we see an example of a shape to be generated. Here we see the curve again with the weighted B-Splines which generated the required shape. 10/10/2008 Lecture 5

The basic one: Uniform Cubic B-Splines Cubic B-splines with uniform knot-vector is the most commonly used form of B-splines 10/10/2008 Lecture 5

Cubic B-Splines The unweighted spline set of 10 control points, 10 splines, 14 knots, and but only 7 intervals. You can see why t3 to t4 is the first interval with a curve since it is the first with all four B-Spline functions. t9 to t10 is the last interval t 8 6 m m+1 3 4 10/10/2008 Lecture 5

Domain of the function Order k, Degree k-1 Control points Pi (i=0,…,m) Knots : tj, (j=0,…, k + m) The domain of the function tk-1 ≦ t≦ tm+1 Below, k = 4, m = 9, domain, t3 ≦ t≦ t10 t m+1 3

Cubic Uniform B-Spline 2D example For each i  4 , there is a knot between Qi-1 and Qi at t = ti. Initial points at t3 and tm+1 are also knots. The following illustrates an example with control points set P0 … P9: Knot. Control point. 10/10/2008 Lecture 5

Uniform Non-rational B-Splines. First segment Q3 is defined by point P0 through P3 over the range t3 = 0 to t4 = 1. So m at least 3 for cubic spline. Knot. Control point. P1 P2 P3 P0 Q3 10/10/2008 Lecture 5

Uniform Non-rational B-Splines. Second segment Q4 is defined by point P1 through P4 over the range t4 = 1 to t5 = 2. Knot. Control point. Q4 P1 P3 P4 P2 10/10/2008 Lecture 5

B-Spline : A more general definition A Bspline of order k is a parametric curve composed of a linear combination of basis B-splines Bi,n Pi (i=0,…,m) the control points Knots: tj, j=0,…, k + m The B-splines can be defined by 10/10/2008 Lecture 5

The shape of the basis functions Bi,2 : linear basis functions Order = 2, degree = 1 C0 continuous 10/10/2008 http://www.ibiblio.org/e-notes/Splines/Basis.htm Lecture 5

The shape of the basis functions Bi,3 : Quadratic basis functions Order = 3, degree = 2 C1 continuous 10/10/2008 http://www.ibiblio.org/e-notes/Splines/Basis.htm Lecture 5

The shape of the basis functions Bi,4 : Cubic basis functions Order = 4, degree = 3 C2 continuous 10/10/2008 http://www.ibiblio.org/e-notes/Splines/Basis.htm Lecture 5

Uniform / non-uniform B-splines The knots are equidistant / non-equidistant The previous examples were uniform B-splines Parametric interval between knots does not have to be equal. Non-uniform B-splines

Non-uniform B-splines. Blending functions no longer the same for each interval. Advantages Continuity at selected control points can be reduced to C1 or lower – allows us to interpolate a control point without side-effects. Can interpolate start and end points. Easy to add extra knots and control points. Good for shape modelling ! 10/10/2008

Controlling the shape of the curves Can control the shape through Control points Overlapping the control points to make it pass through a specific point Knots Changing the continuity by increasing the multiplicity at some knot (non-uniform bsplines)

Controlling the shape through control points First knot shown with 4 control points, and their convex hull. 10/10/2008 Lecture 5

Controlling the shape through control points First two curve segments shown with their respective convex hulls. Centre Knot must lie in the intersection of the 2 convex hulls. 10/10/2008 Lecture 5

Repeated control point. P1=P2 P0 P3 P4 First two curve segments shown with their respective convex hulls. The curve is forced to lie on the line that joins the 2 convex hulls. 10/10/2008 Lecture 5

First two curve segments shown with their respective convex hulls. Triple control point. First two curve segments shown with their respective convex hulls. Both convex hulls collapse to straight lines – all the curve must lie on these lines. P1=P2=P3 P0 P4 10/10/2008 Lecture 5

Controlling the shape through knots Smoothness increases with order k in Bi,k Quadratic, k = 3, gives up to C1 continuity. Cubic, k = 4 gives up to C2 continuity. However, we can lower continuity order too with Multiple Knots, ie. ti = ti+1= ti+2 = … Knots are coincident and so now we have non-uniform knot intervals. A knot with multiplicity p is continuous to the (k-1-p)th derivative. A knot with multiplicity k has no continuity at all, i.e. the curve is broken at that knot. 10/10/2008 Lecture 5

B-Splines at multiple knots Cubic B-spline Multiplicities are indicated

Knot multiplicity Consider the uniform cubic (n=4) B-spline curve, t={0,1, … ,13}, m=9 , n=4, 7 segments

Knot multiplicity Double knot at 5, 6 segments, continuity = 1

Knot multiplicity Triple knot at 5 5 segments

Knot multiplicity Quadruple knot at 5 4 segments

Summary of B-Splines. Functions that can be manipulated by a series of control points with C2 continuity and local control. Don’t pass through their control points, although can be forced. Uniform Knots are equally spaced in t. Non-Uniform Knots are unequally spaced Allows addition of extra control points anywhere in the set. 10/10/2008 Lecture 5

Summary cont. Do not have to worry about the continuity at the join points For interactive curve modelling B-Splines are very good. 10/10/2008 Lecture 5

2nd Practical Use OpenGL to draw the teapot You must extend your code in the first assignment Bonus marks for making it nice Bump mapping Texture mapping Or whatever Deadline : 10th December

Reading for this lecture Foley at al., Chapter 11, sections 11.2.3, 11.2.4, 11.2.9, 11.2.10, 11.3 and 11.5. Introductory text, Chapter 9, sections 9.2.4, 9.2.5, 9.2.7, 9.2.8 and 9.3. . 10/10/2008 Lecture 5