Blossoms Bezier Curve Construction Reminder Successive linear - - PowerPoint PPT Presentation
Blossoms Bezier Curve Construction Reminder Successive linear - - PowerPoint PPT Presentation
Blossoms Bezier Curve Construction Reminder Successive linear interpolations at point t Each point can be found as a function of the parameter, t , and the control points, b i n n i t n b t = i ,n b i = i
Bezier Curve Construction Reminder
- Successive linear
interpolations at point t
- Each point can be found
as a function of the parameter, t, and the control points,
- bt=∑
i=0 n
i ,nbi=∑
i=0 n
n i t
i1−t n−1bi
bi
Changing parameters
- We can interpolate
using a vector of values
- btb[t1,t 2...tn]
b0 b2 b1 b0
1[t]
b1
1[t]
b0
2[t ,t]
t=0.5
Changing parameters
- We can interpolate
using a vector of values
- This is the polar form of
function.
b0 b2 b1 b0
1[t1]
b1
1[t1]
b0
2[t1,t 2]
b0
2[t1,t3]
t1≈0.5 t 2≈0.25 t3≈0.75
btb[t1,t 2...tn]
Affect of changing Parameters
- Red:
; Green:
- Can also fix one or
more parameters
b[t ,t] b[t ,t
2]
Polar Representation
- For each parametric function univariate function,
, there is a comparable multivariate function
- Instead of one parameter, we expand the function to
have one parameter for each degree of freedom.
pt:ℝℝ
n
P[t0,t1 ,t 2...tn]= pt
Examples
- The polar form of a standard cubic polynomial is
- A bivariate quadratic function, in parametric and
polar form, is
pt=a0a1ta2t
2a3t 3
P[t1,t 2,t3]=a0 a1 3 t1t 2t3 a2 3 t1t2t 2t3t3t1a3t1t2t3 x= x , y , f x=x
23xy2y 2
F [ x0, x1]=x0 x1 3 2 x0 y1 3 2 x1 y02 y0 y1
Blossoms
- A multivariate function
represents the polar form of a polynomial function.
- This polar form function is known as a blossom
b[t1,t 2,...t n]
Properties
- If
, then the function diverges to a standard parametric curve
– Example, using the standard cubic –
- This is the definition of the polar form of a function.
t 0=t1=...=tn P[t ,t ,t ]=a0 a1 3 ttt a2 3 t
2t 2t 2a3t 3
a0a1ta2t
2a3t 3= pt
Properties (Cont.)
- Symmetric
– Proof is Menalaos' Theorem
- Affine
- Both these properties can be extended to n degrees
- f freedom
b[s ,t]=b[t , s] b[ rs ,t]= b[r ,t]b[s ,t ], =1
Menelaos' Theorem
- We can define the
following points
- We will see shortly why the parameter
switching in the s terms is allowed
b[0,t]=1−tb0t b1 b[s ,0]=1−sb0sb1 b[1,t]=1−tb1t b2 b[s ,1]=1−sb1sb2
Menelaos' Theorem (cont.)
- We further define 2
more points
- Menalaos' theorem
states:
b[s ,t]=1−tb[s ,0]t b[s ,1] b[t , s]=1−sb[0,t]sb[1,t] b[s ,t]=b[t , s]
Menalaos' Theorem (Proof)
- Can switch the parameters (Symmetric)
- The extension to n degrees of freedom is trivial
(leave some parameters untouched
b[s ,t]=1−tb[s ,0]tb[s ,1] 1−t1−sb0[1−tst1−s]b1stb2 1−sb[0,t]sb[1,t]=b[t , s]
Multi-Affinity
- Blossoms are affine invariant with respect to the 1st
parameter.
- We then apply the property of symmetry to extend
to other parameters.
n-Degree Properties
- Symmetric
–
denotes a permutation of the n arguments
b[t1,t 2,...tn]=b[t1,t2,...t n] t1,t 2,...tn
n-Degree Properties (Cont
- Multiaffinity
– Example
b[ rs,*]= b[r ,*][s ,*], =1 b[t1,t 2,t3]=1−t1b[0,t 2,t3]t1b[1,t2,t3]
Properties (Cont)
- Diagonalization
–
- One last property: Vector notation
– – Example,
t1=t 2....=tn=t , b[t ,t ,... ,t]=b[t
〈n〉]
b[ b−a,*]=b[b ,*]−b[a ,*] a=0,b=1,b−a= 1 b[ 1, r , s]=b[1,r , s]−b[0,r , s]
Leibniz Formula
- When given a blossom argument of form
we get the following formula:
rs
〈n〉
b[ rs
〈n〉]=∑ i=0 n
n i
i n−i b[r 〈i〉 , s 〈n−i〉]
Leibniz Formula, Proof
- We prove via induction
- The initial case is trivial
n=1: b[ rs]= b[r]b[s]
Leibniz Formula, Cont.
- Inductive step:
- We transform the indexes, and
r s
〈n1〉=∑ i=0 n
n i
i n−i b[ r s ,r 〈i〉 , s 〈n−i 〉]=...
∑
i=0 n
n i
i1 n−i b[r 〈i1〉 , s 〈n−i 〉]∑ i=0 n
n i
i n1−i b[r 〈i〉 , s 〈n1−i〉]
rs
〈n1〉=...
∑
i=0 n1
n i−1
i n1−i b[r 〈i 〉, s 〈n1−i〉]∑ i=0 n1
n i
i n1−i b[r 〈i〉 , s 〈n1−i〉]
Leibniz Formula, Conclusion
- We last use the recursion
- We combine the 2 summations, and conclude
-
n1 i = n i−1 n i b[ rs
〈n1〉]=∑ i=0 n1
n1 i
i n1−i b[r 〈i 〉, s 〈n1−i 〉]
Uses of Blossoms
- Remember the de Casteljau Algorithm.
- Given a control polygon
and , this interpolation results in:
b0, b1,...bn t∈[0,1] b0, b1, b2, b3 b0
1, b1 1, b2 1
b0
2, b1 2
b0
3
- Add new parameter for each interpolation
b0, b1, b2, b3 b0
1[t1] ,
b1
1[t1] ,
b2
1[t1]
b0
2[t1,t 2] ,
b1
2[t1,t2]
b0
3[t1,t 2,t3]
Evaluation
- To evaluate, we must first check special arguments
- Can repeat for all control points:
[t1,t2,t3]=[0,0,0] bi=b[0
〈n−i〉 ,1 〈i〉]
b0, b1, b2, b3 b0, b1, b2 b0, b1 b0 b0=b[0,0,0]
Evaluation Cont
- We next evaluate at
- We continue in the same manner to get
[t1,t2,t3]=[0,0,t] b0, b1, b2, b3 b0, b1, b2 b0, b1 b0
1
b0
1=b[0,0,t]
b[0,0,0] , b[0,0,1] , b[0,1,1], b[1,1,1] b[0,0,t] , b[0,t ,1] , b[t ,1,1] b[0,t ,t] , b[t ,t ,1] b[t ,t ,t]
Bezier Curves with Blossoms
- We can now rewrite the recursion algorithm as
- Using the blossom formulation, and the substitution
We can now rewrite the Leibniz Formula
b[0
〈n−r−i〉 ,t 〈 r〉 ,1 〈i〉]=...
1−tb[0
〈n−r−i1〉 ,t 〈r−1〉 ,1 〈i〉]t b[0 〈n−r−i〉 ,t 〈r−1〉 ,1 〈i1〉]
t=1−t⋅0t⋅1 b[t
〈n〉]=∑ i=0 n
n i t
i1−t i−i b[0 〈n−i〉 ,1 〈i〉]=∑ i=0 n
i ,n⋅bi
Derivative of the Bezier Blossom Curve
- Tangent line is line connecting the last 2
interpolation points
b' t=n⋅b[t
〈n−1〉 ,
1]=n⋅b[t
〈n−1〉 ,1]−b[0,t 〈n−1〉]
Derivative, Proof
- We start with the following:
– t is a point on the real line is a 1D vector
v d b' dt =lim
v
1 ∣ v∣[b[t v
〈n〉]−b[t 〈n〉]]=...
lim
v
1 ∣ v∣[∑
i=0 n
n i b[t
〈n−i 〉 ,
v
〈i 〉]−b[t 〈n〉]]
b[t v
〈n〉]=∑ i=0 n
b[t
〈n−i〉 ,
v
〈i〉]
Proof, Cont.
- We cancel, rearrange, and factor, and:
- We observe that,
and that the limit annihilates the remaining terms, giving us
d b' dt =lim
v 0 nb[t 〈n−1〉 ,
v ∣ v∣] n 2b[t
〈n−2〉 ,
v ∣ v∣ , v]... v ∣ v∣= 1 b'=nb[t
〈n−1〉,
1]
High Order Derivative
- Using a similar pattern and proof, we arrive at
b
r=
n n−r! b[t
〈n−r〉 ,
1
〈r〉]
Bezier Blossom Subdivision
- Subdivision of a bezier curve at t=c
ci , f =b[0
〈n−i〉 ,c 〈i〉]
ci ,b=b[c
〈n−i〉 ,1 〈i 〉]
b[0,0,0] , b[0,0,1] , b[0,1,1], b[1,1,1] b[0,0,c], b[0,c ,1] , b[c ,1,1] b[0,c ,c] , b[c ,c ,1] b[c ,c ,c]
Bezier Degree Raising
- The new control points can be found by
- This is the average of all the points, with the
argument
- mitted from the sum
b
1= 1
n1∑
j=0 n1
b[t1,...t n1│t j] t j
Degree Raising Cont.
- Need Diagram of Example
Blossoms and B-Splines
- The control points for a quadratic Bezier curve are
b[0,0], b[0,1], and b[1,1].
– Successive pairs from the sequence: 0,0,1,1.
- We generalize
0,0,1,1 u0,u1,u2,u3
b[u ,u]=... u2−u u2−u1 b[u1,u] u−u1 u2−u1 b[u ,u2]=... u2−u u2−u1 u2−u u2−u0 b[u0 ,u1] u−u0 u2−u0 b[u1 ,u2]... u−u1 u2−u1 u3−u u3−u1 b[u1 ,u2] u−u1 u3−u1 b[u2 ,u3]
- We use the following identities:
- We can do the recursion
u= ui−u ui−u j u j u−u j ui−u j ui
b[u0,u1] , b[u1,u2] , b[u2,u3] b[u1,u] , b[u ,u2] b[u ,u]
B-Spline Blossoms
- Let
, an interval in a sequence of knots
- Ordered sets of successive knots,
such that each set contains
- r
- The set
is defined such that
– Consists of r+1 successive knots – Is the (r-i)th element in
U=[uI ,uI 1] U i
r
U i
r
uI uI1 U i
r
U i
r
uI U i
r
U i
r
- The control points for a B-Spline curve can be
defined as
- The point on the curve
are computed recursively
- The derivative is, similar to a Bezier derivative,
d i=b[U i
n−1]
b[u
〈n〉]
d i
ru=b[u 〈r〉 ,U i n−1−r] ,
r=1,... ,n; i=0,... ,n−r b' [u
〈n〉]=nb[u 〈n−1〉,
1] b
r[u 〈n〉]=
n! n−r! b[u
〈n−r〉 ,
1
〈r〉]
B-Spline Blossom Example 1
B-Spline Example 2
- Given a portion of a knot sequence and interval:
- If n=3, the evaluation is:
- k=...u3,u4,u5,u6,u7,u8,...;
U =[u5,u6] b[u3,u4,u5] , b[u4,u5,u6], b[u5,u6,u7] , b[u6,u7,u8] b[u ,u4,u5] , b[u ,u5,u6] , b[u ,u6,u7] b[u ,u ,u5] , b[u ,u ,u6] , b[u ,u ,u]
- We can now write this as:
b[u3,u4,u5] , b[u4,u5,u6], b[u5,u6,u7] , b[u6,u7,u8] b[u ,u4,u5] , b[u ,u5,u6] , b[u ,u6,u7] b[u ,u ,u5] , b[u ,u ,u6] , b[u ,u ,u] b[U 0
2] ,
b[U 1
2] ,
b[U 2
2] ,
b[U 3
2]
b[u ,U 0
1],
b[u ,U 1
1],
b[u ,U 2
1]
b[u ,u ,U 0
0] ,
b[u ,u ,U 1
0],
b[u ,u ,u]
Knot Insertion
- A B-Spline defined over the interval, U, with control
points
- every n-tuple of successive knots
- If we insert the knot
into the knot vector, the new control points are
– These are all n-tuples of the new knots containing at
least 1 of the original endpoints of U
u d [U i
n−1]
d [ U i
n−1]
Knot Insertion
Degree Raising
- Let
be a sequence of n+1 real numbers
- Let
be the sequence with the value removed
- V
n│vi
V
n
vi b[V
n1]= 1
n1∑
i=1 n1
b[V
n1│vi]
Degree Raising Example
- Say we define a B-Spline over
- The interval
becomes the interval
- Knowing that
u0=u1=u2 ,u3,... [u4,u5] [ u7, u8] d 4= d 7[ u4, u5, u6, u7]=... 1 4 d 4[ u4, u5, u6]d 4[ u4, u5, u7]d 4[ u4, u6, u7]d 4[ u5, u7, u7] u4= u5=u3 , u6= u7=u4 d 4=1 2 d 4[u3,u3,u4]d 4[u3,u4,u4]
Smoothness
- In general, if a knot u has multiplicity r then a B-
Spline of degree n has smoothness at that knot
- The highest order osculant at a given knot is
C
n−r
- n−ru=b[
u
〈r〉,u 〈n−r〉]