Lecture 8 Synthetic Curves

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Synthetic Curves - 2

(Reparameterization &
Bézier Curve)
Reparametrization
• For example: u ∈ [0, 1] (p(u)) v[1, 10] (q(v))
• Linear Mapping v = au + b
dv = a.du
qi = pi
qj = pj
• qv = dq/dv = (dq/du).(du/dv) = qu.1/a
u j − ui
q =
v
.p u
v j − vi

• Truncation
• Extension
• Subdivision 2
Analytical Curves in terms of
PC Curve
• Line (in terms of PC curve):
p u0 = (p1 − p 0 )
p1u = (p1 − p 0 )

B = p 0 p1 (p1 - p 0 ) (p1 - p 0 )T


P2
• Conics: p u0 = 4  (p 2 − p 0 )
p1u = 4  (p1 − p 0 )
»𝜌 = AB/ P2B
p0 u A
• 𝜌 = 0.5 – Parabola
𝜃 P1
• 0.5 < 𝜌 ≤ 1 – Hyperbola P0
B
• 𝜌 < 0.5 – Ellipse p1u
• 𝜌 = (1-cos𝜃)/(tan𝜃.sin𝜃) - Circular Curves 3
Synthetic (Approximating) Curves
• To avoid intermediary tangents:
puu (u1 = 1) = puu (u2 = 0)
• Curvature or C2 continuity
• Synthetic – approximating curves have C2 Continuity

4
Bézier Curve
• Defined by a set of data points
• Data points: used to control the shape of the
resulting curves
• Credited to P. Bézier of the French car firm Regie
Renault
• Developed about 1962 and used in his software
system called UNISURF
• UNISURF: used to define the outer panels of
several Renault cars
• Also independently developed by P. deCasteljau of
French car company Citroen (about 1959)
5
Bézier Curve

• Similar to Hermite, but …


– Do not explicitly specify the derivative
– Specify 2 more control points instead
– The new control points determine the derivatives
– More intuitive control than Hermite derivatives
– Shape controlled by defining points only – No
derivatives
– Allows the designer a much better feel for the
relationship between input (points) and output
(curves)
6
Bézier Curve
• Order/degree:
– Variable
– Related to the number of points defining it
– (n+1) points define an nth degree curve
– Smoother than PC curve because it can permit
higher order derivatives

• Data points: control points


– Form the vertices of control/characteristic polygon,
which uniquely defines the curve shape

7
Bézier Curve
P2
P1

P3 u=1

Pk Control points (vertices)


P0 u=0 ----- Characteristic polygon

•Only the first and last control points/vertices of the polygon


actually lie on the curve
•Other vertices control shape, i.e., define order & derivatives
•Curve is always tangent to the first and last polygon segments
•Curve shape tends to follow the polygon shape
8
Bézier Curve
• Curve shape can be predicted once its control points are known
• Important: Order of defining control points
• Parametrization direction is normally shown with Arrows

9
Bézier Curve

Cubic Bézier curve for various control points


10
Bézier Curve

Curves are of order 4 and 5 respectively

11
Bézier Curve
• For (n+1) control points curve is defined by:
n
p( u ) = p B
i =0
i i , n (u ) ,0  u  1

• Bézier Curve has a Bernstein basis

• Bernstein polynomial serves as the blending or basis


function for the Bézier Curve

i n −i
• Bernstein polynomial i , n
B (u ) = C ( n, i )u (1 − u )
where C(n,i) is the binomial coefficient and i → 0, …, n
12
Bézier Curve
• On expanding curve equation, we get

p(u) = p 0 (1 − u) n + p1C(n,1)u(1 − u) n−1 + p 2C(n,2)u 2 (1 − u) n−2 + ....


.......p n−1C(n, n − 1)u n−1 (1 − u) + p nu n , 0  u  1

13
Cubic Bézier Curve

p(u ) = (1 − u) p 0 + 3u(1 − u) p1 + 3u (1 − u)p 2 + u p3


3 2 2 3

• u = 0; curve passes through p0


• u = 1; curve passes through pn
pu (u ) = 3(1 − u) 2 (-1)p0 + 3[(1 − u) 2 + 2(1 − u)(−1)]p1 + 3[(1 − u)(2u) + u 2 (-1)]p 2 + 3u 2p3

At u = 0 : p u = 3(p1-p 0 ) p2

u = 1 : p u = 3(p 3-p 2 )

• Similarly, quadratic, quartic …


Bézier Curves p0 p1
Characteristics Polygon
14
Bézier Curve
• General Definition: n
p( u ) = p B
i =0
i i , n (u ) ,0  u  1

• Bi,n: Bernstein basis/ polynomials/ blending functions


n!
Bi ,n (u ) = u i (1 − u ) n −i
i!(n − i)!

• deCastaljau Algo

15
Characteristics of Bézier Curve
Based on properties of Bernstein polynomials
1.Curve passes through P0 and Pn if we substitute u = 0
and u = 1 in equation
2.Curve is tangent to the first and last segments of the
characteristic polygon
3.rth derivatives at the starting and ending points are:
n! r
 ( −1)r −i C ( r , i ) Pi , 0  u  1
r
P ( 0) =
( n − r )! i = 0
n! r
r
P (1) =  ( −1)i C ( r , i ) Pn −i , 0  u  1
( n − r )! i = 0

Therefore, the first derivatives at the end points are:


pu (0) = n(p1 − p 0 ) p u (1) = n(p n − p n−1 )
16
Characteristics of Bézier Curve
• Second derivative at P0 is determined by P0, P1, and P2
(3 Points)
• mth derivative at a point is controlled by (m+1) points
(i.e. its m neighboring vertices)
4. Curve must be symmetric w.r.t. u and 1-u
(reversing the direction of parameterization does not
change the curve shape or reverse parameterization
gives the same curve)

17
Characteristics of Bézier Curve
5. Interpolation polynomial Bi,n(u) has a max value of
C(n,i)(i/n)i(1-i/n)n-i occurring at u = i/n (from dBi,n/du =
0)
Each control point is most influential on the curve
shape at u = i /n
Magnitude of each Bernstein
B 3
polynomials proportional to
3

B 3
control points influence the
0 3
B
2 shape of the curve
B13 For a cubic Bézier Curve,
P0, P1, P2, and P3 are most
influential when u = 0, 1/3,
2/3, and 1, respectively 18
Characteristics of Bézier Curve
6.Curve shape can be modified by
• Changing one/more vertices of its polygon (Figure 1)
OR
• Keeping the polygon fixed and specifying multiple
coincident points at a vertex (Figure 2) – higher the
multiplicity (larger number of points at a
geometrical position), the more the curve is pulled
P’2 P1 , P2 , P3 P4
P1 P2

(Figure 1) (Figure 2)
P0 P3
P0 P5 19
Characteristics of Bézier Curve

7. A closed Bézier Curve can simply be generated by


closing its characteristic polygon or choosing P0, Pn
to be coincident
8. For any valid value of u (u ∈ [0, 1]), the sum of the
Bi,n functions associated with the control points is
always 1 for any degree Bézier Curve i.e.
n

B
i =0
i , n (u ) =1

• This fact can be used to check numerical


computations and software developments 20
Limitations of Bézier Curve
• Seems superior to the cubic spline curve
1.Local control is not possible
• Only global control nature
• One control point is changed, the whole curve changes
• Designer can not selectively change part of the curve
2.Degree of polynomial becomes higher if control points
are higher, i.e., Curve degree depends on the number
of data points that define the curve
• Solution B-spline curve
3.Control over parameterization not possible
• Solution Rational curve 21

You might also like