DOC PREVIEW
UVA CS 445 - Parametric Curves & Surfaces

This preview shows page 1-2-3-27-28-29 out of 29 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Parametric Curves & SurfacesCurved SurfacesSlide 3Parametric SurfacesSurface of revolutionSwept surfaceSlide 7Piecewise Parametric SurfacesParametric PatchesSlide 10Let the Control Points MoveBézier PatchesParametric Bicubic PatchesBezier PatchesB-Spline PatchesBezier PatchesBezier SurfacesSlide 18Slide 19Drawing Bezier SurfacesSlide 21Bézier Curves in OpenGLDefining the Control PointsDefining the Mesh ParametersDrawing the MeshSlide 26Slide 27Next TimeBlender (www.blender.nl)Greg HumphreysCS445: Intro GraphicsUniversity of Virginia, Fall 2003ParametricCurves & SurfacesGreg HumphreysUniversity of VirginiaCS 445, Spring 2002Curved Surfaces•MotivationExact boundary representation for some objectsMore concise representation than polygonal meshH&B Figure 10.46Curved Surfaces•What makes a good surface representation?AccurateConciseIntuitive specificationLocal supportAffine invariantArbitrary topologyGuaranteed continuity Natural parameterizationEfficient displayEfficient intersectionsParametric Surfaces•Boundary defined by parametric functions:x = fx(u,v)y = fy(u,v)z = fz(u,v)•Example: ellipsoidH&B Figure 10.10sinsincoscoscoszyxrzryrxSurface of revolution•Idea: take a curve and rotate it about an axisDemetri TerzopoulosSwept surfaceIdea: sweep one curve along path of another curveDemetri TerzopoulosParametric SurfacesAdvantage: easy to enumerate points on surface.Disadvantage: need piecewise-parametric surface to describe complex shape.uvFvDFH Figure 11.42Piecewise Parametric SurfacesSurface is partitioned into parametric patches:Watt Figure 6.25Same ideas as parametric splines!Parametric Patches•Each patch is defined by blending control pointsSame ideas as parametric curves!FvDFH Figure 11.44Parametric Patches•Point Q(u,v) on the patch is the tensor product of parametric curves defined by the control pointsWatt Figure 6.21Q(u,v)Q(0,0)Q(1,0)Q(0,1)Q(1,1)Let the Control Points Move•Call the Bézier parameter v, and let the N+1 control points depend on some other parameter u:•Each “u-contour” is a normal Bézier curve, but at different u values, the control points are at different positions•Think of the surface as a changing Bézier curve sweeping through space•How do the control points change?     NkNkkvBupvup0,Bézier Patches•Let’s allow the control points to move along their own Bézier curves:•Putting this together with our original definition of our surface, we get the tensor product form for the Bézier patch:   NiNikikuBpup0,      MiNkNkMikivBuBpvup0 0,,Parametric Bicubic PatchesPoint Q(u,v) on any patch is defined by combining control points with polynomial blending functions:TTVMUM4,43,42,41,44,33,32,31,34,23,22,21,24,13,12,11,1),(PPPPPPPPPPPPPPPPvuQWhere M is a matrix describing the blending functionsfor a parametric cubic curve (e.g., Bezier, B-spline, etc.) 123uuuU 123vvvVBezier PatchesVMUMTBezierBezier4,43,42,41,44,33,32,31,34,23,22,21,24,13,12,11,1),(PPPPPPPPPPPPPPPPvuQFvDFH Figure 11.420001003303631331Be zierMB-Spline PatchesVMUMTSplineBSplineB 4,43,42,41,44,33,32,31,34,23,22,21,24,13,12,11,1),(PPPPPPPPPPPPPPPPvuQWatt Figure 6.28061326102102102112161212161SplineBMBezier Patches •Properties:Interpolates four corner points Convex hullLocal controlWatt Figure 6.22Bezier Surfaces•Continuity constraints are similar to the contraints for Bezier splinesFvDFH Figure 11.43Bezier Surfaces•C0 continuity requires aligning boundary curvesWatt Figure 6.26aBezier Surfaces•C1 continuity requires aligning boundary curves and derivatives (a reason to prefer subdiv. surf.)Watt Figure 6.26bDrawing Bezier Surfaces•Simple approach is to loop through uniformly spaced increments of u and vDrawSurface(void) {for (int i = 0; i < imax; i++) {float u = umin + i * ustep;for (int j = 0; j < jmax; j++) {float v = vmin + j * vstep;DrawQuadrilateral(...);}}}DrawSurface(void) {for (int i = 0; i < imax; i++) {float u = umin + i * ustep;for (int j = 0; j < jmax; j++) {float v = vmin + j * vstep;DrawQuadrilateral(...);}}}Watt Figure 6.32Drawing Bezier Surfaces•Better approach is to use adaptive subdivision:DrawSurface(surface) {if Flat (surface, epsilon) {DrawQuadrilateral(surface);}else {SubdivideSurface(surface, ...);DrawSurface(surfaceLL);DrawSurface(surfaceLR);DrawSurface(surfaceRL);DrawSurface(surfaceRR);}}DrawSurface(surface) {if Flat (surface, epsilon) {DrawQuadrilateral(surface);}else {SubdivideSurface(surface, ...);DrawSurface(surfaceLL);DrawSurface(surfaceLR);DrawSurface(surfaceRL);DrawSurface(surfaceRR);}}Uniform subdivisionAdaptive subdivisionWatt Figure 6.32Bézier Curves in OpenGL•Use evaluators•glMap defines the set of control points•glMapGrid defines how finely to evaluate the surface•glEvalCoord/glEvalMesh cause the mesh to be drawnDefining the Control Points•glMap2 [df](target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ) target specifies what OpenGL command will be executed when this mesh is evaluated, and what’s in the control mesh. For drawing, usually use GL_MAP2_VERTEX3u1,u2,v1,v2 define a mapping from values passed to glEvalCoord to (0,1), the domain of the Bézier functionsustride, vstride indicate how the data is packed in the arrayuorder, vorder define the dimensions of the point arraypoints is the actual data•glMap2d(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, &ctrlpoints1[0][0][0]);Defining the Mesh Parameters•glMapGrid specifies how the mesh will be evaluated based on the control points•glMapGrid2[df](un, u1, u2, vn, v1, v2 )un, vn define the number of partitions at which to evaluate the surfaceu1,u2, v1,v2 define the range of grid variables•glMapGrid2d(20, 0.0, 1.0, 20, 0.0, 1.0);Drawing the Mesh•We can draw the whole mesh at once with glEvalMesh•glEvalMesh2(mode, i1, i2, j1, j2 )mode specifies points, lines, or polygonsi1,i2,j1,j2 define the range over which to evaluate the mesh•glEvalMesh2(GL_LINE, 0, 20, 0, 20);Drawing Bezier Surfaces•One problem with adaptive subdivision is avoiding cracks at boundaries between patches at different subdivision levelsAvoid


View Full Document

UVA CS 445 - Parametric Curves & Surfaces

Documents in this Course
Lighting

Lighting

49 pages

Color

Color

20 pages

Clipping

Clipping

10 pages

Shadows

Shadows

95 pages

Color

Color

37 pages

Radiosity

Radiosity

49 pages

Clipping

Clipping

59 pages

Assign 3

Assign 3

28 pages

Splines

Splines

17 pages

Color

Color

17 pages

Load more
Download Parametric Curves & Surfaces
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Parametric Curves & Surfaces 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 Curves & Surfaces 2 2 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?