CS 430/536 Computer Graphics I Intro to Curves Week 4, Lecture 7

Slides:



Advertisements
Similar presentations
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Advertisements

Lecture 10 Curves and Surfaces I
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
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
Dr. S.M. Malaek Assistant: M. Younesi
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.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
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.
Curves Locus of a point moving with one degree of freedom
1. 2 The use of curved surfaces allows for a higher level of modeling, especially for the construction of highly realistic models. There are several approaches.
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.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
COEN Computer Graphics I
Chapter 10: Curves and Surfaces Part 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
Parts of Mortenson Chapter 6-9,
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Computer Graphics Lecture 13 Curves and Surfaces I.
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.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
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.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
1 CS 430/536 Computer Graphics I Curve Drawing Algorithms Week 4, Lecture 8 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing.
Curves and Surfaces Chapter 10. CS 480/680 2Chapter 9 -- Hierarchical Models Introduction: Introduction: Until now we have worked with flat entities such.
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.
Keyframing and Splines Jehee Lee Seoul National University.
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.
1 CS 430/585 Computer Graphics I 3D Modeling: Subdivision Surfaces & Solid Modeling Week 9, Lecture 17 David Breen, William Regli and Maxim Peysakhov Geometric.
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.
11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
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.
CS552: Computer Graphics Lecture 19: Bezier Curves.
Piecewise Polynomial Parametric Curves Sun-Jeong Kim.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Introduction to Parametric Curve and Surface Modeling.
© University of Wisconsin, CS559 Spring 2004
Computer Graphics Lecture 38
CS5500 Computer Graphics May 11, 2006
Curve & Surface.
Representation of Curves & Surfaces
CS 445 / 645 Introduction to Computer Graphics
Parametric Curves cgvr.korea.ac.kr.
Chapter 10-2: Curves.
Parametric Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
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.
UNIT-5 Curves and Surfaces.
Three-Dimensional Object Representation
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

CS 430/536 Computer Graphics I Intro to Curves Week 4, Lecture 7 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.drexel.edu

Outline Introduction to 2D curves Functional representations Parametric cubic curves Introduction to Bézier curves Continuity

Example Application: Font Design and Display Curved objects are everywhere There is always need for: mathematical fidelity high precision artistic freedom and flexibility physical realism Pics/Math courtesy of G. Farin @ ASU

Example Application: Graphic Design and Arts Courtesy of http://www.pilot3d.com

Example Application: Tool Path Generation Pics/Math courtesy of G. Farin @ ASU via M. Wagner @ ASU

Example Application: Motion Planning

Functional Representations Explicit Functions: representing one variable with another fine if only one x value for each y value Problem: what if I have a sphere? Multiple values …. (not used in graphics) Pics/Math courtesy of Dave Mount @ UMD-CP

Functional Representations Implicit Functions: curves/surfaces represented as “the zeros” good for rep. of (n-1)D objects in nD space Sphere example: What class of function? polynomial: linear combo of integer powers of x,y,z algebraic curves & surfaces: rep’d by implicit polynomial functions polynomial degree: total sum of powers, i.e. polynomial of degree 6: Pics/Math courtesy of Dave Mount @ UMD-CP

Functional Representations Parametric Functions: 2D/3D curve: two functions of one parameter (x(u), y(u)) (x(u), y(u), z(u)) 3D surface: three functions of two parameters (x(u,v), y(u,v), z(u,v)) Example: Sphere Note: rep. not algebraic, but is parametric

Functional Representations Which is best?? It depends on the application Implicit is good for computing ray/surface intersection point inclusion (inside/outside test) mass & volume properties Parametric is good for subdivision, faceting for rendering Surface & area properties popular in graphics

Issues in Specifying/Designing Curves/Surfaces Note: the internal mathematical representation can be very complex high degree polynomials hard to see how parameters relate to shape How do we deal with this complexity? Use curve control points and either Interpolate Approximate

Points to Curves The Lagrangian interpolating polynomial n+1 points, the unique polynomial of degree n curve wiggles thru each control point Issue: not good if you want smooth or flat curves Approximation of control points points are weights that tug on the curve or surface Pics/Math courtesy of Dave Mount @ UMD-CP

Warning, Warning, Warning: Pending Notation Abuse t and u are used interchangeably as a parameterization variable for functions Why? t historically is “time”, certain parametric functions can describe “change over time” (e.g. motion of a camera, physics models) u comes from the 3D world, i.e. where two variables describe a B-spline surface u and v are the variables for defining a surface Choice of t or u depends on the text/reference

Parametric Curves General rep: Properties: individual functions are single-valued approximations are done with piecewise polynomial curves Each segment is given by three cubic polynomials (x,y,z) in parameter t Concise representation 1994 Foley/VanDam/Finer/Huges/Phillips ICG

