04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.

Slides:



Advertisements
Similar presentations
Lecture Notes #11 Curves and Surfaces II
Advertisements

© University of Wisconsin, CS559 Spring 2004
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Lecture 10 Curves and Surfaces I
Geometric Modeling Notes on Curve and Surface Continuity Parts of Mortenson, Farin, Angel, Hill and others.
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
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
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.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Curves Week 12, Wed Apr.
Cornell CS465 Fall 2004 Lecture 16© 2004 Steve Marschner 1 Curved surfaces CS 465 Lecture 16.
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
1 Dr. Scott Schaefer The Bernstein Basis and Bezier Curves.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Cubic Bezier and B-Spline Curves
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
Splines III – Bézier Curves
Computer Graphics Lecture 13 Curves and Surfaces I.
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
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.
19/13/ :20 UML Graphics II Parametric Curves and Surfaces Session 3.
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.
V. Space Curves Types of curves Explicit Implicit Parametric.
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
1 Dr. Scott Schaefer Coons Patches and Gregory Patches.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
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.
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.
Rendering Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel:
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
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
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.
Piecewise Polynomial Parametric Curves Sun-Jeong Kim.
Introduction to Parametric Curve and Surface Modeling.
© University of Wisconsin, CS559 Spring 2004
Introduction to Parametric Curve and Surface Modeling
Curve & Surface.
Representation of Curves & Surfaces
Advanced Computer Graphics: Parametric Curves and Surfaces
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
Rendering Curves and Surfaces
© University of Wisconsin, CS559 Spring 2004
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.
Coons Patches and Gregory Patches
Three-Dimensional Object Representation
Introduction to Parametric Curve and Surface Modeling
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves

04/18/02(c) 2002 University of Wisconsin Today Bezier Continuity Bezier surface patches

04/18/02(c) 2002 University of Wisconsin Longer Curves A single cubic Bezier or Hermite curve can only capture a small class of curves –At most 2 inflection points One solution is to raise the degree –Allows more control, at the expense of more control points and higher degree polynomials –Control is not local, one control point influences entire curve Alternate, most common solution is to join pieces of cubic curve together into piecewise cubic curves –Total curve can be broken into pieces, each of which is cubic –Local control: Each control point only influences a limited part of the curve –Interaction and design is much easier

04/18/02(c) 2002 University of Wisconsin Piecewise Bezier Curve “knot” P 0,0 P 0,1 P 0,2 P 0,3 P 1,0 P 1,1 P 1,2 P 1,3

04/18/02(c) 2002 University of Wisconsin Continuity When two curves are joined, we typically want some degree of continuity across the boundary (the knot) –C 0, “C-zero”, point-wise continuous, curves share the same point where they join –C 1, “C-one”, continuous derivatives, curves share the same parametric derivatives where they join –C 2, “C-two”, continuous second derivatives, curves share the same parametric second derivatives where they join –Higher orders possible Question: How do we ensure that two Hermite curves are C 1 across a knot? Question: How do we ensure that two Bezier curves are C 0, or C 1, or C 2 across a knot?

04/18/02(c) 2002 University of Wisconsin Achieving Continuity For Hermite curves, the user specifies the derivatives, so C 1 is achieved simply by sharing points and derivatives across the knot For Bezier curves: –They interpolate their endpoints, so C 0 is achieved by sharing control points –The parametric derivative is a constant multiple of the vector joining the first/last 2 control points –So C 1 is achieved by setting P 0,3 =P 1,0 =J, and making P 0,2 and J and P 1,1 collinear, with J-P 0,2 =P 1,1 -J –C 2 comes from further constraints on P 0,1 and P 1,2

04/18/02(c) 2002 University of Wisconsin Bezier Continuity P 0,0 P 0,1 P 0,2 J P 1,1 P 1,2 P 1,3 Disclaimer: PowerPoint curves are not Bezier curves, they are interpolating piecewise quadratic curves! This diagram is an approximation.

04/18/02(c) 2002 University of Wisconsin DOF and Locality The number of degrees of freedom (DOF) can be thought of as the number of things a user gets to specify –If we have n piecewise Bezier curves joined with C 0 continuity, how many DOF does the user have? –If we have n piecewise Bezier curves joined with C 1 continuity, how many DOF does the user have? Locality refers to the number of curve segments affected by a change in a control point –Local change affects fewer segments –How many segments of a piecewise cubic Bezier curve are affected by each control point if the curve has C 1 continuity? –What about C 2 ?

04/18/02(c) 2002 University of Wisconsin Geometric Continuity Derivative continuity is important for animation –If an object moves along the curve with constant parametric speed, there should be no sudden jump at the knots For other applications, tangent continuity might be enough –Requires that the tangents point in the same direction –Referred to as G 1 geometric continuity –Curves could be made C 1 with a re-parameterization –The geometric version of C 2 is G 2, based on curves having the same radius of curvature across the knot What is the tangent continuity constraint for a Bezier curve?

