Presentation is loading. Please wait.

Presentation is loading. Please wait.

Type to enter a caption. Computer Graphics Week 10 Lecture 2.

Similar presentations


Presentation on theme: "Type to enter a caption. Computer Graphics Week 10 Lecture 2."— Presentation transcript:

1 Type to enter a caption. Computer Graphics Week 10 Lecture 2

2 Approximation Splines

3 Interpolation and Approximation
When polynomial sections are fitted such that all control points are connected When a polynomial curve is fitted such that some or all the control points are not on the generated curve The control points specify the general path of the curve

4 Example

5 Some approximation Methods
Bezier curves B-Splines Beta-Splines

6 Developed by French Automobile Engineer , Pierre Bezier ,Who worked for Renault
Used widely Very Conveniant to Calculate and use Bezier Curve

7 Bezier Curve Most conveniently specified by blending functions
For n+1 control points, the Bezier curve technique produces a polynomial of order n Let pk represent control points & P(u) be the equation of desired Bezier curve, then where, BEZ are the blending functions

8 BEZ BEZ are called Bernstein Polynomials

9 Examples

10 Some terminologies Convex Hull : Boundary of space formed by a set of control points Bounded space should be a convex polygon Imagine a rubber band being strecthed out on control points. Some control points will lie on boundary and some inside .

11 Contd... Control graph: A polyline connecting the control points in sequence . It tell’s us the approximate shape of the curve.

12 Properties of Bezier Curve
The starting and the ending point of Bezier curve is same as the first and the last control point respectively. i.e. P(0)=p0 and P(1)=pn The Parametric derivatives at the endpoints of curve are From above we can see that the gradient of the curve at the beginning is along the line joining the first and second control point and the gradient of the curve at the end is along the line joining the last two control points The Bezier Curve always lie within its convex hull. This is because curve is a weighted sum of control points. And sum of weights =1 (weights are all +ve)

13 Properties of Bezier Curve
The second parametric derivative of curve at control points is: Does not allow for local control (more on this on Cubic Bezier curves)

14 Design Techniques for Bezier Curve
If first and last control points are same then curve forms a close loop Since the Bezier curve is a weighted sum of control points so specifying 2 control points at the same position will give that point more weight (importance). Curve will bend towards it For making complicated curves , instead of making one large Bezier curve we piece together several smaller curves (How to do this → on board) We mostly piece together cubic Bezier Curves

15 Cubic Bezier Curves The blending functions for the cubic Bezier Curves comes out to be : The blending functions are weights of control points

16 Contd....

17 Example For a Bezier Curve with control points p0(1,1), p1(2,3) , p2(3,1) , p3(4,3) Find parametric equation of the curve. Find values at u = 0.15 and and 0.35

18 Ans x(u) = (1-u)3 + 6u * (1-u)2 + 9u2 * (1-u) + 4*u3
y(u) = (1-u)3 + 9u * (1-u)2 + 3u2 * (1-u) + 3*u3 x(0.15) = 1.45 ,y(0.15) =1.657 x(0.35) = 2.05 ,y(0.35) =1.973

19 Pseudo code

20 The End

21

22 Text

23

24 Text

25 Text –Johnny Appleseed


Download ppt "Type to enter a caption. Computer Graphics Week 10 Lecture 2."

Similar presentations


Ads by Google