Professional Documents
Culture Documents
10 Splines PDF
10 Splines PDF
Lecture 10
Splines
Cubic B-Splines
Nonuniform Rational B-Splines
Rendering by Subdivision
Curves and Surfaces in OpenGL
[Angel, Ch 10.7-10.14]
February 21, 2002
Frank Pfenning
Carnegie Mellon University
http://www.cs.cmu.edu/~fp/courses/graphics/
Review
Cubic polynomial form for curve
Note symmetries
l(0) = l0 = p0
l(1) = l3 = p(1/2) = 1/8(p0 + 3p1 + 3p2 + p3)
l(0) = 3(l1 l0) = p(0) = 3/2 (p1 p0)
l(1) = 3(l3 l2) = p(1/2) = 3/8(-p0 p1 + p2 +p3)
Note parameter substitution v = 2u so dv = 2du
n=5 n = 20
void display(void)
{ ...
glPushMatrix();
glRotatef(85.0, 1.0, 1.0, 1.0);
glEvalMesh2(GL_FILL, 0, 20, 0, 20);
glPopMatrix();
glFlush();
}