B-Spline Polynomials. B-Spline Polynomials. Uniform Cubic B-Spline Curves CS 460. Computer Graphics

Similar documents
CS770/870 Spring 2017 Curve Generation

Representing Curves Part II. Foley & Van Dam, Chapter 11

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

CS 475 / CS Computer Graphics. Modelling Curves 3 - B-Splines

Know it. Control points. B Spline surfaces. Implicit surfaces

Central issues in modelling

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

3D Modeling Parametric Curves & Surfaces

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

(Spline, Bezier, B-Spline)

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

2D Spline Curves. CS 4620 Lecture 13

Rational Bezier Curves

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Curves and Surfaces 1

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

Computer Graphics. Curves and Surfaces. Hermite/Bezier Curves, (B-)Splines, and NURBS. By Ulf Assarsson

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

An introduction to interpolation and splines

Bezier Curves, B-Splines, NURBS

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

08 - Designing Approximating Curves

B-spline Curves. Smoother than other curve forms

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

Design considerations

Spline Curves. Spline Curves. Prof. Dr. Hans Hagen Algorithmic Geometry WS 2013/2014 1

Curves. Computer Graphics CSE 167 Lecture 11

Shape Representation Basic problem We make pictures of things How do we describe those things? Many of those things are shapes Other things include

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Advanced Graphics. Beziers, B-splines, and NURBS. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Need for Parametric Equations

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

15.10 Curve Interpolation using Uniform Cubic B-Spline Curves. CS Dept, UK

Curves D.A. Forsyth, with slides from John Hart

Curves and Surfaces Computer Graphics I Lecture 9

2D Spline Curves. CS 4620 Lecture 18

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

An Introduction to B-Spline Curves

Computational Physics PHYS 420

Introduction to Computer Graphics

Cubic spline interpolation

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur

B(asis) Splines. Ashish Myles CISE, UF

Interactive Graphics Using Parametric Equations (Day 2)

Rational Bezier Surface

Objects 2: Curves & Splines Christian Miller CS Fall 2011

Figure 5.1: Spline and ducks.

Intro to Curves Week 4, Lecture 7

Intro to Modeling Modeling in 3D

Friday, 11 January 13. Interpolation

Computer Graphics. Unit VI: Curves And Fractals. By Vaishali Kolhe

Intro to Curves Week 1, Lecture 2

Sung-Eui Yoon ( 윤성의 )

Handout 4 - Interpolation Examples

Lecture IV Bézier Curves

CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2

Geometric Modeling of Curves

Curves and Surfaces Computer Graphics I Lecture 10

CS-184: Computer Graphics

Spline Notes. Marc Olano University of Maryland, Baltimore County. February 20, 2004

Spline Morphing. CG software practical course in the IWR. Carl Friedrich Bolz. Carl Friedrich Bolz

The Free-form Surface Modelling System

CS-184: Computer Graphics. Today

Mar. 20 Math 2335 sec 001 Spring 2014

Curves and Surfaces. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd

Outline. Properties of Piecewise Linear Interpolations. The de Casteljau Algorithm. Recall: Linear Interpolation

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010

Important Properties of B-spline Basis Functions

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

ME 261: Numerical Analysis Lecture-12: Numerical Interpolation

GL9: Engineering Communications. GL9: CAD techniques. Curves Surfaces Solids Techniques

8 Piecewise Polynomial Interpolation

Bezier Curves. An Introduction. Detlef Reimers

Parametric curves. Brian Curless CSE 457 Spring 2016

CAGD PACKAGE FOR MATHEMATICA AND ITS USAGE IN THE TEACHING

CS130 : Computer Graphics Curves. Tamar Shinar Computer Science & Engineering UC Riverside

Further Graphics. Bezier Curves and Surfaces. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Numerical Methods in Physics Lecture 2 Interpolation

Information Coding / Computer Graphics, ISY, LiTH. Splines

LECTURE #6. Geometric Modelling for Engineering Applications. Geometric modeling for engineering applications

