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.

Slides:



Advertisements
Similar presentations
Lecture 14 Curves and Surfaces II
Advertisements

Lecture Notes #11 Curves and Surfaces II
Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
Lecture 10 Curves and Surfaces I
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
Jehee Lee Seoul National University
B-Spline Blending Functions
CS 445 / 645 Introduction to Computer Graphics Lecture 22 Hermite Splines Lecture 22 Hermite Splines.
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.
Curves Chiew-Lan Tai.
Curves Chiew-Lan Tai. Curves 2 Reading Required Hearn & Baker, 8-8 – 8-10, 8-12 Foley, 11.2.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Curves Week 12, Wed Apr.
Rational Bezier 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.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Cubic Bezier and B-Spline Curves
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.
COEN Computer Graphics I
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.
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
Cornell CS465 Fall 2004 Lecture 15© 2004 Steve Marschner 1 2D Spline Curves CS 465 Lecture 15.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
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.
Computer Graphics Representing Curves and Surfaces.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
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.
(c) 2002 University of Wisconsin
Slide 129 October 1999CS Computer Graphics (Top Changwatchai) Bézier Curves - Results of Derivation Tangents at endpoints are equal to endpoint slopes.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
1 CS 430/536 Computer Graphics I B-Splines and NURBS Week 5, Lecture 9 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing.
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
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.
© University of Wisconsin, CS559 Spring 2004
Representation of Curves & Surfaces
CS 445 / 645 Introduction to Computer Graphics
2D Spline Curves CS 465 Lecture 15 © 2004 Steve Marschner • 1.
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
CS 430/536 Computer Graphics I Intro to Curves Week 4, Lecture 7
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Spline Curves COMP 575/COMP 770.
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.
Introduction to Parametric Curve and Surface Modeling
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

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 x 11’’) –You can write on both sides of paper Not everything from semester will be on test –Class on Thursday will outline material and review

Wanted: Undergrad TAs Undergrads needed to TA and grade for CS courses –TA labs for CS101, CS201, CS216, etc. –Office hours, grading for all undergrad courses To apply, fill out form at: – Get to know CS professors (letters of reco) Good for you resume You folks play an important role in delivering high-quality CS courses at UVA

Teaching Evaluations Would you like this course to continue to be taught? We need feedback that students like this course and want it to be a permanent part of our course offerings Think about what you liked in the course –And what you didn’t like And fill out a survey

Today One more type of curve to look at –B-splines Some leftover slides about films Some slides about animation

Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points that lie on the curve Interpolating Splines –Curves that pass through the control points (knots) Approximating Splines –Control points merely influence shape

Parametric Cubic Splines Can represent this as a matrix too

Hermite Cubic Splines An example of knot and continuity constraints

Resulting Hermite Spline Equation

Demonstration Hermite

Blending Functions By multiplying first two components, you have four functions of ‘t’ that blend the four control parameters

Hermite Blending Functions If you plot the blending functions on the parameter ‘t’

Bézier Curves Similar to Hermite, but more intuitive definition of endpoint derivatives Four control points, two of which are knots

Bézier Curves Similar to Hermite, but more intuitive definition of endpoint derivatives Four control points, two of which are knots

Bézier Curves The derivative values of the Bezier Curve at the knots are dependent on the adjacent points The scalar 3 was selected just for this curve

Bézier Basis and Geometry Matrices Matrix Form But why is M Bezier a good basis matrix?

Bézier Blending Functions Look at the blending functions This family of polynomials is called order-3 Bernstein Polynomials –They are all positive in interval [0,1] –Their sum is equal to 1

Bézier Blending Functions Thus, every point on curve is linear combination of the control points The weights of the combination are all positive The sum of the weights is 1 Therefore, the curve is a convex combination of the control points

Bézier Curves Bezier

Splines - History Draftsman use ‘ducks’ and strips of wood (splines) to draw curves Wood splines have second-order continuity And pass through the control points A Duck (weight) Ducks trace out curve

Why more spline lectures? Bezier and Hermite splines have global influence –Moving one control point affects the entire curve B-splines consist of curve segments whose polynomial coefficients depend on just a few control points –Local control

Uniform B-Splines Approximating Splines Approximates m+1 control points – P 0, P 1, …, P m, m ¸ 3 Curve consists of m –2 cubic polynomial segments –Q 3, Q 4, … Q m t varies along B-spline as Q i : t i <= t < t i+1 t i (i = integer) are knot points that join segment Q i-1 to Q i Curve is uniform because knots are spaced at equal intervals of parameter, t

Uniform B-Splines First curve segment, Q 3, is defined by first four control points Last curve segment, Q m, is defined by last four control points, P m-3, P m-2, P m-1, P m Each control point affects four curve segments

B-spline Basis Matrix Formulate 16 equations to solve the 16 unknowns The 16 equations enforce the C 0, C 1, and C 2 continuity between adjoining segments, Q

B-Spline Points along B-Spline are computed just as with Bezier Curves

B-Spline By far the most popular spline used C 0, C 1, and C 2 continuous

B-Spline Locality of points

Nonuniform, Rational B-Splines (NURBS) The native geometry element in Maya Models are composed of surfaces defined by NURBS, not polygons NURBS are smooth NURBS require effort to make non-smooth

What is a NURB? Nonuniform: The amount of parameter, t, that is used to model each curve segment varies Rational: The parametric functions that define each curve segment are ratios of polynomals:

What do we get? Nonuniformity permits either C 2, C 1, or C 0 continuity at join points between curve segments Nonuniformity permits control points to be added to middle of curve Rational curves are invariant under rotation, scaling, translation, and perspective transformations of the control points (nonrational curves are not preserved under perspective projection) –This means you can transform the control points and redraw the curve using the transformed points –If this weren’t true you’d have to sample curve to many points and transform each point individually

What do we get? NURBS represent conics

Converting Between Splines Consider two spline basis formulations for two spline types

Converting Between Splines We can transform the control points from one spline basis to another

Converting Between Splines With this conversion, we can convert a B- Spline into a Bezier Spline Bezier Splines are easy to render

Rendering Splines Horner’s Method Incremental (Forward Difference) Method Subdivision Methods

Horner’s Method Three multiplications Three additions

Forward Difference But this still is expensive to compute

Forward Difference So, at startup compute these things Successive values of x requires 3 additions

Subdivision Methods Bezier

Rendering Bezier Spline public void spline(ControlPoint p0, ControlPoint p1, ControlPoint p2, ControlPoint p3, int pix) { float len = ControlPoint.dist(p0,p1) + ControlPoint.dist(p1,p2) + ControlPoint.dist(p2,p3); float chord = ControlPoint.dist(p0,p3); if (Math.abs(len - chord) < 0.25f) return; fatPixel(pix, p0.x, p0.y); ControlPoint p11 = ControlPoint.midpoint(p0, p1); ControlPoint tmp = ControlPoint.midpoint(p1, p2); ControlPoint p12 = ControlPoint.midpoint(p11, tmp); ControlPoint p22 = ControlPoint.midpoint(p2, p3); ControlPoint p21 = ControlPoint.midpoint(p22, tmp); ControlPoint p20 = ControlPoint.midpoint(p12, p21); spline(p20, p12, p11, p0, pix); spline(p3, p22, p21, p20, pix); }