Cubic Parametric Curves Balance between Complexity Control Wiggles Amount of computation Non-planar

Parametric Curves Cubic Polynomials that define a parametric curve segment are of the form Notice we restrict the parameter t to be

Parametric Curves If coefficients are represented as a matrix and then: 1994 Foley/VanDam/Finer/Huges/Phillips ICG

Parametric Curves Expanding gives: Q(t) can be defined with four constraints Rewrite the coefficient matrix C as where M is a 4x4 basis matrix, and G is a four-element constraint matrix (geometry matrix) Expanding gives: Q(t) is a weighted sum of the columns of the geometry matrix, each of which represents a point or vector in 3-space 1994 Foley/VanDam/Finer/Huges/Phillips ICG

Parametric Curves Multiplying out Q(t) = Gx·M·T gives (i.e. just weighted sums of the elements) The weights are cubic polynomials in t (called the blending functions, B=MT), Q(t) = Gx · B M and G matrices vary by curve Hermite, Bézier, spline, etc.

Some Types of Curves Hermite Bézier Splines def’d by two end points and two tangent vectors Bézier two end points plus two control points for the tangent vectors Splines Basis Splines def’d w/ 4 control points Uniform, nonrational B-splines Nonuniform, nonrational B-splines Nonuniform, rational B-splines (NURBS)

Convex Hulls The smallest convex container of a set of points Both practically and theoretically useful in a number of applications Pics/Math courtesy of G. Farin @ ASU

Bézier Curves Pierre Bézier @ Rénault ~1960 Basic idea four points Start point P0 End point P3 Tangent at P0, P0 P1 Tangent at P3, P2 P3 Pics/Math courtesy of G. Farin @ ASU

Bézier Curves An Example: Geometry matrix is where Pi are control points for the curve Basis Matrix is convex hull 1994 Foley/VanDam/Finer/Huges/Phillips ICG

Bézier Curves The general representation of a Bézier curve is where GB - Bézier Geometry Matrix MB - Bézier Basis Matrix which is (multiplying out): convex hull 1994 Foley/VanDam/Finer/Huges/Phillips ICG

Bernstein Polynomials (1911) The general form for the i-th Bernstein polynomial for a degree k Bézier curve is Some properties of BPs Invariant under transformations Form a partition of unity, i.e. summing to 1 Low degree BPs can be written as high degree BPs BP derivatives are linear combo of BPs Form a basis for space of polynomials w/ deg≤k

Bernstein Polynomials For those that forget combinatorics Note: k does not have to be 3!

Joining Bézier Segments: The Bernstein Polynomials Cubic Bernstein blending functions Observe: the coefficients are just rows in Pascal’s triangle Pics/Math courtesy of Dave Mount @ UMD-CP

Joining Bézier Segments: The Bernstein Polynomials Observe The Four Bernstein polynomials also defined by These represent the blending proportions among the control points Pics/Math courtesy of Dave Mount @ UMD-CP

Joining Bézier Segments: The Bernstein Polynomials The four cubic Bernstein polynomials Observe: at t=0, only BB1 is >0 curve interpolates P1 at t=1, only BB4 is >0 curve interpolates P4 Pics/Math courtesy of Dave Mount @ UMD-CP

General Form of Bezier Curve

Properties of Bézier Curves Affine invariance Invariance under affine parameter transformations Convex hull property curve lies completely within original control polygon Endpoint interpolation Intuitive for design curve mimics the control polygon Pics/Math courtesy of G. Farin @ ASU

Issues with Bézier Curves Creating complex curves may (with lots of wiggles) requires many control points potentially a very high-degree polynomial Bézier blending functions have global support over the whole curve move just one point, change whole curve Improved Idea: link (C1) lots of low degree (cubic) Bézier curves end-to-end

Continuity Two types: Geometric Continuity, Gi: endpoints meet tangent vectors’ directions are equal Parametric Continuity, Ci: tangent vectors’ magnitudes are equal In general: C implies G but not vice versa

Parametric Continuity Continuity (recall from the calculus): Two curves are Ci continuous at a point p iff the i-th derivatives of the curves are equal at p Pics/Math courtesy of Dave Mount @ UMD-CP

Continuity What are the conditions for C0 and C1 continuity at the joint of curves xl and xr? tangent vectors at end points equal end points equal xl xr 1994 Foley/VanDam/Finer/Huges/Phillips ICG

Continuity The derivative of is the parametric tangent vector of the curve: 1994 Foley/VanDam/Finer/Huges/Phillips ICG

Continuity In 3D, compute this for each component of the parametric function For the x component: Similar for the y and z components. xl xr 1994 Foley/VanDam/Finer/Huges/Phillips ICG