rational curve. rational curve parametric representations using polynomials are simply not powerful...

12
Rational Curve

Upload: samuel-paul

Post on 29-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational Curve

Page 2: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational curve

• Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses and hyperbolas) can not be obtained this way.

• to overcome – use rational curve

• What is rational curve?

Page 3: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational curve• Rational curve is defined by rational function.

• Rational function ratio of two polynomial function.

• Example • Parametric cubic Polynomial

- x(u) = au3 + bu2 + cu + d

• Rational parametric cubic polynomial

- x(u) = axu3 + bxu2 + cxu + dx

ahu3 + bhu2 + chu + dh

Page 4: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational curve• Use homogenous coordinate

• E.g • Curve in 3D space is represented by 4 coord (x, y, z, h).• Curve in 2D plane is represented by 3 coord.(x, y, h).

• Example (parametric quadratic polynomial in 2D)• P = UA

x(u) = axu2 + bxu + cx

y(u) = ayu2 + byu + cy

• P = [x, y] U = [u2 ,u, 1] A = ax ay• bx by

cx cy

Page 5: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational curve• Rational parametric quadratic polynomial in 2D

• Ph = UAh h – homogenous coordinates

• Ph = [hx, hy, h]

• Matrix A (3 x 2) is now expand to 3 x 3

• Ah =

hx = axu2 + bxu + cx

hy = ayu2 + byu + cy

h = ahu2 + bhu + ch

ax ay ah

bx by bhcx cy ch

Page 6: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational curve• If h = 1 Ph = [x, y, 1]

• 1 = h/h , x = hx/h, y = yh/h

x(u) = axu2 + bxu + cx

ahu2 + bhu + ch

y(u) = ayu2 + byu + cy

ahu2 + bhu + ch

h = ahu2 + bhu + ch = 1

ahu2 + bhu + ch

Page 7: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational B-Spline

• B-Spline P(u) = Ni,k(u)pi

• Rational B-Spline– P(u) = wiNi,k(u)pi

– wiNi,k(u)

– w weight factor shape parameters usually set by the designer to be nonnegative to ensure that the denominator is never zero.

Page 8: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational B-Spline

• B-Spline P(u) = Ni,k(u)pi

• Rational B-Spline– P(u) = wiNi,k(u)pi

– wiNi,k(u)

– The greater the value of a particular wi, the closer the curve is pulled toward the control point pi.

– If all wi are set to the value 1 or all wi have the same value we have the standard B-Spline curve

Page 9: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational B-Spline

• Example• To plot conic-section with rational B-spline, degree = 2

and 3 control points.• Knot vector = [0, 0, 0, 1, 1, 1]• Set weighting function

w0 = w2 = 1

w1 = r/ (1-r) 0<= r <= 1

Page 10: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

Rational B-Spline• Example (cont)

• Rational B-Spline representation isP(u) = p0N0,3+[r/(1-r)] p1N1,3+ p2N2,3

N0,3+[r/(1-r)] N1,3+ N2,3

We obtain the various conic with the following valued for parameter r

r>1/2, w1 > 1 hyperbola section

r=1/2, w1 = 1 parabola section

r<1/2, w1 < 1 ellipse section

r=0, w1 = 0 straight line section

Page 11: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

P0

Rational B-SplineP1

P2

w1 = 0

w1 < 1

w1 = 1

w1 > 1

Page 12: Rational Curve. Rational curve Parametric representations using polynomials are simply not powerful enough, because many curves (e.g., circles, ellipses

• Can provide an exact representation for quadric curves (conic) such as circle and ellipse.

• Invariant with respect to a perspective viewing transformation.we can apply a perspective viewing transformation to the control points and we will obtain the correct view of the curve.

Rational B-Spline : advantages