Lecture Notes #11 Curves and Surfaces II

Slides:



Advertisements
Similar presentations
Lecture 14 Curves and Surfaces II
Advertisements

Splines IV – B-spline Curves
Interpolating curves.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 8, 2014 SPLINES CUBIC CURVES HERMITE CURVES BÉZIER CURVES B-SPLINES BICUBIC SURFACES SUBDIVISION SURFACES.
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)
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
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.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Rational Bezier Curves
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.
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
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Splines III – Bézier Curves
Computer Graphics Lecture 13 Curves and Surfaces I.
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.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
(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.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
Chapter VI Parametric Curves and Surfaces
June D Object Representation Shmuel Wimer Bar Ilan Univ., School of Engineering.
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.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
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.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
11/26/02(C) University of Wisconsin Last Time BSplines.
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.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
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.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Introduction to Parametric Curve and Surface Modeling.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 SPLINES
© University of Wisconsin, CS559 Spring 2004
CS5500 Computer Graphics May 11, 2006
Curve & Surface.
Representation of Curves & Surfaces
CS 445 / 645 Introduction to Computer Graphics
Chapter 10-2: Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Chapter XVII Parametric Curves and Surfaces
Three-Dimensional Object Representation
Introduction to Parametric Curve and Surface Modeling
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

Lecture Notes #11 Curves and Surfaces II Computer Graphics Lecture Notes #11 Curves and Surfaces II

Uniform Non-rational B-Splines. 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. m=9 (10 control points) m-1 knots m-2 knot intervals. 26/10/2007 Lecture Notes #11

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 m=9 (10 control points) m-1 knots m-2 knot intervals. 26/10/2007 Lecture Notes #11

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 m=9 (10 control points) m-1 knots m-2 knot intervals. 26/10/2007 Lecture Notes #11

Uniform Non-Rational B-Splines The unweighted spline set will look as follows, 10 control points, 10 splines, but only 8 knots and 7 knot 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, t3 to tm+1 are the knots. t 8 6 m m+1 3 4 26/10/2007 Lecture Notes #11

Cubic B-Splines We have talked about a bi-infinite set of splines. What does this look like? The unweighted B-Splines are shown for clarity. How does a weighted set affect the shape of the curve? t 4 8 12 26/10/2007 Lecture Notes #11

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. 26/10/2007 Lecture Notes #11

B-Spline example A closed curve is rather like a bi-infinite set – a periodic set of N knots in which: for all i, ti+N = ti and ti = i for i = 0..N-1 Consider a closed curve with 5 control points with 5 knots. N=5, ie. x–1 x4, etc. Control points are: x0 = (2,0); x1 = (1,1); x2 = (-1,1); x3 = (-1,-1) and x4 = (1,-1). 26/10/2007 Lecture Notes #11

B-Spline example Draw the interval: t = [4..5] , the others are handled the same way. x1 x4 x0 x1 x2 x3 x4 26/10/2007 Lecture Notes #11

How smooth is a B-Spine? Smoothness increases with order k in Bi,k Quadratic, k = 3, gives up to C1 order continuity. Cubic, k = 4 gives up to C2 order 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 m is continuous to the (k-1-m)th derivative. A knot with multiplicity k has no continuity at all, ie. the curve is broken at that knot. 26/10/2007 Lecture Notes #11

Non-Uniform Non-Rational B-Splines Note: as m increases by 1, an extra B-Spline function is attached to that knot: qiBi,k B-Splines have special forms at multiple knots. Obtained from a recursive formula defining how B-Splines are built, by setting m successive knots to be equal: tk+1 = tk+2 = … = tk+m No point in having m>k Thus for endpoints to be on curve, they must have a multiplicity of k, multiplicity of 4 in cubic case. 26/10/2007 Lecture Notes #11

B-Splines at multiple knots The multiple-knot B-Splines are as follows: B0,4(t) B1,4(t) B2,4(t) B3,4(t) t i=0,1,2,3 4 5 6 7 B0,4 is totally discontinuous at t = t0 , B1,4 is position continuous, B2,4 is gradient continuous, B3,4 is curvature continuous. 26/10/2007 Lecture Notes #11

B-Spline continuity example. First knot shown with 4 control points, and their convex hull. 26/10/2007 Lecture Notes #11

B-Spline continuity example. First two curve segments shown with their respective convex hulls. Centre Knot must lie in the intersection of the 2 convex hulls. 26/10/2007 Lecture Notes #11

Repeated control point. P1=P2 P0 P3 P4 First two curve segments shown with their respective convex hulls. Knot is forced to lie on the line that joins the 2 convex hulls. Curve is only C1 continuous 26/10/2007 Lecture Notes #11

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. Curve is only C0 continuous (Curiously it is actually C2 continuous because tangent vector magnitude falls to zero at join. ) P1=P2=P3 P0 P4 26/10/2007 Lecture Notes #11

Non-uniform non-rational B-splines. Parametric interval between knots does not have to be equal. Blending functions no longer the same for each interval. Multiple knots may have to be spaced apart. 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. 26/10/2007 Lecture Notes #11

Summary of B-Splines. Functions that can interpolate a series of control points with C2 continuity and local control. Don’t pass through their control points, although can be forced. note that if an order k B-Spline has k points locally colinear then a straight-line section will result midway in the set, and will touch (tangentially) the convex hull for (k – 1) colinear control points. Uniform Knots are equally spaced in t. Non-Uniform Knots are unequally spaced Allows addition of extra control points anywhere in the set. 26/10/2007 Lecture Notes #11

Summary cont. For interactive curve modelling B-Splines are very good. To interpolate a number of positions Catmull-Rom splines are best. To interpolate with tangent control Hemite or Bézier forms are useful and most often used. To draw a spline. Brute force method : Evaluate matrix to get parametric expressions for coordinates. Then for small increments of t, join with line segments. Better : use method of forward differences to express spline in t form. 26/10/2007 Lecture Notes #11

Surfaces – a simple extension Easy to generalise from cubic curves to bicubic surfaces. Surfaces defined by parametric equations of two variables, s and t. ie. a surface is approximated by a series of crossing parametric cubic curves Result is a polygon mesh and decreasing step size in s and t will give a mesh of small near-planar quadrilateral patches and more accuracy. 26/10/2007 Lecture Notes #11

Example Bézier surface 26/10/2007 Lecture Notes #11

Control of surface shape Control is now a 2D array of control points. The two parameter surface function, forming the tensor product with the blending functions is: Use appropriate blending functions for Bézier and B-Spline surface functions. Convex Hull property is preserved since bicubic is still a weighted sum (1). 26/10/2007 Lecture Notes #11

Bézier example Matrix formulation is as follows: Substitute suitable values for s and t (20 in the above ex.) 26/10/2007 Lecture Notes #11

B-Spline surfaces Break surface into 4-sided patches choosing suitable values for s and t. Points on any external edges must be multiple knots of multiplicity k. Lot more work than Bézier. There are other types of spline systems and NURBS modelling packages are available to make the work much easier. Use polygon packages for display, hidden-surface removal and rendering. (Bézier too) 26/10/2007 Lecture Notes #11

Continuity of Bicubic patches. Hermite and Bézier patches C0 continuity by sharing 4 control points between patches. C1 continuity when both sets of control points either side of the edge are collinear with the edge. B-Spline patch. C2 continuity between patches. 26/10/2007 Lecture Notes #11

Displaying Bicubic patches. Can calculate surface normals to bicubic surfaces by vector cross product of the 2 tangent vectors. Normal is expensive to compute Formulation of normal is a biquintic (two-variable,fifth-degree) polynomial. Display. Can use brute-force method – very expensive ! Forward differencing method very attractive. 26/10/2007 Lecture Notes #11

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. Other texts: look for B-Splines UNRBS, NUNRBS, something on forward difference method, comparison of systems, and Bézier and B-Spline surface modelling. 26/10/2007 Lecture Notes #11