Silicon Graphics

[Prev] [TOC] [Next]



(-) OpenGL Programming Guide
(-) Chapter 11Evaluators and NURBS

Evaluators

A Bézier curve is a vector-valued function of one variable

C(u) = [X(u) Y(u) Z(u)]

where u varies in some domain (say [0,1]). A Bézier surface patch is a vector-valued function of two variables

S(u,v) = [X(u,v) Y(u,v) Z(u,v)]

where u and v can both vary in some domain. The range isn't necessarily three-dimensional as shown here. You might want two-dimensional output for curves on a plane or texture coordinates, or you might want four-dimensional output to specify RGBA information. Even one-dimensional output may make sense for gray levels, for example.

For each u (or u and v, in the case of a surface), the formula for C() (or S()) calculates a point on the curve (or surface). To use an evaluator, first define the function C() or S(), enable it, and then use the glEvalCoord1() or glEvalCoord2() command instead of glVertex(). This way, the curve or surface vertices can be used like any other vertices - to form points or lines, for example. In addition, other commands automatically generate series of vertices that produce a regular mesh uniformly spaced in u (or in u and v). One- and two-dimensional evaluators are similar, but the description is somewhat simpler in one dimension, so that case is discussed first.


(+) One-Dimensional Evaluators
(+) Two-Dimensional Evaluators
(+) Example: Using Evaluators for Textures

[Prev] [TOC] [Next]

OpenGL Programming Guide


Maintained by Maintainer: Send e-mail to .htm">name@address.