NURBS: Non-Uniform Rational B-Splines AUI Course Denbigh Starkey

Splines. Connecting the Dots

B-Splines and NURBS Week 5, Lecture 9

Outline. The de Casteljau Algorithm. Properties of Piecewise Linear Interpolations. Recall: Linear Interpolation

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006

Rendering Curves and Surfaces. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

On an approach for cubic Bézier interpolation

Lecture 9: Introduction to Spline Curves

Simple Keyframe Animation

COMP3421. Global Lighting Part 2: Radiosity

CS 450 Numerical Analysis. Chapter 7: Interpolation

Parameterization. Michael S. Floater. November 10, 2011

Most shapes are simply too complicated to dene using a single Bezier curve. A spline curve is

Spline Methods Draft. Tom Lyche and Knut Mørken

Computergrafik. Matthias Zwicker. Herbst 2010

Transcription:

CS 460 B-Spline Polynomials Computer Graphics Professor Richard Eckert March 24, 2004 B-Spline Polynomials Want local control Smoother curves B-spline curves: Segmented approximating curve 4 control points affect each segment Local control Level-2 continuity everywhere Very smooth Cubic B-Spline Polynomial Curves Approximate m+1 control points Pi (i=0,1,2,,m) with a curve consisting of m-2 cubic polynomial curve segments Q i (i=3,4,...m), m>=3 Each Q i defined in terms of: parameter t: t i <=t<=t i+1 and by four of the m+1 control points Segment Q i determined by control points: P i-3, P i-2, P i-1, P i between t i and t i+1 Uniform Cubic B-Spline Curves Q i begins at t = t i and ends at t = t I+1, Q i+1 joins Q i at t i+1 Join point called a knot. For example First segment is Q 3, begins at t 3, ends at t 4 Is determined by control points P0,P1,P2,P3 Each segment is affected by only 4 control points Each control pt affects at most 4 curve segments 1

Uniform Cubic B-Splines A special case where we assume that: t i+1 = t i + 1 Polynomial equation for segment Qi: Qi(t) = a*(t-ti) 3 + b*(t-ti) 2 + c*(t-ti) + d, ti<=t<=ti+1 Take independent variable as t-ti Will vary from 0 to 1 for any interval Need to get polynomial coefficients (a,b,c,d) from control points Find a "B-Spline Basis Matrix as for Bezier curves but must do computation for each interval a P i-3 b = M BS * P i-2 c P i-1 _d_ _P i _ M BS is the desired matrix B-Spline Continuity Conditions Conditions on 1st & 2nd derivatives: 1. dq i /dt (at t=t i ) = slope of line segment joining P i-3 and P i-1 2. dq i /dt (at t=t i+1 ) = slope of line segment joining P i-2 and P i 3. (dq i /dt)' (t=t i ) = rate of change in slope at t i : ( slope of [P i-3 -P i -2 ] - slope of [P i-2 -P i ] ) /? t 4. (dqi/dt)' (t=t i+1 ) = rate of change in slope at t i+1 : ( slope of [P i-2 -P i -1 ] - slope of [P i-1 -P i ] ) /? t Continuity Conditions 1 and 2 Continuity Conditions 3 and 4 Qi = a*(t-ti) 3 + b*(t-ti) 2 + c*(t -ti) + d dqi/dt = 3*a*(t-ti) 2 + 2*b*(t-ti) + c (dqi/dt)' = 6a*(t-ti) + 2*b Condition 1: c = ( P i-1 - P i-3 )/2 Condition 2: 3*a + 2*b + c = (P i - P i-2 )/2 Condition 3: 2*b = ((P i-1 - P i-2 ) - (P i-2 - P i -3 )) / 1 Condition 4: 6*a + 2*b = ((P i -P i-1 )-(P i-1 -P i-2 )) / 1 These four equations are not independent Solving gives only a, b, c, but not d 2

Solution a = (1/6) * (-P i-3 + 3*P i-2-3*p i-1 + P i ) b = (1/6) * (3*P i-3-6*p i-2 + 3*P i-1 ) c = (1/6) * (-3*P i-3 + 3*P i-1 ) Need another condition to get d Choose the following condition: Q (at t=ti) = (1/6) * (P i-3 + 4*P i-2 + P i-1 ) i.e., control point at ti (P i -2 ) pulls 4 times as hard at t=ti as control points on either side of ti Substitute in polynomial equation --> d = (1/6) * (P i-3 + 4*P i-2 + P i-1 ) Uniform Cubic B-Spline Coefficient Matrix Equation a -1 3-3 1 P i-3 b = (1/6)* 3-6 3 0 * P i-2 c -3 0 3 0 P i-1 _d_ _1 4 1 0_ _P i _ Could also be written in terms of blending functions 3 Q i (t) =? B i-j,4 (t) * P i-j j=0 B i-3,4 = 1/6 * (1-t) 3 B i-2,4 = 1/6 * (3t 3-6t 2 + 4) B i-1,4 = 1/6 * (-3t 3 + 3t 2-3t +1) B i,4 = 1/6 * t 3 See Foley & Van Dam Plotting Uniform Cubic B-Splines Given m+1 control points P0,P1,P2,...Pm (Recall that each has an x and y coordinate) i.e., P0 --> x0 and y0, etc. The following is a "brute force" algorithm to plot the curve delta is a very small increment (e.g., 0.05) Brute Force Algorithm For (i=3 to m) Compute ax,bx,cx,dx and ay,by,cy,dy from control points i-3, i-2, i-1, i For (t=0; t<=1; t+=delta) x = ax*t 3 + bx*t 2 + cx*t + dx y = ay*t 3 + by*t 2 + cy*t + dy If (t==0) MoveTo(x,y) Else LineTo(x,y) 3

To increase performance, use forward differences Closed Cubic B-Splines Make last 3 control points coincide with 1st 3 0 <--> m-2, 1 <--> m-1, 2 <--> m Example: m=6 Forcing Interpolation Reproduce a control point three times Properties of Uniform B-Splines 1. Local Control Each segment determined by only 4 control points 2. Approximates control points; doesn t interpolate (However it will interpolate triplicated control points) 3. Lies inside convex hull of control points Each segment lies inside convex hull of its 4 control points 4. Invariant under affine transformations 5. Very smooth Level-2 continuity everywhere 6. More computations required than for "equivalent" Bezier curve Bezier vs. B-Spline Curves Non-uniform Cubic B-Splines Greater variety of curve shapes Can have cusps and discontinuities Intervals between successive knots varies Knot values must be specified t 0, t 1, t 2, t 3, t 4,, t m-2 4

Case A (Level-2 Continuity) Case A (Level-2 Continuity) Knot vector: (0,1,2,3,4,5,...) Just our friend the uniform B-spline Q4 determined by P1, P2, P3, P4 Q3 and Q4 share control points P1,P2,P3 Three constraints ==> L0, L1, L2 continuity Case B (Level-1 Continuity) Knot vector: (0,1,1,2,3,4,...) Segment Q4 becomes a point (since t4 = t5) Q5 determined by P2, P3, P4, P5 So Q4 must lie on line connecting P2 & P3 Q3 and Q5 share control points P2 & P3 Two constraints ==> L0, L1 continuity Case B (Level-1 Continuity) 5

Case C (Level-0 continuity) Knot vector: (0,1,1,1,2,3,...) Q4 and Q5 become points (since t4=t5=t6) Q6 determined by P3, P4, P5, P6 So Q4/Q5 must lie on control Point P3 (interpolates it) Q3 and Q6 share control point P3 One constraint ==> L0 continuity Case C (Level-0 continuity) Case D (No Continuity) Knot vector: (0,1,1,1,1,2,...) Q4, Q5, Q6 become points (since t4=t5=t6=t7) Q7 determined by P4, P5, P6, P7 There is no overlap Q3 and Q7 share no control points No constraints ==> discontinuity Case D (No Continuity) 6