11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2
21/6/ :55 Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function Calls or Protocol Data
31/6/ :55
4 Gouraud Shading: Use Mean Normal at Each Vertex
51/6/ :55 The Utah Teapot: 32 Bezier Patches
61/6/ :55 Explict Representation of Curve: Two Dimensions Dependent Variable Independent Variable General case: Neither variable is a single-valued function of the other. Example: a circle centered at the origin
71/6/ :55 Explicit Representation of a Curve: Three Dimensions c y x z Plane x = c
81/6/ :55 Implicit Representation Two Dimensions: Should be thought of as a “membership” or “testing” function. Divides space into points on the curve and not on the curve. Circle: Describes a curve Line :
91/6/ :55 Implicit Representation: Three Dimensions Defines a surface in three dimensions. Example: a sphere of radius r at origin There is no easy way to represent a curve implicitly in three dimensions. Algebraic surfaces are those in which f is polynomial in x, y, z. Quadric surfaces are algebraic surfaces where the polynomial is of degree at most 2.
101/6/ :55 Problems with Implicit Representation 0 Difficult to evaluate for rendering because identifying points on the curve requires explicit solution for (x,y). 0 Limited variety of curves that can be obtained.
111/6/ :55 Parametric Representation of Curves and Surfaces Express each spatial variable for points on the curve as a function of a non-spatial independent variable. Parametric surfaces require two parameters: Where u is defined over some closed range, e.g. [0, 1]
121/6/ :55 What does a Parametric Representation Really Mean?
131/6/ :55 Advantages of Parametric Representation 0 Solves problem of choice of independent variable 0 Easy computation of derivatives 0 Provides mechanism for “tracing” a curve or surface 0 Facilitates joining of multiple curves, surfaces 0 Generates a rich variety of curves, surfaces 0 Ease of rendering
141/6/ :55 Parametric Polynomial Curves Defines points on a parametric curve. A polynomial parametric curve of degree n is defined:
151/6/ :55 Parametric Polynomial Surfaces u=1 v=1 v=0 u=0 y z x
161/6/ :55 Continuity Considerations C 0 continuity: = C 1 continuity: G 1 continuity:
171/6/ :55 What degree do we want? High order polynomials provide more control over shape of curve. Degree n provides 3(n+1) degrees of freedom, in the choice of c k. The higher the order of a polynomial, the less “smooth” it is. A polynomial of degre n can change directions n-1 times. Consider polynomial of order 5.
181/6/ :55 Parametric Cubic Polynomial Curves Matrix Notation
191/6/ :55 Parametric Curves: How Do I Control the Shape?
201/6/ :55 Interpolation: Four control points on curve This constraint can be expressed by the equations:
211/6/ :55 Computing the coefficients Expressing the constraints in matrix form: Where:
221/6/ :55 Computing the coefficients
231/6/ :55 Blending Functions Substituting fromgives: which can be written as: whereis a column vector of blending functions.
241/6/ :55 Blending Functions
251/6/ :55 Expressing a point on the curve in terms of the blending polynomials Control
261/6/ :55 What the blending functions look like:
271/6/ :55 0 Contains scalars and polynomials (vectors) 0 Addition, zero polynomial defined 0 Can express a basis, e.g. 0 Representation of a polynomial in terms of this basis can be expressed as a column vector of scalar coefficients. Let’s look at polynomials as a vector space.
281/6/ :55 Conversion of representation from one basis to another Representation: Basis:
291/6/ :55 Conversion of representation from one basis to another Representation : Basis : The central issue in parametric curves (and surfaces) is the selection of an appropriate basis for the control point representation.
301/6/ :55 How do we extend this to 3 dimensions? Interpolating Patch u = constant v = constant
311/6/ :55 Bicubic interpolating surface patch 16 coefficients allow the interpolation of 16 points.
321/6/ :55 Solving for Coefficients Substituting the values at 16 points: Gives the equation:Where as before
331/6/ :55 Solving for Coefficients Note: separability of blending polynomial in u, v.
341/6/ :55 Lines of constant u and v are Interpolating curves u = constant v = constant