Unformatted text preview:

Last Time Subdivision Sphere Fractals Modified Butterfly scheme 4 20 04 University of Wisconsin CS559 Spring 2004 Today Parametric curves Hermite curves Bezier curves Homework 6 due Homework 7 available Friday due May 4 No lecture April 22 Thursday 4 20 04 University of Wisconsin CS559 Spring 2004 Subdivision Shortcomings Subdivision surfaces suffer from parameterization problems How are texture coordinates handled Surface are 2D in nature how do we attached a 2D space to subdivision surfaces Subdivision surfaces can be difficult to model with Still may take complex underlying surface to get desired shape Effects of changes to underlying mesh are not always obvious Evaluation is non trivial Methods exist for taking a point in the underlying mesh and figuring out where it will go on the surface but it isn t easy 4 20 04 University of Wisconsin CS559 Spring 2004 What are Parametric Curves Define a parameter space 1D for curves 2D for surfaces Define a mapping from parameter space to 3D points A function that takes parameter values and gives back 3D points The result is a parametric curve or surface Mapping F t x y 0 1 Fx t Fy t t 0 4 20 04 University of Wisconsin CS559 Spring 2004 1 Why Parametric Curves Parametric curves are intended to provide the generality of polygon meshes but with fewer parameters for smooth surfaces Polygon meshes have as many parameters as there are vertices at least Fewer parameters makes it faster to create a curve and easier to edit an existing curve Normal vectors and texture coordinates can be easily defined everywhere Parametric curves are easier to animate than polygon meshes 4 20 04 University of Wisconsin CS559 Spring 2004 Parametric Curves We have seen the parametric form for a line x 1 t x0 tx1 y 1 t y0 ty1 z 1 t z0 tz1 Note that x y and z are each given by an equation that involves The parameter t Some user specified control points x0 and x1 This is an example of a parametric curve 4 20 04 University of Wisconsin CS559 Spring 2004 Basis Functions first sighting A line is the sum of two functions multiplied by vectors x x0 x1 y 1 t y t y 0 1 z z0 z1 A linear combination of basis functions t and 1 t are the basis functions The weights are called control points x0 y0 z0 and x1 y1 z1 are the control points They control the shape and position of the curve 4 20 04 University of Wisconsin CS559 Spring 2004 Hermite Spline A spline is a parametric curve defined by control points The term spline dates from engineering drawing where a spline was a piece of flexible wood used to draw smooth curves The control points are adjusted by the user to control the shape of the curve A Hermite spline is a curve for which the user provides The endpoints of the curve The parametric derivatives of the curve at the endpoints tangents with length The parametric derivatives are dx dt dy dt dz dt That is enough to define a cubic Hermite spline 4 20 04 University of Wisconsin CS559 Spring 2004 Control Point Interpretation End Tangent Start Tangent dx dt 1 dx dt 0 x1 End Point x0 Start Point 4 20 04 University of Wisconsin CS559 Spring 2004 Hermite Spline 2 dx 0 dx1 Say the user provides x 0 x1 dt 0 dt 1 A cubic spline has degree 3 and is of the form x at 3 bt 2 ct d For some constants a b c and d derived from the control points but how We have constraints The curve must pass through x0 when t 0 The derivative must be x 0 when t 0 The curve must pass through x1 when t 1 The derivative must be x 1 when t 1 4 20 04 University of Wisconsin CS559 Spring 2004 Hermite Spline 3 Solving for the unknowns gives a 2 x1 2 x0 x1 x0 b 3x1 3x0 x1 2 x0 c x0 d x0 Rearranging gives 3 2 x x1 2t 3t x 0 2t 3 3t 2 1 x1 t 3 t 2 x 0 t 3 2t 2 t 4 20 04 or x x1 x0 2 3 0 2 3 0 x1 x0 1 1 0 1 2 1 University of Wisconsin CS559 Spring 2004 0 t 3 1 t 2 0 t 0 1 Basis Functions A point on a Hermite curve is obtained by multiplying each control point by some function and summing 4 20 04 University of Wisconsin CS559 Spring 2004 Splines in 2D and 3D For higher dimensions define the control points in higher dimensions that is as vectors x x1 y y 1 z z1 4 20 04 x0 y0 z0 2 3 0 x1 x0 2 3 0 y1 y0 1 1 0 z1 z0 1 2 1 University of Wisconsin CS559 Spring 2004 0 t 3 1 t 2 0 t 0 1 Bezier Curves 1 Different choices of basis functions give different curves Choice of basis determines how the control points influence the curve In Hermite case two control points define endpoints and two more define parametric derivatives For Bezier curves two control points define endpoints and two control the tangents at the endpoints in a geometric way 4 20 04 University of Wisconsin CS559 Spring 2004 Control Point Interpretation Point along start tangent x2 x3 End Point x0 Start Point 4 20 04 x2 Point along end Tangent University of Wisconsin CS559 Spring 2004 Bezier Curves 2 The user supplies d control points pi Write the curve as d i d i B t t 1 t x t p i B t i i 0 The functions Bid are the Bernstein polynomials of degree d d d i d i Where else have you seen them This equation can be written as a matrix equation also There is a matrix to take Hermite control points to Bezier control points 4 20 04 University of Wisconsin CS559 Spring 2004 Bezier Basis Functions for d 3 4 20 04 University of Wisconsin CS559 Spring 2004 Bezier Curves of Varying Degree 4 20 04 University of Wisconsin CS559 Spring 2004 Bezier Curve Properties The first and last control points are interpolated The tangent to the curve at the first control point is along the line joining the first and second control points The tangent at the last control point is along the line joining the second last and last control points The curve lies entirely within the convex hull of its control points The Bernstein polynomials the basis functions sum to 1 and are everywhere positive They can be rendered in many ways E g Convert to line segments with a subdivision algorithm 4 20 04 University of Wisconsin CS559 Spring 2004 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 Expensive to evaluate the curve at many points No easy way of knowing how fine to sample points and maybe sampling rate …


View Full Document

UW-Madison CS 559 - CS 559 Lecture Notes

Documents in this Course
Filters

Filters

14 pages

Lecture 2

Lecture 2

24 pages

Clipping

Clipping

22 pages

Modeling

Modeling

33 pages

Filters

Filters

26 pages

Dithering

Dithering

33 pages

Lecture 4

Lecture 4

20 pages

Load more
Loading Unlocking...
Login

Join to view CS 559 Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 559 Lecture Notes and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?