1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.

Slides:



Advertisements
Similar presentations
SI23 Introduction to Computer Graphics
Advertisements

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
Lecture 10 Curves and Surfaces I
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
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.
Jehee Lee Seoul National University
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.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
Splines II – Interpolating Curves
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
09/04/02 Dinesh Manocha, COMP258 Bezier Curves Interpolating curve Polynomial or rational parametrization using Bernstein basis functions Use of control.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 12: Spline Curves (review) Ravi Ramamoorthi Most material.
CS CS 175 – Week 8 Bézier Curves Definition, Algorithms.
1 Dr. Scott Schaefer Curves and Interpolation. 2/61 Smooth Curves How do we create smooth curves?
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.
09/09/02 Dinesh Manocha, COMP258 Properties of Bezier Curves Invariance under affine parameter transformation P i B i,n (u) = P i B i,n ((u –a)/(b-a))
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
1 Dr. Scott Schaefer Tensor-Product Surfaces. 2/64 Smooth Surfaces Lagrange Surfaces  Interpolating sets of curves Bezier Surfaces B-spline Surfaces.
Cubic Bezier and B-Spline Curves
Curves Mortenson Chapter 2-5 and Angel Chapter 9
1 Dr. Scott Schaefer Catmull-Rom Splines: Combining B-splines and Interpolation.
Modelling: Curves Week 11, Wed Mar 23
Bspline Notes Jordan Smith UC Berkeley CS184. Outline Bézier Basis Polynomials –Linear –Quadratic –Cubic Uniform Bspline Basis Polynomials –Linear –Quadratic.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
COEN Computer Graphics I
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Splines III – Bézier Curves
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.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
(Spline, Bezier, B-Spline)
V. Space Curves Types of curves Explicit Implicit Parametric.
1 Dr. Scott Schaefer Blossoming and B-splines. 2/105 Blossoms/Polar Forms A blossom b(t 1,t 2,…,t n ) of a polynomial p(t) is a multivariate function.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric Curves.
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.
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.
Rendering Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel:
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
Computer Graphics (Fall 2003) COMS 4160, Lecture 10: Curves 1 Ravi Ramamoorthi
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
(c) 2002 University of Wisconsin
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
CS559 – Curves Lecture These are course notes (not used as slides) Written by Mike Gleicher, Oct Updates Oct 2006, 2007 Updates Oct 2008 © 2005 Michael.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 12: Curves 1
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.
Smooth Surfaces Dr. Scott Schaefer.
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
Parametric Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
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.
Parametric Line equations
UNIT-5 Curves and Surfaces.
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

1 Dr. Scott Schaefer Smooth Curves

2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline curves

3/109 Smooth Curves How do we create smooth curves?

4/109 Smooth Curves How do we create smooth curves? Parametric curves with polynomials

5/109 Smooth Curves Controlling the shape of the curve

6/109 Smooth Curves Controlling the shape of the curve

7/109 Smooth Curves Controlling the shape of the curve

8/109 Smooth Curves Controlling the shape of the curve

9/109 Smooth Curves Controlling the shape of the curve

10/109 Smooth Curves Controlling the shape of the curve

11/109 Smooth Curves Controlling the shape of the curve

12/109 Smooth Curves Controlling the shape of the curve

13/109 Smooth Curves Controlling the shape of the curve

14/109 Smooth Curves Controlling the shape of the curve Power-basis coefficients not intuitive for controlling shape of curve!!!

15/109 Interpolation Find a polynomial that passes through specified values

16/109 Interpolation Find a polynomial that passes through specified values

17/109 Interpolation Find a polynomial that passes through specified values

18/109 Interpolation Find a polynomial that passes through specified values

19/109 Interpolation Find a polynomial that passes through specified values Intuitive control of curve using “control points”!!!

20/109 Interpolation Perform interpolation for each component separately Combine result to obtain parametric curve

21/109 Interpolation Perform interpolation for each component separately Combine result to obtain parametric curve

22/109 Interpolation Perform interpolation for each component separately Combine result to obtain parametric curve

23/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

24/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

25/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

26/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

27/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

28/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

29/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

30/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

31/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

32/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

33/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

34/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

35/109 Lagrange Interpolation Identical to matrix method but uses a geometric construction

36/109 Uniform Lagrange Interpolation Base Case  Linear interpolation between two points Inductive Step  Assume we have points y i, …, y n+1+i  Build interpolating polynomials f(t), g(t) of degree n for y i, …, y n+i and y i+1, …, y n+1+i   h(t) interpolates all points y i, …, y n+1+i and is of degree n+1  Moreover, h(t) is unique

37/109 Lagrange Evaluation Pseudocode Lagrange(pts, i, t) n = length(pts)-2 if n is 0 return pts[0](i+1-t)+pts[1](t-i) f=Lagrange(pts without last element, i, t) g=Lagrange(pts without first element, i+1, t) return ((n+1+i-t)f+(t-i)g)/(n+1)

38/109 Problems with Interpolation

39/109 Problems with Interpolation

40/109 Bezier Curves Polynomial curves that seek to approximate rather than to interpolate

41/109 Bernstein Polynomials Degree 1: (1-t), t Degree 2: (1-t) 2, 2(1-t)t, t 2 Degree 3: (1-t) 3, 3(1-t) 2 t, 3(1-t)t 2, t 3

42/109 Bernstein Polynomials Degree 1: (1-t), t Degree 2: (1-t) 2, 2(1-t)t, t 2 Degree 3: (1-t) 3, 3(1-t) 2 t, 3(1-t)t 2, t 3 Degree 4: (1-t) 4, 4(1-t) 3 t, 6(1-t) 2 t 2, 4(1-t)t 3,t 4

43/109 Bernstein Polynomials Degree 1: (1-t), t Degree 2: (1-t) 2, 2(1-t)t, t 2 Degree 3: (1-t) 3, 3(1-t) 2 t, 3(1-t)t 2, t 3 Degree 4: (1-t) 4, 4(1-t) 3 t, 6(1-t) 2 t 2, 4(1-t)t 3,t 4 Degree 5: (1-t) 5, 5(1-t) 4 t, 10(1-t) 3 t 2, 10(1-t) 2 t 3,5(1-t)t 4,t 5 … Degree n: for

44/109 Bezier Curves

45/109 Bezier Curves

46/109 Bezier Curves

47/109 Bezier Curve Properties Interpolate end-points

48/109 Bezier Curve Properties Interpolate end-points

49/109 Bezier Curve Properties Interpolate end-points

50/109 Bezier Curve Properties Interpolate end-points

51/109 Bezier Curve Properties Interpolate end-points Tangent at end-points in direction of first/last edge

52/109 Bezier Curve Properties Interpolate end-points Tangent at end-points in direction of first/last edge

53/109 Bezier Curve Properties Interpolate end-points Tangent at end-points in direction of first/last edge

54/109 Bezier Curve Properties Interpolate end-points Tangent at end-points in direction of first/last edge Curve lies within the convex hull of the control points

55/109 Convex Hull The smallest convex set containing all points p i

56/109 Convex Hull The smallest convex set containing all points p i

57/109 Bezier Curve Properties Interpolate end-points Tangent at end-points in direction of first/last edge Curve lies within the convex hull of the control points Bezier Lagrange

58/109 Pyramid Algorithms for Bezier Curves Polynomials aren’t pretty Is there an easier way to evaluate the equation of a Bezier curve?

59/109 Pyramid Algorithms for Bezier Curves

60/109 Pyramid Algorithms for Bezier Curves

61/109 Pyramid Algorithms for Bezier Curves

