Unformatted text preview:

Parametric Surface Patches As with parametric curves define a vector valued function p u v x u v y u v z u v Derivatives are tangent to surface not necessarily orthogonal x p u u v u x p v u v v y u z u y v z v And the unit normal can be computed as n u v pu p v pu p v Example Parametric Paraboloid Described by equation z p u v u v 1u 2 v 2 2 Horizontal cross sections are ellipses x y 1 2 1 Exercise Parametric Cylinders Cylinders have circular profiles and some fixed height z So how to parameterize one x u v y u v z u v 1 x 2r y Exercise Parametric Cylinders Cylinders have circular profiles and some fixed height z The natural choice for two parameters is u v h the angle around the base location along the cylinder Can easily write down coordinate functions x h r cos y h r sin z h h 1 0 2 0 h 1 x 2r y 2 Example Parametric Sphere One of several ways to parameterize a sphere is x u v r cos v cos u y u v r cos v sin u 0 u 2 z u v r sin v 2 v 2 note that it is centered at the origin Usually paste together seams during polygon conversion vertices at extreme values of u v should be the same not just duplicated points at the same location in space Sweeping out Surfaces We view space curves as being swept out by a moving point p u x u y u z u as we vary u the point moves through space the curve is the path the point takes Essentially looked at surfaces the same way p u v x u v y u v z u v Now let s think about sweeping curves through space instead this will define a surface the set of all points visited by the curve during its motion 3 Extruding Surfaces Here s a particularly simple method specify initial closed curve pick an axis to move along and a distance to move Sweeps out something with the given profile open curve defines a surface with an open boundary closed curve defines something like a cylinder This is a common technique used to create 3 D text Text Surfaces of Revolution Extrusion moves curves via translation we can just as easily use rotation y Start with some curve pick an axis of rotation rotate about axis by 360 Characteristics of revolved surfaces closed if endpoints on axis open otherwise x but we can always fill in top bottom by construction they re symmetric Lots of other easy examples cylinder cone paraboloid z Example Revolving a semicircle produces a sphere 4 More Complex Examples of Revolution Generalized Cylinders Powerful generalization of extrusion before we simply translated a profile in a particular direction now we ll sweep it along an arbitrary curve and allow the profile to be scaled as it is swept at right angles along the curve The curve which we sweep along is like a skeleton sweeping curve along it skins a surface around it the shape of the spine controls the shape of the object adding scaling functions provides even greater control This is nice for animation we don t have to control the surface itself just have to reshape the spine and the surface follows along 5 Example Bananas What we specify a mostly circular profile a spine for the banana a scaling function Periodically along the curve we place a cross section scale it appropriately connect to previous section Cross Section Scaling Function John Snyder SIGGRAPH 1992 Example Snakes Like the banana we have profile spine and scaling function Could probably use revolution take an outline like scaling function revolve around y axis This might produce a decent shape but not nearly as good for animation Sabine Coquillart IEEE CG A 1987 6 Spline Surface Patches The prior example surfaces work out just fine but there s one problem with how we built them the parameterization is completely customized we generated them by hand from first principles It would be nice to have a common building block just as we can build curves out of many spline segments we can build surfaces out spline patches Formulating Spline Patches Our spline curves had the form n p u pi Bi u 0 u 1 i 0 a linear combination of control points controlled by blending functions Bi Our spline patches will have an analogous form m n p u v pij Bij u v 0 u v 1 i 0 j 0 7 Recall Bilinear Interpolation c f 1 u c ud d p u v 1 v e vf a e 1 u a ub b de Casteljau Algorithm for B zier Patches Repeated bi linear interpolation 1 r 1 pri j u v 1 u 1 v pri 1j u 1 v pri 1j 1 1 u v pri 1 j uv p i 1 j 1 Producing the B zier patch p u v pn0 0 u v p00 3 p03 3 p00 0 p00 3 8 Tensor Product Patches We assumed a set of nm basis functions m n p u v pij Bij u v 0 u v 1 i 0 j 0 We re actually only considering tensor product patches each basis function is the product of two 1 D basis functions Bij u v Bi u B j v giving us the general spline equation m n p u v pij Bim u B nj v 0 u v 1 i 0 j 0 Bi Linear B zier Bernstein Basis B01 u 1 u B00 u v 1 u 1 v B10 u v u 1 v B11 u u B01 u v 1 u v B11 u v uv 9 Bi Quadratic B zier Bernstein Basis Bi Cubic B zier Bernstein Basis 10 Example B zier Surface Patch Define grid of 16 control points interpolates 4 corners Can draw patch by subdivision Building Objects with Patches Paste together multiple patches to cover entire object the Utah Teapot for example is built from 32 patches This raises some tricky questions how many patches needed how to guarantee continuity of patches while animating how can we cut holes in the surface trimming curves create boundary spline curves on surface 11 Drawing Splines with OpenGL OpenGL provides an evaluator mechanism for splines specify control points with glMap1f or glMap2f use glEvalCoord1f to evaluate the spline equation this gives us a grid of points on the surface just connect them together with quads or triangles Always uses B zier basis functions Bernstein polynomials but this is no problem can convert control points for other splines to B zier controls we just need to compute the right conversion matrices There s actually a more convenient interface for NURBS gluBeginCurve gluNurbsCurve gluEndCurve and similar functions for NURBS surfaces Subdivision Surfaces Have become very successful primitive the subject of a lot of recent research naturally multiresolution representation continuum from …


View Full Document

U of I CS 418 - Parametric Surface Patches

Loading Unlocking...
Login

Join to view Parametric Surface Patches 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 Parametric Surface Patches 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?