Parametric Curves & Surfaces

Slides:



Advertisements
Similar presentations
Lecture Notes #11 Curves and Surfaces II
Advertisements

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
© University of Wisconsin, CS559 Spring 2004
Lecture 10 Curves and Surfaces I
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material.
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
CS Peter Schröder Subdivision I: The Basic Ideas.
Surfaces Chiew-Lan Tai. Surfaces 2 Reading Required Hills Section Hearn & Baker, sections 8.11, 8.13 Recommended Sections 2.1.4, , 3D Computer.
CHAPTER 10 Curves and Surfaces Vivian by Richard S. Wright Jr.
Cornell CS465 Fall 2004 Lecture 16© 2004 Steve Marschner 1 Curved surfaces CS 465 Lecture 16.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 12: Spline Curves (review) Ravi Ramamoorthi Most material.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 4: 3D Objects and Meshes Ravi Ramamoorthi
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Modelling: Curves Week 11, Wed Mar 23
COEN Computer Graphics I
Curves and Surfaces in OpenGL Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
Splines III – Bézier Curves
Parametric Curves & Surfaces
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
Curve Modeling Bézier Curves
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
19/13/ :20 UML Graphics II Parametric Curves and Surfaces Session 3.
C O M P U T E R G R A P H I C S Stuff Jian Chen January 15, 2010 Transformations 1/10 Describing Shape By Andries van Dam.
3D Object Representations 2005, Fall. Course Syllabus Image Processing Modeling Rendering Animation.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008.
Bézier Algorithms & Properties Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, March 3, 2004.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric surfaces.
CS559: Computer Graphics Lecture 24: Shape Modeling Li Zhang Spring 2010.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
GPH 338 Computer Animation Survey
Bézier Curves & Surfaces Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, March 1, 2004.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall D Object Representations Greg Humphreys University of Virginia CS 445, Fall 2003.
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Subdivision Surfaces Greg Humphreys University of Virginia CS 445, Fall 2003.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
11/26/02(C) University of Wisconsin Last Time BSplines.
3D Object Representations 2011, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 12: Curves 1
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:
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Introduction to Parametric Curve and Surface Modeling.
© University of Wisconsin, CS559 Spring 2004
Curves and Surfaces in OpenGL
CS5500 Computer Graphics May 11, 2006
Curve & Surface.
Constructing Objects in Computer Graphics By Andries van Dam©
3D Object Representations
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
Introduction to Parametric Curve and Surface Modeling
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring 2002

Curved Surfaces Motivation Exact boundary representation for some objects More concise representation than polygonal mesh H&B Figure 10.46

Curved Surfaces What makes a good surface representation? Accurate Concise Intuitive specification Local support Affine invariant Arbitrary topology Guaranteed continuity Natural parameterization Efficient display Efficient intersections

Parametric Surfaces Boundary defined by parametric functions: x = fx(u,v) y = fy(u,v) z = fz(u,v) Example: ellipsoid H&B Figure 10.10

Surface of revolution Idea: take a curve and rotate it about an axis Demetri Terzopoulos

Swept surface Idea: sweep one curve along path of another curve Demetri Terzopoulos

Parametric Surfaces Advantage: easy to enumerate points on surface. Disadvantage: need piecewise-parametric surface to describe complex shape. FvDFH Figure 11.42

Piecewise Parametric Surfaces Surface is partitioned into parametric patches: Same ideas as parametric splines! Watt Figure 6.25

Parametric Patches Each patch is defined by blending control points Same ideas as parametric curves! FvDFH Figure 11.44

Parametric Patches Point Q(u,v) on the patch is the tensor product of parametric curves defined by the control points Q(u,v) Q(0,1) Q(1,1) Q(0,0) Q(1,0) Watt Figure 6.21

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?

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:

Parametric Bicubic Patches Point Q(u,v) on any patch is defined by combining control points with polynomial blending functions: Where M is a matrix describing the blending functions for a parametric cubic curve (e.g., Bezier, B-spline, etc.)

Bezier Patches FvDFH Figure 11.42

B-Spline Patches Watt Figure 6.28

Bezier Patches Properties: Interpolates four corner points Convex hull Local control Watt Figure 6.22

Bezier Surfaces Continuity constraints are similar to the contraints for Bezier splines FvDFH Figure 11.43

Bezier Surfaces C0 continuity requires aligning boundary curves Watt Figure 6.26a

Bezier Surfaces C1 continuity requires aligning boundary curves and derivatives (a reason to prefer subdiv. surf.) Watt Figure 6.26b

Drawing Bezier Surfaces Simple approach is to loop through uniformly spaced increments of u and v 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.32

Drawing 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); Uniform subdivision Adaptive subdivision Watt Figure 6.32

Bé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 drawn

Defining 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 levels Crack Avoid these cracks by adding extra vertices and triangulating quadrilaterals whose neighbors are subdivided to a finer level. Watt Figure 6.33

Parametric Surfaces Advantages: Disadvantages: Easy to enumerate points on surface Possible to describe complex shapes Disadvantages: Control mesh must be quadrilaterals Continuity constraints difficult to maintain Hard to find intersections

Next Time Subdivision Surfaces

Blender (www.blender.nl)