Type to enter a caption. Computer Graphics Week 10 Lecture 2
Approximation Splines
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
Example
Some approximation Methods Bezier curves B-Splines Beta-Splines
Developed by French Automobile Engineer , Pierre Bezier ,Who worked for Renault Used widely Very Conveniant to Calculate and use Bezier Curve
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
BEZ BEZ are called Bernstein Polynomials
Examples
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 .
Contd... Control graph: A polyline connecting the control points in sequence . It tell’s us the approximate shape of the curve.
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)
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)
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
Cubic Bezier Curves The blending functions for the cubic Bezier Curves comes out to be : The blending functions are weights of control points
Contd....
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
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
Pseudo code
The End
Text
Text
Text –Johnny Appleseed