CS U540 Computer Graphics Prof. Harriet Fell Spring 2007

Slides:



Advertisements
Similar presentations
Interpolating curves.
Advertisements

College of Computer and Information Science, Northeastern UniversityApril 12, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2007 Lecture.
Lecture Notes #11 Curves and Surfaces II
Parametric Curves Ref: 1, 2.
© University of Wisconsin, CS559 Spring 2004
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Lecture 10 Curves and Surfaces I
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.
CS 445 / 645 Introduction to Computer Graphics Lecture 22 Hermite Splines Lecture 22 Hermite Splines.
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
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.
1 Dr. Scott Schaefer The Bernstein Basis and Bezier Curves.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
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.
Computer Graphics Lecture 13 Curves and Surfaces I.
Curve Modeling Bézier Curves
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
Spline Representations
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
CS 376 Introduction to Computer Graphics 04 / 20 / 2007 Instructor: Michael Eckmann.
INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.
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.
CS559: Computer Graphics Lecture 19: Curves Li Zhang Spring 2008.
Keyframing and Splines Jehee Lee Seoul National University.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Basic Theory (for curve 02). 1.3 Parametric Curves  The main aim of computer graphics is to display an arbitrary surface so that it looks real.  The.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
Interpolating Splines, Implicit Descriptions Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Friday, March 5,
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.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
College of Computer and Information Science, Northeastern UniversityFebruary 27, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lectures.
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:
CS559: Computer Graphics Lecture 13: Hierarchical Modeling and Curves Li Zhang Spring 2010.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
CS552: Computer Graphics Lecture 19: Bezier Curves.
Piecewise Polynomial Parametric Curves Sun-Jeong Kim.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Introduction to Parametric Curve and Surface Modeling.
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
CS G140 Graduate Computer Graphics
© University of Wisconsin, CS559 Spring 2004
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves
Curve & Surface.
Representation of Curves & Surfaces
CS 445 / 645 Introduction to Computer Graphics
Parametric Curves cgvr.korea.ac.kr.
2D Spline Curves CS 465 Lecture 15 © 2004 Steve Marschner • 1.
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves
Parametric Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Spline Curves COMP 575/COMP 770.
The Bernstein Basis and Bezier Curves
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
Curve design 455.
Introduction to Parametric Curve and Surface Modeling
Type to enter a caption. Computer Graphics Week 10 Lecture 1.
Type to enter a caption. Computer Graphics Week 10 Lecture 2.
Presentation transcript:

CS U540 Computer Graphics Prof. Harriet Fell Spring 2007 Lectures 23,24,25 – March 12,14,15, 2007 November 21, 2018

Today’s Topics Curves Fitting Curves to Data Points Splines Hermite Cubics Bezier Cubics November 21, 2018

Curves A curve is the continuous image of an interval in n-space. x2 + y2 – R2 = 0 Implicit f(x, y) = 0 P(t) = tA + (1-t)B A B Parametric (x(t), y(t)) = P(t) Generative proc  (x, y) November 21, 2018

Curve Fitting We want a curve that passes through control points. interpolating curve Or a curve that passes near control points. approximating curve How do we create a good curve? What makes a good curve? November 21, 2018

Axis Independence If we rotate the set of control points, we should get the rotated curve. November 21, 2018

Local Control

Variation Diminishing Never crosses a straight line more than the polygon crosses it. November 21, 2018

Continuity C1 continuity C0 continuity C2 continuity G2 continuity Not C2 continuity November 21, 2018

How do we Fit Curves? The Lagrange interpolating polynomial is the polynomial of degree n-1 that passes through the n points, (x1, y1), (x2, y2), …, (xn, yn), and is given by Lagrange Interpolating Polynomial from mathworld November 21, 2018

Example 1 November 21, 2018

Polynomial Fit P(x) = -.5x(x-2)(x-3)(x-4) November 21, 2018

Piecewise Fit Pa(x) = 4.1249 x (x - 1.7273) 0  x  1.5 Pb(x) = 5.4 x (x - 1.7273) 1.5  x  2 Pc(x) = 0 2  x  4 November 21, 2018

