Download presentation
Presentation is loading. Please wait.
1
Curve design 455
2
Parametric curves as trajectories
We can interpret a parametric equations of a curve as time-trajectory of a point in the plane x=x(t) y=y(t) t=tmiddle t=tend t=tstart
3
Smoothness of Motion The velocity v(t) characterize the direction and speed of the movement v(t)
4
Tangent line The tangent line to curve P(t) at t=t0 can be given in parametric form L(u) having parameter u. L(u)= P(t0) + v(t0)u
5
Normal direction The normal direction to curve P(t) at t=t0 can be expressed as n(t0)= vperp(t0)=(-dy/dt,dx/dt)t=t0
6
Parametric Continuity
P(t) is k-smooth in [a,b] if all derivatives of the curve, up to the kth, exist and are connected. k-th degree polynomials a0 + a1t + a2t aktk are k-smooth
7
Interactive Curve Design
User defines the set of control points to create a curve
8
The interactive design process
Lay down the initial control points Use the algorithm to generate the curve If the curve is satisfactory, stop Adjust some control points Go to step 2
9
Polynomial Approximation
Approximation of points P0, P1,... , Pk Blending polynomials B0(t),B1(t),..., Bk(t) Intermediate points – affine combinations P(t)=P0*B0(t)+P1*B1(t)+...+Pk*Bk(t)
10
Approximation of points
Bezier curves – Bernstein polynomials B-splines – cubic B-spline polynomials
11
Bezier Curve de Casteljeau Algorithm A(t)=(1-t)P0 + t P1 B(t)=(1-t)P1+ t P2 P(t)=(1-t)A + t B =(1-t)2P0 +2 t(1-t) P1+ t2P2 P B A
12
Bezier Curve Approximation of 4 points P0, P1, P2, P P(t)=(1-t)3P0+3(1-t)2t P1+3(1-t) t2 P2+t3P3
13
Bezier Curve Approximation of 4 points P0, P1, P2, P3
Bernstein polynomials B0(t)=(1-t)3, B1(t)=3t(1-t)2, B2(t)= 3t2(1-t), B3(t)= t3 Intermediate points – affine combinations P(t)=P0*B0(t)+P1*B1(t)+P2*B2(t)+P3*B3(t)
14
Bezier Curve Convex hull property B0(t)+B1(t)+B2(t)+B3(t)=1 the curve is inside of the convex hull of control points – convex combination Interpolation P(0)=P0*B0(0)= P0 P(1)=P3*B3(1)= P3 Bezier spline interpolates end points of control polygon
15
Bezier Curve Matrix form (1, t, t2, t3)Bez(P0, P1, P2, P3)T
Bez =
16
Tangent to Bezier curve
Direction of the tangent vector at point P(t0): d(t0)=[¶x/ ¶t, ¶y/ ¶t, ¶z/ ¶t]t=t0 Equation of the tangent at point P(t0): q(u) = P(t0) + u* d(t0) Tangent at end points q0= P0 + u* (P1 - P0) q3= P3 + u* (P3 – P2)
17
Example Find Bezier-spline curve that is defined by the control polygon of points P0, ,, P3. P0=(3, -3), P1=(5, -2), P2=(5, 2), P3=(3, 3). a) Find the equations of the curve. b) Find the tangent line to the curve at the point corresponding to the value of parameter t=1.0 .
18
Example Matrix form (1, t, t2, t3)Bez(P0, P1, P2, P3)T
3 5 (1,t, t2, t3) = 3 + 6t - 6t2= x(t) -3 +3t +9t2 – 6t3 = y(t)
19
B-spline Approximation of 4 points P0, P1, P2, P3
Basic polynomials B0(t)=1/6* (1-t)3, B1(t)= 1/6* (4-6t2+3t3), B2(t)= 1/6* (1+3t+3t2-3t3), B3(t)= 1/6* t3 Intermediate points P(t)=P0*B0(t)+P1*B1(t)+P2*B2(t)+P3*B3(t)
20
B-spline Matrix form (1, t, t2, t3)Bspline(P0, P1, P2, P3)T
Bspline = 1/6*
21
Properties of B-splines
Convex hull property – sum of blending functions equal to 1. Not an interpolation ( none of control points lies on the spline curve) Smooth approximation – tangent at point Pi(1) has the same direction as tangent at Pi+1(0).
22
Knot Vector Multiply knots to force interpolation (0, 0, 0, 1, 2, 3, 4, 5, 5, 5) end points are interpolated. Repeating point in the sequence means its “larger” weight (0, 1, 2, 3, 3, 3, 4, 5) B-spline passes through point P3.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.