510 likes | 1.11k Views
Curve Modeling NURBS. Dr. S.M. Malaek Assistant: M. Younesi. Motivation. Motivation. We need more control over the curve. Motivation. Design Sketch. Motivation. Rendered. Motivation. Final Physical Product. Motivation. Different weights of control points.
E N D
Curve ModelingNURBS Dr. S.M. Malaek Assistant: M. Younesi
Motivation We need more control over the curve
Motivation Design Sketch
Motivation Rendered
Motivation Final Physical Product
Motivation • Different weights of control points
It is hard to product exact circle with B-spline. • Circles can only be represented with rationalfunction(i.e., functions that are quotients of two polynomials). four closed B-spline curves with 8 control points: Degree 3 Degree 10 Degree 5 Degree 2 Motivation
Motivation • Circles, ellipses and many other curves that cannot be represented by polynomials. • we need an extension to B-spline curves.
Motivation • Generalize B-splines to rational curves using homogeneous coordinates: Non-Uniform Rational B-Splines (NURBS)
NURBS • Different weights of Pi, to have different attraction factors. Wi=1 W1=0.4 W3=3.0
NURBS • Different weights of Pi, to have different attraction factors. W0=W2=W3=W5=1, W1=W4=4 Wi=1
NURBS • B-spline Curve:Given n+1 control points P0, P1, ..., Pn and knot vector U = { u0, u1, ..., um } of m+1 knots, the B-spline curve of degree p: Multiply the coordinates of Pi with a weight w B-Spline Curve in homogeneous coordinate
NURBS • Convert it back to Cartesian coordinate by dividingCw(u) with the fourth coordinate:
Two Immediate Results
Two Immediate Results • If all weights are equal to 1, a NURBS curve reduces to a B-spline curve. • NURBS Curves are Rational.
Properties of NURBS Basis Function
Properties of NURBS Basis Function • Ri,p(u) is a degree p rational function in u • Nonnegativity -- For all iandp, Ri,p(u) is nonnegative • Local Support -- Ri,p(u) is a non-zero on [ui,ui+p+1) • On any knot span[ui, ui+1)at mostp+1 degree p basis functions arenon-zero. • Partition of Unity -- The sum of all non-zero degree p basis functions on span [ui, ui+1) is 1:
Properties of NURBS Basis Function • If the number of knots is m+1, the degree of the basis functions is p, and the number of degree pbasis functions is n+1, then m = n + p + 1 : • Basis function Ri,p(u) is a composite curve of degree p rational functions with joining points at knots in [ui, ui+p+1 ) • At a knot of multiplicity k, basis function Ri,p(u) isCp-kcontinuous. • If wi = c for all i, where c is a non-zero constant, Ri,p(u) = Ni,p(u)
Properties of NURBS Curves
Properties of NURBS Curves • NURBS curve C(u) is a piecewise curve with each component a degree p rational curve. • Equality m = n + p + 1 must be satisfied . • A clamped NURBS curve C(u) passes through the two end control points P0 and Pn • Strong Convex Hull Property • Local Modification Scheme • C(u) is Cp-k continuous at a knot of multiplicity k • B-spline Curves and Bézier Curves Are Special Cases of NURBS Curves
Properties of NURBS Curves • Modifying Weights:increasing the value ofwi will pull the curve toward control pointPi • a NURBS curve of degree 6 and its NURBS basis functions. The selected control point is P9.
Properties of NURBS Curves • Modifying Weights:decreasing the value of wiwill push the curve away from control pointPi If a weight becomes zero, the coefficient of Pi is zero and, control point Pi has no impact on the computation of C(u) for any u(i.e., Pi is "disabled").
Properties of NURBS Curves • A NURBS curve of degree 6 defined by 9 control points (n = 8) and 16 knots (m = 15). The selected control point is P4. Since the coefficient of P4, N4,6(u), is non-zero on [u4, u4+6+1) = [0,1), changingw4 affects the entire curve!
Rational Bézier Curves
Rational Bézier Curves • We have learned that projecting a 4-dimensional B-spline curve to hyperplane w=1 yields a 3-dimensional NURBS curve. What if this B-spline curve is a Bézier curve? The result is aRational Béziercurve!
Rational Bézier Curves • Since a rational Bézier curve is a special case of NURBS curves, rational Bézier curves satisfy all important properties that NURBS curves have. • since there is no internal knots, rational Bézier curves do not have the local modification property, which means modifying a control point or its weight will cause a global change
Rational Bézier Curves Modifying the weight of a control point will push or pull the curve away from or toward the control point.
Rational Bézier Curves: Conic Sections
Rational Bézier Curves: Conic Sections • we use rational Bézier curve of degree 2, the coefficients are:
Rational Bézier Curves: Conic Sections • The equation of this rational Bézier curve of degree 2 is : P0=1 P1=w P2=1
Rational Bézier Curves: Conic Sections P0=1 P1=w P2=1
Rational Bézier Curves: Conic Sections Circular Arcs and Circles • Weights w is equal to the sine of the half ngle at control point P1
Rational Bézier Curves: Conic Sections Quarter Circle: • P1=90º, a=45º,
Rational Bézier Curves: Conic Sections 1/3 Circle: • P1=60º, a=30º,
Rational Bézier Curves: Conic Sections Full Circle: