Cubic Curves CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.

Slides:



Advertisements
Similar presentations
Curves Jim Van Verth Essential Math for Games Animation Problem: want to replay stored set of transformations  Generated by.
Advertisements

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
Parametric Curves Ref: 1, 2.
#8: Curves and Curved Surfaces CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006.
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
09/25/02 Dinesh Manocha, COMP258 Triangular Bezier Patches Natural generalization to Bezier curves Triangles are a simplex: Any polygon can be decomposed.
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
Outline for today Inverses of Transforms Curves overview Bézier curves.
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
Splines II – Interpolating Curves
Computer graphics & visualization Key frame Interpolation.
Curves Chiew-Lan Tai. Curves 2 Reading Required Hearn & Baker, 8-8 – 8-10, 8-12 Foley, 11.2.
Lecture 4: interpolation, channels.  Linear:  Quadratic:  Cubic:
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
09/04/02 Dinesh Manocha, COMP258 Bezier Curves Interpolating curve Polynomial or rational parametrization using Bernstein basis functions Use of control.
1 Dr. Scott Schaefer The Bernstein Basis and Bezier Curves.
Designing Parametric Cubic Curves Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Cubic Bezier and B-Spline Curves
Channels & Keyframes CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004.
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.
Designing Parametric Cubic Curves
Splines III – Bézier Curves
Curve Modeling Bézier Curves
Curves and Surfaces CSE3AGR - Paul Taylor Polynomials of Degree n Degree is equal to the highest exponent of a term. Higher exponents result in.
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.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005
Numerical Computation
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
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
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric Curves.
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.
11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
(c) 2002 University of Wisconsin
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
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.
Introduction to Parametric Curve and Surface Modeling.
Computer Graphics Lecture 38
Computer Graphics Lecture 37
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
Parametric Curves.
© University of Wisconsin, CS559 Spring 2004
Chapter XVII Parametric Curves and Surfaces
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.
UNIT-5 Curves and Surfaces.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.)
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

Cubic Curves CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005

Polynomial Functions Linear: Quadratic: Cubic:

Vector Polynomials (Curves) Linear: Quadratic: Cubic: We usually define the curve for 0 ≤ t ≤ 1

Bezier Curves Bezier curves can be thought of as a higher order extension of linear interpolation p0p0 p1p1 p0p0 p1p1 p2p2 p0p0 p1p1 p2p2 p3p3

Bezier Curve Formulation There are lots of ways to formulate Bezier curves mathematically. Some of these include: de Castlejau (recursive linear interpolations) Bernstein polynomials (functions that define the influence of each control point as a function of t) Cubic equations (general cubic equation of t) Matrix form We will briefly examine ALL of these! In practice, matrix form is the most useful in computer animation, but the others are important for understanding

Bezier Curve p0p0 p1p1 p2p2 p3p3 Find the point x on the curve as a function of parameter t: x(t)

de Casteljau Algorithm The de Casteljau algorithm describes the curve as a recursive series of linear interpolations This form is useful for providing an intuitive understanding of the geometry involved, but it is not the most efficient form

de Casteljau Algorithm p0p0 q0q0 p1p1 p2p2 p3p3 q2q2 q1q1

q0q0 q2q2 q1q1 r1r1 r0r0

r1r1 x r0r0

Bezier Curve x p0p0 p1p1 p2p2 p3p3

Recursive Linear Interpolation

Expanding the Lerps

Bernstein Polynomial Form

Cubic Bernstein Polynomials

Bernstein Polynomials B33B33 B03B03 B13B13 B23B23

Bernstein polynomial form of a Bezier curve:

Bernstein Polynomials We start with the de Casteljau algorithm, expand out the math, and group it into polynomial functions of t multiplied by points in the control mesh The generalization of this gives us the Bernstein form of the Bezier curve This gives us further understanding of what is happening in the curve: We can see the influence of each point in the control mesh as a function of t We see that the basis functions add up to 1, indicating that the Bezier curve is a convex average of the control points

Cubic Equation Form

If we regroup the equation by terms of exponents of t, we get it in the standard cubic form This form is very good for fast evaluation, as all of the constant terms (a,b,c,d) can been precomputed The cubic equation form obscures the input geometry, but there is a one-to-one mapping between the two and so the geometry can always be extracted out of the cubic coefficients

Cubic Matrix Form

Matrix Form

We can rewrite the equations in matrix form This gives us a compact notation and shows how different forms of cubic curves can be related It also is a very efficient form as it can take advantage of existing 4x4 matrix hardware support…

Derivatives Finding the derivative (tangent) of a curve is easy:

Hermite Form Let’s look at an alternative way to describe a cubic curve Instead of defining it with the 4 control points as a Bezier curve, we will define it with a position and a tangent (velocity) at both the start and end of the curve (p 0, p 1, v 0, v 1 )

Hermite Curve v1v1 p1p1 p0p0 v0v0

Hermite Curves We want the value of the curve at t=0 to be x(0)=p 0, and at t=1, we want x(1)=p 1 We want the derivative of the curve at t=0 to be v 0, and v 1 at t=1

Hermite Curves

Matrix Form of Hermite Curve

Hermite Curves The Hermite curve is another geometric way of defining a cubic curve We see that ultimately, it is another way of generating cubic coefficients We can also see that we can convert a Bezier form to a Hermite form with the following relationship: