Unformatted text preview:

Classifying Continuity of Curves Parametric Continuity Ck each coordinate function is differentiable k times and they are continuous through kth derivative Geometric Continuity Gk the curve itself is continuous up to order k independent of parameterization G0 two segments meet at same point G1 with same tangent G2 and same curvature These two kinds of continuity are not always equivalent Exercise B zier Continuity Suppose that you re given two cubic B zier control polygons p0 p1 p 2 p3 q 0 q1 q 2 q 3 where the two curves p and q should be joined consecutively What constraints on these points are necessary to guarantee C 1 continuity between them 1 B zier Hermite Conversion This gives us a direct connection to Hermite splines Bezier p0 p0 Hermite p3 p3 r0 3 p1 p0 r3 3 p3 p 2 Which we can write in matrix form p0 1 p 0 3 r0 3 r3 0 0 p0 0 0 1 p1 3 0 0 p2 0 3 3 p3 0 0 Catmull Rom Splines Given a set of points in space suppose we want a spline that interpolates the data points rules out B zier with C1 continuity Hermite lots of tweaking This is a common situation in animation We start with the given set of points p0 K pn define tangent ri s pi 1 pi 1 2 Catmull Rom Splines Typically we pick s and we can derive a spline equation 1 p u 1 u u 2 2 0 2 0 0 pi 3 1 0 1 0 p i 2 u 3 2 5 4 1 pi 1 1 3 3 1 pi More generally we can use any tension parameter s p u 1 u u 2 1 0 0 pi 3 0 s 0 s 0 pi 2 u 3 2s s 3 3 2s s pi 1 s 2 s s 2 s pi B Splines Like Catmull Rom splines start with sequence of points p0 K pn 1 p u 1 u u 2 6 1 4 1 3 0 3 u 3 3 6 3 1 3 3 0 pi 3 0 pi 2 0 pi 1 1 pi Curves no longer interpolate control points points where segments actually meet are called knots for Hermite et al the knots were always control points Lack of interpolation isn t a big problem for interactive design but it s hard to predict curve just based on points coordinates 3 B Spline Basis Functions b1 u pi 3 b2 u pi 2 b3 u pi 1 b4 u pi Non negative functions implies convex hull property 1 3 1 u 6 1 b2 u 3u 3 6u 2 4 6 1 b3 u 3u 3 3u 2 3u 1 6 1 3 b4 u u 6 b1 u b3 u b2 u b1 u b4 u Converting Between Cubic Spline Types We saw a specific example of B zier Hermite conversion p0 1 p 0 3 r0 3 r3 0 0 0 0 0 3 0 0 3 0 p0 1 p1 0 p2 3 p 3 Suppose we want to convert between two arbitrary splines u T M1G1 u T M 2 G 2 Given geometry matrix G1 find equivalent G2 for other spline 1 G 2 M 2 M1G1 4 Drawing Spline Curves Method 1 Direct evaluation we have a function that generates points on the curve vary parameter u between 0 and 1 substitute into formula and compute a position connect consecutive points with line segments Method 1a Direct evaluation with forward differencing instead of evaluating polynomials directly incrementalize polynomial to cut down on multiplies This approach has some problems uniform parameter spacing is not uniform in space length of segments will vary over line control over length is important too long makes jagged curves too short is too slow to draw Drawing Spline Curves Method 2 Recursive subdivision starting with initial control polyline recursively subdivide each subdivision produces points closer to curve keep doing this until the segments are good enough until they re short enough roughly constant line size or curve is locally flat enough fewer lines in straight regions And we only have to write this code once we ve formulated a uniform representation for splines all we need to know is the basis geometry matrices 5 Summing Up Spline Curves Modeling By Subdivision Recall that we can draw spline curves via subdivision start with the control polyline recursively subdivide until smooth enough and draw the individual line segments We can actually use this as a modeling primitive define the curve as limit of infinite number of subdivision steps throw out all our polynomials 6 Developing Subdivision Curves Assume that we have some control polygon a closed piecewise linear curve in the plane Need two fundamental operations Linear Subdivision introduce new vertices Linear Smoothing modify positions of vertices Linear Subdivision of Curves Split each edge of the curve at its barycenter midpoint thus doubling the number of vertices v i 1 1 2 v i v i 1 vi 7 Linear Smoothing of Curves Reposition each vertex at weighted combination of neighbors vi v i 1 v i 1 v i 1 2 v i v i 1 v i 1 i 1 i Can also rewrite the above in a matrix form v i 1 2 v i 1 3 v i v i 1 Linear Smoothing of Curves We are generally interested in symmetric weighting schemes 1 1 v i v i 1 v i v i 1 2 2 weights 14 1 2 1 4 8 Creating Smooth Curves by Subdivision Alternately repeat subdivision smoothing operators converges to some limit curve determined by weights For weights resulting curve is piecewise B spline 0 1 2 3 4 Subdivision Level Subdivision as Linear Operator Points after k steps are linear combinations of previous points can therefore write subdivision step as a matrix operation p k Sk 1p k 1 x1 M x 2i x 2i 1 M x 2n y1 M x1 x y2i Sk 1 2 y2i 1 M x M n y2n y1 y2 M yn 9 Smoothing As Barycentric Averaging Compute barycenters of adjacent edges vi v i 1 v i 1 Compute barycenter of barycenters vi v i Same as weights but works in higher dimensions too 10


View Full Document

U of I CS 418 - Classifying Continuity of Curves

Loading Unlocking...
Login

Join to view Classifying Continuity of Curves 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 Classifying Continuity of Curves 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?