Spline Curves November 21, 2018

Splines and Spline Ducks Marine Drafting Weights http://www.frets.com/FRETSPages/Luthier/TipsTricks/DraftingWeights/draftweights.html November 21, 2018

Drawing Spline Today (esc) Draw some curves in PowerPoint. Look at Perlin’s B-Spline Applet. November 21, 2018

Hermite Cubics P(t) = at3 + bt2 +ct +d Dq P(0) = p P(1) = q P'(0) = Dp P'(1) = Dq November 21, 2018

Hermite Coefficients P(t) = at3 + bt2 +ct +d P(0) = p P(1) = q P'(0) = Dp P'(1) = Dq For each coordinate, we have 4 linear equations in 4 unknowns November 21, 2018

Boundary Constraint Matrix November 21, 2018

Hermite Matrix MH GH November 21, 2018

Hermite Blending Functions November 21, 2018

Splines of Hermite Cubics a C1 spline of Hermite curves a G1 but not C1 spline of Hermite curves The vectors shown are 1/3 the length of the tangent vectors. November 21, 2018

Computing the Tangent Vectors Catmull-Rom Spline P(0) = p3 P(1) = p4 P'(0) = ½(p4 - p2 ) P'(1) = ½(p5 - p3 ) p2 p4 p1 November 21, 2018

Cardinal Spline The Catmull-Rom spline P(0) = p3 P(1) = p4 is a special case of the Cardinal spline P(0) = p3 P(1) = p4 P'(0) = (1 - t)(p4 - p2 ) P'(1) = (1 - t)(p5 - p3 ) 0 ≤ t ≤ 1 is the tension. November 21, 2018

Drawing Hermite Cubics How many points should we draw? Will the points be evenly distributed if we use a constant increment on t ? We actually draw Bezier cubics. November 21, 2018

General Bezier Curves November 21, 2018

Low Order Bezier Curves p0 n = 0 b0,0 (t) = 1 B(t) = p0 b0,0 (t) = p0 0 ≤ t ≤ 1 p0 n = 1 b0,1 (t) = 1 - t b1,1 (t) = t B(t) = (1 - t) p0 + t p1 0 ≤ t ≤ 1 p1 n = 2 b0,2 (t) = (1 - t)2 b1,2 (t) = 2t (1 - t) b2,2 (t) = t2 B(t) = (1 - t) 2 p0 + 2t (1 - t)p1 + t2 p2 0 ≤ t ≤ 1 p0 p2 p1 November 21, 2018

Bezier Curves r q Bezier Arch s p n = 3 b0,3 (t) = (1 - t)3 b1,3 (t) = 3t (1 - t)2 b2,3 (t) = 3t2(1 - t) b2,3 (t) = t3 B(t) = (1 - t) 3 p + 3t (1 - t)2q + 3t2(1 - t)r + t3s 0 ≤ t ≤ 1 November 21, 2018

Bezier Matrix B(t) = (1 - t) 3 p + 3t (1 - t)2q + 3t2(1 - t)r + t3s 0 ≤ t ≤ 1 B(t) = a t 3 + bt2 + ct + d 0 ≤ t ≤ 1 MB GB November 21, 2018

Geometry Vector November 21, 2018

Properties of Bezier Curves November 21, 2018

Geometry of Bezier Arches q B(t) s p Pick a t between 0 and 1 and go t of the way along each edge. Join the endpoints and do it again. November 21, 2018

Geometry of Bezier Arches qr qrs q rs pqr pqrs = B(1/2) pq s p We only use t = 1/2. November 21, 2018

drawArch(P, Q, R, S){ if (ArchSize(P, Q, R, S) <= .5 ) Dot(P); else{ PQ = (P + Q)/2; QR = (Q + R)/2; RS = (R + S)/2; PQR = (PQ + QR)/2; QRS = (QR + RS)/2; PQRS = (PQR + QRS)/2 drawArch(P, PQ, PQR, PQRS); drawArch(PQRS, QRS, RS, S); }

Putting it All Together Bezier Archer and Catmull-Rom Splines November 21, 2018