Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bezier Curves and Splines David Eno MAT 499 Fall ‘06.

Similar presentations


Presentation on theme: "Bezier Curves and Splines David Eno MAT 499 Fall ‘06."— Presentation transcript:

1 Bezier Curves and Splines David Eno MAT 499 Fall ‘06

2 Introduction In Engineering, one often wants a smooth curve through a set of known points. In Physics, a smooth curve is required to represent the shape of a deflected beam. Computer Aided Design and Manufacturing programs like lines and circular arcs. –Lots of things cannot be conveniently described by lines and circular arcs.

3 Bézier Curves Bézier Curves were first developed in 1959 by Paul de Casteljau. They were popularized in 1962 by French engineer Pierre Bézier, who used them to design automobile bodies.

4 Quadratic Bézier Curves Given three points P 0, P 1, and P 2, a quadratic Bézier curve is the path traced by the parabolic function:

5 Quadratic Bézier Curve Given points P 0, P 1, P 2.

6 Quadratic Bézier Curve Given points P 0, P 1, P 2. Construct a line from (1-t)P 0 + tP 1 to (1-t)P 1 + tP 2

7 Quadratic Bézier Curve Given points P 0, P 1, P 2. Construct a line from (1-t)P 0 + tP 1 to (1-t)P 1 + tP 2 The point, x, is on the curve.

8 Quadratic Bézier Curve Given points P 0, P 1, P 2. Construct a line from (1-t)P 0 + tP 1 to (1-t)P 1 + tP 2 The point, x, is on the curve.

9 Bézier Curve Advantages 3 points uniquely determine a parabola. It’s easy to calculate points. The numerical algorithm is stable. (i.e. given reasonable input, the algorithm won’t blow up.)

10 Cubic Bézier Curve Extending this method to use four points, we can construct a cubic curve. (1-t) 3 P 0 + 3t(1-t) 2 P 1 + 3t 2 (1-t)P 2 + t 3 P 3

11 In General… To construct an n th degree Bezier curve, you need n+1 control points. The formula for a point on the curve is:

12 Recursion Pseudo code for recursive technique: makeBezier(Control Points) If points are collinear enough Output last point Else Subdivide points makeBezier(Left Control Points) makeBezier(Right Control Points) End If

13 Bezier Splines We typically want a smooth curve that passes though a set of points. Problem: The first and last control points are the only ones guaranteed to be on a Bezier Curve. A Solution: Use Bezier Splines, which are composite (i.e. piecewise) Bezier Curves. –But then we need to compute control points.

14 Cubic Bezier Splines We could make splines from Bezier curves of any degree. We choose cubic (degree = 3) curves for the following reasons: –In modeling the bending of beams because of the "bending moment" (which is related to equilibrium) is proportional to the second derivative (i.e. C2) of the displacement function and to be physically valid there must be bending moment continuity from one element to the next. –Cubic polynomials allow for inflection points. –The computations aren’t horrible.

15 P0P0 P1P1 P2P2 P3P3 P4P4

16 P 0 =b 0,0 P 1 =b 0,3 =b 1,0 P2P2 P3P3 P4P4 b 0,1 b 0,2

17 Computing Control Points Condition: C0 continuity –Each curve has to start where the previous one ends. In general, Or

18 Computing Control Points Condition: C1 continuity –The slopes have to match at the common endpoints. –So set first derivatives equal.

19 Computing Control Points Condition: C2 continuity –Provides better smoothing. –Gives us a unique solution. Arbitrarily let

20 Computing Control Points

21 NURBS Add a Weight coordinate.

22 Questions and Comments How do you prevent cusps? Can de Casteljau’s algorithm be modified to construct NURBS?

23 Further Direction(s) B-splines provide local control over the spline, we think.


Download ppt "Bezier Curves and Splines David Eno MAT 499 Fall ‘06."

Similar presentations


Ads by Google