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

Slides:



Advertisements
Similar presentations
Lecture 14 Curves and Surfaces II
Advertisements

Splines IV – B-spline Curves
Interpolating curves.
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
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
Computer Animation Algorithms and Techniques
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.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Curves Mortenson Chapter 2-5 and Angel Chapter 9
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.
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Curve Modeling Bézier Curves
Bresenham’s Algorithm. Line Drawing Reference: Edward Angel’s book: –6 th Ed. Sections 6.8 and 6.9 Assuming: –Clipped (to fall within the window) –2D.
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.
V. Space Curves Types of curves Explicit Implicit Parametric.
Curves.
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.
Curves. First of all… You may ask yourselves “What did those papers have to do with computer graphics?” –Valid question Answer: I thought they were cool,
CO Games Development 1 Week 12 Interpolation, Path Smoothing & Splines
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Computer Graphics Representing Curves and Surfaces.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
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.
11/26/02(C) University of Wisconsin Last Time BSplines.
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 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
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.
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
© University of Wisconsin, CS559 Spring 2004
CS5500 Computer Graphics May 11, 2006
Curve & Surface.
Chapter 10-2: Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Interpolation and Basic Techniques
CSCE 441: Keyframe Animation/Smooth Curves (Cont.)
Introduction to Parametric Curve and Surface Modeling
Type to enter a caption. Computer Graphics Week 10 Lecture 1.
Presentation transcript:

Curves Jim Van Verth

Essential Math for Games Animation Problem: want to replay stored set of transformations  Generated by artist  Generated by motion capture Two main issues  Replaying position  Replaying orientation

Essential Math for Games Animation of Position Set of points representing position Three issues to handle  Frame rate higher than sample rate  Reduce number of samples to save memory  Blend between two animation sets

Essential Math for Games Animation of Position Idea: use set of points to define a function Can then sample points along that function to find new positions Two possibilities:  Interpolation (passes through points)  Approximation (passes near points)

Essential Math for Games Parametric Curve Function Q(t)  Maps parameter t to point on curve Q  Commonly broken into ( x(t), y(t), z(t) )  Called space curve  Derivative is tangent ( x'(t), y'(t), z'(t) )

Essential Math for Games Linear Interpolation Two points define a line Can generate new points between them

Essential Math for Games Do this using parameterization of line  Q(t) = P 0 + t (P 1 – P 0 ) = (1 – t) P 0 + t P 1 Parameter t controls position on line Curve only defined where t in [0,1] Linear Interpolation P0P0 P1P1

Essential Math for Games Multiple Points Can linearly interpolate from point to point (piecewise linear curve) Problem: get discontinuity at each point I.e. not smooth Demo

Essential Math for Games Continuity Continuous function has no ‘gaps’ C-continuity  Number indicates derivative continuity  I.e. C 1 means 1 st derivative continuous  Tangents equal at joins G-continuity  Tangents point in same direction

Essential Math for Games Hermite Curves One solution Idea: Cubic curve between each point Tangents at each point specify how curve should go Piecewise Hermite spline Demo

Essential Math for Games Hermite Curves For points P 0, P 1 and tangents P' 0, P' 1 function is: P0P0 P1P1 P'1P'1 P'0P'0

Essential Math for Games Hermite Curves At each sample, two tangents – in and out For smooth curve ( C 1 )  Make them equal Smooth curve but change in speed ( G 1 )  Same direction, different lengths For crease ( C 0 )  Different directions

Essential Math for Games Export from commercial tools  May have to tweak to guarantee results Export from homemade tools Clamped, natural, cyclic, acyclic splines  Maintain C 2 continuity  Solution to system of linear equations Computing Tangents

Essential Math for Games Catmull-Rom spline  Tangent half vector between neighboring points  Tangent undefined at end points Computing Tangents P i-1 PiPi P i+1

Essential Math for Games Bezier Curve Instead of two tangents, have two approximating control points  Curve doesn’t pass through control points  Their position controls shape of curve  Curve lies in convex hull

Essential Math for Games Bezier Curve For points P 0, P 1, P 2, P 3 function is: P0P0 P1P1 P2P2 P3P3

Essential Math for Games Bezier Curve Control points provide good user interface Align control points between curve segments for continuity

Essential Math for Games De Castlejau's method Fast Bezier subdivision Find percentage along each segment, then along resulting segments Result is control pts for two subcurves P0P0 P1P1 P2P2 P3P3

Essential Math for Games De Castlejau’s Method Useful for rendering  Subdivide until only “straight” subcurves  Straight if P 1 & P 2 are close to P 0 P 3 Useful for measuring length  Subdivide until ||P 0 P 1 || + ||P 1 P 2 || + ||P 2 P 3 || is close to ||P 0 P 3 ||  Add up all the sublengths

Essential Math for Games B-splines Generally curve approximates points, i.e. doesn’t pass through them Continuous through 2nd derivative Provides local control

Essential Math for Games NURBS Non-Uniform Rational B-Splines Non-uniform = curve segments have unequal spacing by parameter Rational = can apply weights to sample points (good for conic sections) Result: very useful, but not cheap Mostly used for parametric surfaces

Essential Math for Games References Parent, Rick, Computer Animation: Algorithms and Techniques, Morgan Kaufmann, Bartels, Beatty, Barsky, An Introduction to Splines for use in Computer Graphics & Geometric Modelling, Morgan Kaufmann, Rogers and Adams, Mathematical Elements for Computer Graphics, McGraw-Hill, Rogers, An Introduction to NURBS: With Historical Perspective, Morgan Kaufmann, 2000.