Last Time Introduction to parametric curves Hermite curves Bezier curves Continuity 4 27 04 University of Wisconsin CS559 Spring 2004 Today Geometric continuity Parametric surfaces General Tensor product surfaces Bezier surfaces BSplines Homework 7 available due Thursday May 6 in class 4 27 04 University of Wisconsin CS559 Spring 2004 Continuity When two curves are joined we typically want some degree of continuity across the boundary the knot C0 C zero point wise continuous curves share the same point where they join C1 C one continuous derivatives curves share the same parametric derivatives where they join C2 C two continuous second derivatives curves share the same parametric second derivatives where they join Higher orders possible 4 27 04 University of Wisconsin CS559 Spring 2004 Bezier Continuity P0 1 P0 2 P0 0 P1 3 J P1 1 P1 2 Disclaimer PowerPoint curves are not Bezier curves they are interpolating piecewise quadratic curves This diagram is an approximation 4 27 04 University of Wisconsin CS559 Spring 2004 Sketch of Proof for C1 Bezier curve equation x x 0 1 t 3 x1 3t 1 t 2 x 2 3t 2 1 t x 3t 3 x 0 1 3t 3t 2 t 3 x1 3 t 2t 2 t 3 x 2 3 t 2 t 3 x 3t 3 Parametric derivative dx x 0 3 6t 3t 2 x1 3 1 4t 3t 2 x 2 3 2t 3t 2 x 3 3t 2 dt Evaluated at endpoint of curve note proves tangent property dx 3x 0 3x1 3 x1 x 0 dt t 0 4 27 04 dx 3x 2 3x 3 3 x 3 x 2 dt t 1 University of Wisconsin CS559 Spring 2004 Proof cont P0 1 P0 0 P0 2 P1 3 J P1 1 C1 requires equal parametric derivatives 4 27 04 P1 2 3 P1 1 J 3 J P0 2 University of Wisconsin CS559 Spring 2004 P1 1 J J P0 2 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 C0 continuity how many DOF does the user have If we have n piecewise Bezier curves joined with C1 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 C1 continuity What about C2 4 27 04 University of Wisconsin CS559 Spring 2004 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 G1 geometric continuity Curves could be made C1 with a re parameterization u f t The geometric version of C2 is G2 based on curves having the same radius of curvature across the knot What is the tangent continuity constraint for a Bezier curve 4 27 04 University of Wisconsin CS559 Spring 2004 Bezier Geometric Continuity P0 1 P0 2 P0 0 P1 3 J P1 1 P1 1 J k J P0 2 4 27 04 P1 2 for some k University of Wisconsin CS559 Spring 2004 Parametric Surfaces Define points on the surface in terms of two parameters s Simplest case bilinear interpolation x s 1 P0 1 x s 0 1 s P0 0 sP1 0 P1 1 x s t x s 1 1 s P0 1 sP1 1 x s t 1 t x s 0 tx s 1 t F0 s 1 s F1 s s F0 t 1 t F1 t t 1 1 P0 0 x s t Pi j Fi s s F j t t i 0 j 0 4 27 04 s x s 0 University of Wisconsin CS559 Spring 2004 P1 0 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 d s dt Surface takes the form x s t Pi j Fi s s F j t t For some functions Fi s and Fj t 4 27 04 i 0 j 0 University of Wisconsin CS559 Spring 2004 Bezier Patches n m x s t Pi j Bin s B mj t i 0 j 0 As with Bezier curves Bin s and Bjm 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 Pi j 4 27 04 University of Wisconsin CS559 Spring 2004 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 4 27 04 University of Wisconsin CS559 Spring 2004 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 4 27 04 University of Wisconsin CS559 Spring 2004 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 4 27 04 University of Wisconsin CS559 Spring 2004 Bezier Patch Matrix Form x s t S T B T PBT x s t s 3 s 2 1 P0 0 0 P1 0 0 P2 0 0 P3 0 1 3 3 3 6 3 s 1 3 3 0 0 0 1 P0 1 P0 2 P1 1 P1 2 P2 1 P2 2 P3 1 P3 2 P0 3 1 3 3 P1 3 3 6 3 P2 3 3 3 0 P3 3 1 0 0 Note that the 3 matrices stay the same if the control points do not change The middle product can be pre computed leaving only M 0 0 M 0 1 M 0 2 M 0 3 t 3 M 2 M M M 1 0 1 1 1 2 1 …
View Full Document
Unlocking...