 # Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material.

## Presentation on theme: "Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material."— Presentation transcript:

Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi http://www.cs.columbia.edu/~cs4162 Some material courtesy Szymon Rusinkiewicz

To Do / Motivation  Questions??  One of written questions in assignment deals with material in this lecture  Otherwise, mainly intended for completeness, since splines are very common modeling tool  This lecture discusses extensions to rational (beyond polynomial) splines, NURBs and surfaces

Outline  Rational Splines  Quadratic rational splines  NURBs (briefly)  Parametric patches (briefly)

Parametric Polynomial Curves  A parametric polynomial curve of order n:  Advantages of polynomial curves  Easy to compute  Infinitely differentiable everywhere

Rational Splines  Can’t represent certain shapes (e.g. circles) with piecewise polynomials  Wider class of functions: rational functions  Ratio of polynomials  Can represent any quadric (e.g. circles) exactly  Mathematical trick: homogeneous coordinates  Ratio of 2 polynomials in 3D equivalent to single polynomial in 4D

Rational Splines  Example: creating a circular arc with 3 control points (0,0) (0,1)(1,1) Polynomial spline: parabolic arc (0,0;1) (1,1;1) Rational spline: circular arc (???)

Standard deCasteljau Standard deCasteljau A B

Rational deCasteljau A B

Homogeneous deCasteljau Non-rational splines simply have all weights set to 1 instead

Outline  Rational Splines  Quadratic rational splines  NURBs (briefly)  Parametric patches (briefly)

Evaluation: Rational Splines  Add an extra weight coordinate Multiply standard coords of control point by weight (essentially the same as the use of homogeneous coords)  Apply standard deCasteljau or other evaluation alg.  Divide by final value of weight coordinate Essentially the same as perspective division/dehomogenize  Rational because of final division: Rational polynomial at the end (ratio of two polynomials)

Quadratic Bezier Curve  Example: quarter-circle arc, weight midpoint  Smaller w: pulled away from middle control point  Larger w: pulled towards middle control point (0,0;1) (0,1;1)(1,1;1) Polynomial spline: parabolic arc (0,0;1) (1,1;1) Rational spline: result depends on w (0,1;w)

Quadratic Bezier Curve General Bezier Formula for quadratic? (0,0;1) (0,1;1)(1,1;1) Polynomial spline: parabolic arc (0,0;1) (1,1;1) Rational spline: result depends on w (0,1;w)

Dependence of curve on w  For w very large, curve pulled toward middle control point, get a section of a hyperbola  For w = 1 (standard spline), standard parabola  For w < 1, positive, curve moves away from middle control point  For w = 0, curve becomes a straight line  When is curve part of a circle? (homework)

Mid-Point (t = ½ ?)

W very large (0,0;1) (0,1;>>1)(1,1;1)

W = 1 (non-rational spline) (0,0;1) (0,1;1)(1,1;1) Polynomial spline: parabolic arc

W < 1 (0,0;1) (1,1;1) Rational spline: result depends on w (0,1;w)

W = 0 (0,0;1) (1,1;1) Straight Line (0,1;w)

Outline  Rational Splines  Quadratic rational splines  NURBs (briefly)  Parametric patches (briefly)

NURBS  Non-uniform (vary time interval per segment)  Rational  B-Splines  Can model a wide class of curves and surfaces  Same convenient properties of B-Splines  Still widely used in CAD systems

Polar Forms: Cubic Bspline Curve -2 –1 0 –1 0 1 0 1 2 1 2 3  For Uniform B-splines, uniform knot vector (below)  For non-uniform, only require non-decreasing, not necessarily uniform (can be arbitrary) Uniform knot vector: -2, -1, 0, 1, 2,3 Labels correspond to this

NURBS

Outline  Rational Splines  Quadratic rational splines  NURBs (briefly)  Parametric patches (briefly)

Parametric Patches  Each patch is defined by blending control points FvDFH Figure 11.44

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

Parametric Bicubic Patches  Point Q(u,v) 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.)

Summary  Splines still used commonly for modeling  Start with simple spline curves (Bezier, uniform non- rational B-splines)  Discussed extension to rational curves (add homogeneous coordinate for rational polynomial)  Brief discussion of NURBs: widely used  Brief discussion of Parametric patches for modeling surfaces (rather than curves)

Download ppt "Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material."

Similar presentations