Computer graphics & visualization Key frame Interpolation.

Slides:



Advertisements
Similar presentations
Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
Advertisements

Parametric Curves Ref: 1, 2.
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Lecture 10 Curves and Surfaces I
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Cubic Curves CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
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
CS 445 / 645 Introduction to Computer Graphics Lecture 22 Hermite Splines Lecture 22 Hermite Splines.
08/30/00 Dinesh Manocha, COMP258 Hermite Curves A mathematical representation as a link between the algebraic & geometric form Defined by specifying the.
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.
Curves Chiew-Lan Tai.
Curves Chiew-Lan Tai. Curves 2 Reading Required Hearn & Baker, 8-8 – 8-10, 8-12 Foley, 11.2.
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
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.
Rotation and Orientation: Affine Combination Jehee Lee Seoul National University.
Splines III – Bézier Curves
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.
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.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
This Week Week Topic Week 1 Week 2 Week 3 Week 4 Week 5
Introduction to virtual engineering Óbuda University John von Neumann Faculty of Informatics Institute of Intelligent Engineering Systems Lecture 3. Description.
Numerical Computation
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Vector Computer Graphic. Vector entities Line Circle, Ellipse, arc,… Curves: Spline, Bezier’s curve, … … Areas Solids Models.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Interpolating Values.
Chapter VI Parametric Curves and Surfaces
INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.
Animation Dr. Amy Zhang Lecture 8. Reading 2  Hill, Chapters 5 / 7 / 10  Red Book, Chapter 3, “Viewing”  Red Book, Chapter 12, “Evaluators and NURBS”
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
Keyframing and Splines Jehee Lee Seoul National University.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
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.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
Animating with Quaternions
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.
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 12: Curves 1
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.
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
© University of Wisconsin, CS559 Spring 2004
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves
Curve & Surface.
Chapter 10-2: Curves.
UW Extension Certificate Program in Game Development 2nd quarter: Advanced Graphics Animation.
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Spline Curves COMP 575/COMP 770.
Chapter XVII Parametric Curves and Surfaces
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.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.)
Introduction to Parametric Curve and Surface Modeling
Rotation and Orientation: Affine Combination
Presentation transcript:

computer graphics & visualization Key frame Interpolation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Keyframe Animation Draw one keyframe after another  Results in “rough” animation instead of a smooth transition from frame to frame

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Keyframe Interpolation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Keyframe Interpolation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Keyframe Interpolation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Simple Translations Linear Interpolation is fine here But what about rotations?

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Linear Interpolation of Rotations K = (1-  ) A +  B (linear interpolation: lerp) Introduces non linear behavior on the arc

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group SLERP Approach by means of slerp = spherical linear interpolation with it follows A P B  

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Quaternion Power Operator [ cos(  /2), sin(  /2) * A]  [cos(  /2), sin(  /2) * A] q a rotates to q orientation as a goes from 0 to 1 = Quaternions:q = (q b q a -1 )  q a (slerp) q = slerp(q a,q b,  )

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Curves So far: smooth linear interpolation along a line (or along an arc on the circle) Now extend the idea so that interpolation follows a given path, a curve In the following: description of curves

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Consider the following: Data is sampled at discrete data points Want to know data values at an arbitrary position within the domain

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group The simple way From n+1 known data samples construct a n- dimensional polynomial n+1 Samples → n+1 knows n-dimensional polynomial has n+1 unknowns leads to system of n+1 linear equations

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group The simple way (cont.) system of equations can be rewritten as matrix Vandermonde Matrix

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Polynomial for approximation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group How to handle multiple x values? do not use a single approximation function but use n (=dimension of the domain) functions and a new parameter t from 0 to 1 x(t)=x, y(t)=y, z(t)=z … x y y(t) x(t)

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group multiple x-values (cont.) leads to multiple polynomials can be rewritten in matrix form

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Matrix notation C can be split up into M (basis matrix) G (geometry matrix) M is fixed for a given approach G depends on the specific curve to fit

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Building M derive a Matrix M for the Hermite approach Hermite uses polynomials of degree 3 to a fit 2 points it is an interpolation → 2 conditions derivatives at the endpoints are given → 2 conditions

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Hermite interpolation with

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Hermite interpolation (cont.)

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Hermite interpolation Cubic Hermite-Polynoms: Charles Hermite ( )

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Hermite interpolation Example:

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Hermite interpolation Properties: – Neither affine invariant with respect to control points nor with respect to vectors – No local control – Difficult to find tangent vectors – Curve segments can be attached continuously – Interpolation between points with tangents, e.g. for Keyframe-Animation with given position and velocity

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Monom interpolation Approach: Monom-Basis: {t i | i=0…n} From p(t i ) = a i the system of equations is derived: Vandermond Matrix Basis Control points 3 components per entry

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bézier-Curves Idea: tangent vectors defined by first and last two points: – b 0 and b n will be interpolated – b i will be approximated – Relation to Hermite-Interpolation: b0b0 b2b2 b1b1 b3b3 cubic Bézier-Curve Example: cubic Bezier-Curve

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bézier-Curves … and Hermite-Interpolation And for the curve: Geometry vector for Bézier Matrix for Bézier to Hermite with

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bézier-Curves The cubic Bézier-Curve: Bernstein-Polynoms of degree n: with domain [0,1] Bézier-Control-Points Bernstein-Polynoms with

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bézier-Curves Cubic Bernstein-Polynoms:

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bézier-Curves Of degree n = 1: linear interpolation Of degree n = 2: iterated linear interpolation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bézier-Curves Iterated linear interpolation for degree 2: Example for t = 0,4

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bezier Interpolation of Quaternions De Casteljau

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Spherical Linear Interpolation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group For u = 1/4 Repeated mid-point interpolation

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Spline-Curves Problem so far: polynom degree depends on number of control points Idea: – Multiple segments with low degree instead of one segment of high degree – Segments can be of arbitrary type: Hermite-Curves Quadrics Bézier-Curves – Important is smooth transition between segments

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Spline-Curves Spline: – A thin flexible rod used for the construction of ships – Deutsch: Straklatte, Strakfunktionen – A spline of n-th degree consists of polynomial segments of max degree n – A cubic Spline describes the shape of a thin rod that is fixed at start and end point

computer graphics & visualization Simulation and Animation – SS 07 Jens Krüger – Computer Graphics and Visualization Group Bézier-Splines Spline-Segments i: Spline s(u) ist sum of segments b i,3 = b i+1,0 uiui u i+1 b i,0 b i,1 b i,2 b i+1,1