04/18/02(c) 2002 University of Wisconsin Bezier Geometric Continuity P 0,0 P 0,1 P 0,2 J P 1,1 P 1,2 P 1,3

04/18/02(c) 2002 University of Wisconsin 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 P 0,1 x(s,0) x(s,1)

04/18/02(c) 2002 University of Wisconsin Tensor Product Surface Patches Defined over a rectangular domain –Valid parameter values come from within a rectangular region in parameter space: 0  s<1, 0  t<1 Use a rectangular grid of control points to specify the surface –4 points in the bi-linear case on the previous slide, more in other cases Surface takes the form: –For some functions F i,s and F j,t

04/18/02(c) 2002 University of Wisconsin Bezier Patches As with Bezier curves, B i n (s) and B j m (t) are the Bernstein polynomials of degree n and m respectively Most frequently, use n=m=3: cubic Bezier patch –Need 4x4=16 control points, P i,j

04/18/02(c) 2002 University of Wisconsin Bezier Patches (2) Edge curves are Bezier curves Any curve of constant s or t is a Bezier curve One way to think about it: –Each row of 4 control points defines a Bezier curve in s –Evaluating each of these curves at the same s provides 4 virtual control points –The virtual control points define a Bezier curve in t –Evaluating this curve at t gives the point x(s,t) x(s,t)

04/18/02(c) 2002 University of Wisconsin Properties of Bezier Patches Which vertices, if any, does the patch interpolate? Why? What can you say about the tangent plane at each corner? Why? Does the patch lie within the convex hull of its control vertices?

04/18/02(c) 2002 University of Wisconsin Properties of Bezier Patches The patch interpolates its corner points –Comes from the interpolation property of the underlying curves The tangent plane at each corner interpolates the corner vertex and the two neighboring edge vertices –The tangent plane is the plane that is perpendicular to the normal vector at a point –The tangent plane property derives from the curve tangent properties and the way to compute normal vectors The patch lies within the convex hull of its control vertices –The basis functions sum to one and are positive everywhere

04/18/02(c) 2002 University of Wisconsin Bezier Patch Matrix Form Note that the 3 matrices stay the same if the control points do not change –The middle product can be pre-computed, leaving only:

04/18/02(c) 2002 University of Wisconsin Bezier Patch Meshes A patch mesh is just many patches joined together along their edges –Patches meet along complete edges –Each patch must be a quadrilateral OK Not OK

04/18/02(c) 2002 University of Wisconsin Bezier Mesh Continuity Just like curves, the control points must satisfy rigid constraints to ensure parametric continuity –How do we ensure C 0 continuity along an edge? –How do we ensure C 1 continuity along an edge? –How do we ensure C 2 continuity along an edge? For geometric continuity, constraints are less rigid What can you say about the vertices around a corner if there must be C 1 continuity at the corner point?

04/18/02(c) 2002 University of Wisconsin Bezier Mesh Continuity Just like curves, the control points must satisfy rigid constraints to ensure parametric continuity –C 0 continuity along an edge? Share control points at the edge –C 1 continuity along an edge? Control points across edge are collinear and equally spaced –C 2 continuity along an edge? Constraints extent to points farther from the edge For geometric continuity, constraints are less rigid –Still collinear for G 1, but can be anywhere along the line What can you say about the vertices around a corner if there must be C 1 continuity at the corner point? –They are co-planar (not the interior points, just corner and edge)

04/18/02(c) 2002 University of Wisconsin Rendering Bezier Patches Option 1: Evaluate at fixed set of parameter values and join up with triangles –Can’t use quadrilaterals because points may not be co-planar –Ideal situation for triangle strips –Advantage: Simple, and OpenGL has commands to do it for you –Disadvantage: No easy way to control quality of appearance Option 2: Subdivide –Allows control of error in the triangle approximation –Defined much like curve subdivision, but done once in each parametric direction

04/18/02(c) 2002 University of Wisconsin Midpoint Subdivision Repeatedly join midpoints to find new control vertices –Do it first for each row of original control points: 4x4 -> 4x7 –Then do it for each column of new control points:4x7 -> 7x7

04/18/02(c) 2002 University of Wisconsin A Potential Problem One (good) way to subdivide, is: –If a control mesh is flat enough – draw it –Else, subdivide into 4 sub-patches and recurse on each Problem: Neighboring patches may not be subdivided to the same level –Cracks can appear because join edges have different control meshes –This can be fixed by adding extra edges Crack

04/18/02(c) 2002 University of Wisconsin Computing Normal Vectors The partial derivative in the s direction is one tangent vector The partial derivative in the t direction is another Take their cross product, and normalize, to get the surface normal vector