62/109 Bezier Evaluation Pseudocode Bezier(pts, t) if ( length(pts) is 1) return pts[0] newPts={} For ( i = 0, i < length(pts) – 1, i++ ) Add to newPts (1-t)pts[i] + t pts[i+1] return Bezier ( newPts, t )

63/109 Subdividing Bezier Curves Given a single Bezier curve, construct two smaller Bezier curves whose union is exactly the original curve

64/109 Subdividing Bezier Curves Given a single Bezier curve, construct two smaller Bezier curves whose union is exactly the original curve

65/109 Subdividing Bezier Curves Given a single Bezier curve, construct two smaller Bezier curves whose union is exactly the original curve

66/109 Subdividing Bezier Curves Given a single Bezier curve, construct two smaller Bezier curves whose union is exactly the original curve

67/109 Subdividing Bezier Curves Given a single Bezier curve, construct two smaller Bezier curves whose union is exactly the original curve

68/109 Subdividing Bezier Curves Control points for left curve!!!

69/109 Subdividing Bezier Curves Control points for right curve!!!

70/109 Subdividing Bezier Curves

71/109 Adaptive Rendering of Bezier Curves If control polygon is close to a line, draw the control polygon If not, subdivide and recur on subdivided pieces

72/109 Adaptive Rendering of Bezier Curves If control polygon is close to a line, draw the control polygon If not, subdivide and recur on subdivided pieces

73/109 Adaptive Rendering of Bezier Curves If control polygon is close to a line, draw the control polygon If not, subdivide and recur on subdivided pieces

74/109 Adaptive Rendering of Bezier Curves If control polygon is close to a line, draw the control polygon If not, subdivide and recur on subdivided pieces

75/109 Adaptive Rendering of Bezier Curves If control polygon is close to a line, draw the control polygon If not, subdivide and recur on subdivided pieces

76/109 Adaptive Rendering of Bezier Curves If control polygon is close to a line, draw the control polygon If not, subdivide and recur on subdivided pieces

77/109 Applications: Intersection Given two Bezier curves, determine if and where they intersect

78/109 Applications: Intersection Check if convex hulls intersect If not, return no intersection If both convex hulls can be approximated with a straight line, intersect lines and return intersection Otherwise subdivide and recur on subdivided pieces

79/109 Applications: Intersection

80/109 Applications: Intersection

81/109 Applications: Intersection

82/109 Applications: Intersection

83/109 Applications: Intersection

84/109 Applications: Intersection

85/109 Applications: Intersection

86/109 Applications: Intersection

87/109 Applications: Intersection

88/109 Applications: Intersection

89/109 Applications: Intersection

90/109 Application: Font Rendering

91/109 Application: Font Rendering

92/109 Problems with Bezier Curves More control points means higher degree Moving one control point affects the entire curve

93/109 Problems with Bezier Curves More control points means higher degree Moving one control point affects the entire curve

94/109 B-spline Curves Not a single polynomial, but lots of polynomials that meet together smoothly Local control

95/109 B-spline Curves Not a single polynomial, but lots of polynomials that meet together smoothly Local control

96/109 Rendering B-spline Curves Lane-Reisenfeld subdivision algorithm Linearly subdivide the curve by inserting the midpoint on each edge Perform averaging by replacing each edge by its midpoint d times Subdivide the curve repeatedly

97/109 Rendering B-spline Curves

98/109 Rendering B-spline Curves

99/109 Rendering B-spline Curves

100/109 Rendering B-spline Curves

101/109 Rendering B-spline Curves

102/109 Rendering B-spline Curves

103/109 Rendering B-spline Curves

104/109 Rendering B-spline Curves

105/109 Rendering B-spline Curves

106/109 B-spline Properties Curve lies within convex hull of control points Variation Diminishing: Curve wiggles no more than control polygon Influence of one control point is bounded Degree of curve increases by one with each averaging step Smoothness increases by one with each averaging step

107/109 B-spline Curve Example

108/109 B-spline Curve Example

109/109 B-spline Curve Example