- Forward


Bézier Surfaces in OpenGL
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Review
Back SMYC Forward
  • Control Points:
    • Let \(p_{ij}\) denote control point \((i,j)\)
    • The patch will be in the convex hull of the control points
  • Blending Polynomials:
    • We have one array of blending polynomials for each parameter
  • The Bézier Patch:
    • \(p(u,v) = \sum_{i=0}^{n} \sum_{j=0}^{m} b_{i}(u) b_{j}(v) p_{ij}\)
Bézier Surfaces in OpenGL
Back SMYC Forward
  • Evaluators:
    • Are used in the same way as for Bézier curves (i.e., to compute the values for the Bernstein polynomials)
  • For Uniform Meshes:
    • glMapGrid2f()
    • glEvalMesh2()
Bézier Surfaces and Textures
Back SMYC Forward

An Example

surface-shading
Bézier Surfaces in OpenGL (cont.)
Back SMYC Forward
Using a Uniform Mesh
openglexamples/surfaces/shade.c (Fragment: surface)
 
Bézier Surfaces in OpenGL (cont.)
Back SMYC Forward
Initialization
openglexamples/surfaces/shade.c (Fragment: setup)
 
Bézier Surfaces and Textures
Back SMYC Forward

An Example

texture-surface
Bézier Surfaces and Textures (cont.)
Back SMYC Forward
Initialization
openglexamples/textures/surface.c (Fragment: init)
 
Bézier Surfaces and Textures (cont.)
Back SMYC Forward
Rendering
openglexamples/textures/surface.c (Fragment: render)
 
There's Always More to Learn
Back -