Polar forms

advertisement
Polar forms
Michael S. Floater
August 25, 2011
These notes study the polar form of a polynomial and use it to develop
further aspects of Bezier curves and surfaces such as subdivision and smoothness conditions.
1
The polar form
Every polynomial of degree ≤ n,
p(x) =
n
X
ai xi ,
ai ∈ R,
(1)
i=0
has a unique n-variate polar form or blossom P . The polar form P is the
unique polynomial P (x1 , x2 , . . . , xn ) that is
(i) symmetric,
(ii) multi-affine, and
(iii) agrees with p on its diagonal.
By symmetric we mean that P has the same value if we swap any two variables xi and xj :
P (. . . , xi , . . . , xj , . . .) = P (. . . , xj , . . . , xi , . . .).
By multi-affine we mean that P is affine with respect to each variable: if
x1 = (1 − λ)x + λy,
1
then
P (x1 , x2 , . . . , xn ) = (1 − λ)P (x, x2 , . . . , xn ) + λP (y, x2, . . . , xn ),
and similarly for the other variables. By the the diagnonal property we
understand that
P (x, x, . . . , x) = p(x).
| {z }
n
We will see in the next section that the polar form is unique, but to see
that p has such a polar form, just replace each term xi in (1) by the expression
.n
X
.
(2)
xk1 xk2 · · · xki
i
1≤k <k <···<k ≤n
1
2
i
For example, the quadratic
p(x) = a0 + a1 x + a2 x2
has the bivariate polar form
P (x1 , x2 ) = a0 + a1
x1 + x2
+ a2 x1 x2 ,
2
and the cubic
p(x) = a0 + a1 x + a2 x2 + a3 x3
has the trivariate polar form
P (x1 , x2 , x3 ) = a0 + a1
x1 + x2 + x3
x1 x2 + x1 x3 + x2 x3
+ a2
+ a3 x1 x2 x3 .
3
3
The symmetry and multi-affine properties
of P are easily verified from (2).
n
The diagonal property holds because i is the number of terms in the sum
in (2).
We will use the polar form to derive various properties of Bezier curves
without needing the explicit formula (2). It is the defining properties (i), (ii),
(iii) that are important.
2
2
de Casteljau’s algorithm
We now view the control points of Bezier curves and the points in de Casteljau’s algorithm in a new light, in terms of the polar form. Let p be a Bezier
curve on the interval [a, b], i.e.,
p(t) =
n
X
ci Bin (u),
c i ∈ Rd ,
i=0
where u = (t − a)/(b − a). We will now establish the remarkable fact:
Theorem 1 If P is any n-variate polar form of the polynomial p then
ci = P(a, . . . , a, b, . . . , b).
| {z } | {z }
n−i
i
Proof. For each r = 0, 1, . . . , n and i = 0, 1, . . . , n − r, let
cri = P(a, . . . , a, b, . . . , b, t, . . . , t).
| {z } | {z } | {z }
n−r−i
i
r
Then by the symmetry and multi-affine properties of P and the fact that
t = (1 − u)a + ub,
it follows that
r−1
cri = (1 − u)cir−1 + uci+1
.
(3)
Therefore the points cri satisfy de Casteljau’s algorithm and
cn0 =
n
X
c0i Bin (u).
i=0
So by the diagonal property of P,
p(t) =
n
X
c0i Bin (u).
i=0
Since this holds for all t and the Bin are linearly independent, c0i = ci .
3
2
In fact the n-variate polar form is unique. To see this suppose that P
and Q are n-variate polar forms of p, and let t1 , . . . , tn ∈ R. For each
r = 0, 1, . . . , n and i = 0, 1, . . . , n − r, let
cri = P(a, . . . , a, b, . . . , b, t1 , . . . , tr ),
| {z } | {z }
n−r−i
and
i
dri = Q(a, . . . , a, b, . . . , b, t1 , . . . , tr ).
| {z } | {z }
n−r−i
i
By the symmetry and multi-affine properties of P and Q and since
tr = (1 − ur )a + ur b,
where ur = (tr − a)/(b − a), we have the recursions
r−1
cri = (1 − ur )cir−1 + ur ci+1
,
and
r−1
dri = (1 − ur )dir−1 + ur di+1
.
By the theorem, c0i = d0i = ci , and so by induction on r, cri = dri . Hence,
cn0 = dn0 , or equivalently,
P(t1 , . . . , tn ) = Q(t1 , . . . , tn ).
3
Subdivision
One application of the polar form is to subdivision. Consider the two outer
diagonal rows of points in the de Casteljau algorithm (3),
c00 , c10 , . . . , cn0 ,
and
cn0 , c1n−1 , . . . , c0n .
By the theorem, these can be expressed in terms of P as
ci0 = P(a, . . . , a, t, . . . , t),
| {z } | {z }
n−i
and
i
cin−i = P(b, . . . , b, t, . . . , t).
| {z } | {z }
i
n−i
Therefore, again by the theorem, but applied to the sub-interval [a, t], we see
that the ci0 are the control points of p when represented as a Bezier curve on
[a, t], i.e.,
n
X
p(s) =
ci0 Bin (v),
i=0
4
where v = (s − a)/(t − a), and similarly, the cin−i are the control points of p
represented as a Bezier curve on the sub-interval [t, b],
p(s) =
n
X
cin−i Bin (w),
i=0
where w = (s − t)/(b − t).
The computation of the control points over the two intervals [a, t] and [t, b]
is known as subdivision. On subdividing p repeatedly, one can obtain the
Bezier control points of p on any number of adjacent sub-intervals [a0 , a1 ],
[a1 , a2 ], . . ., [ak−1 , ak ], with a0 = a and ak = b. Together, these polygons
form a composite polygon of p with kn + 1 vertices. As the sub-intervals
get smaller, the composite polygon tends to get closer to p. This offers an
alternative way of plotting the Bezier curve p. The obvious way of plotting
p is to sample it at several parameter values tj ∈ [a, b] and plot the polygon
formed by the points p(tj ). We can instead subdivide p a few times and plot
its composite control polygon.
4
Joining curves together
Another application of the polar form is the derivation of the continuity
conditions for joining Bezier curves together smoothly. Earlier we derived
the conditions for C r continuity of orders r = 0, 1, 2 from the formulas for
endpoint derivatives. We now use the polar form to obtain the general C r
continuity conditions.
Consider first the situation that both p and q are Bezier curves defined
on the same interval [a, b];
p(t) =
n
X
ci Bin (u),
q(t) =
i=0
n
X
di Bin (u),
i=0
where u = (t − a)/(b − a). We showed earlier that the k-th derivative of p
at the end point t = a is
n!
p(k) (a) =
∆k c0 .
(n − k)!(b − a)k
It follows from this that p and q have the same derivatives at t = a of orders
k = 0, 1, . . . , r if and only if
di = ci ,
i = 0, 1, . . . , r.
5
Suppose then that p is as above but that q is a Bezier curve defined on
an adjacent interval [b, c],
q(t) =
n
X
di Bin (v),
i=0
where v = (t − b)/(c − b). The condition for C r continuity between p and q
at t = b is therefore
di = ei ,
i = 0, 1, . . . , r,
where e0 , . . . , en are the control points of p with respect to the parameter
interval [b, c], i.e., such that
p(t) =
n
X
ei Bin (v).
i=0
The points ei can be computed from de Casteljau’s algorithm applied to p
on [a, b] with t = c, so the condition reduces to
di =
i
X
cn−i+j Bji (µ),
i = 0, 1, . . . , r,
j=0
where µ = (c −a)/(b−a). This agrees with what we derived earlier for r ≤ 2.
5
Triangular Bezier surfaces
As for polynomials of one variable, there is a polar form for polynomials of
several variables. Consider the bivariate polynomial,
X
p(x, y) =
ai,j xi y j .
(4)
i+j≤n
We can view it as a function of the single variable x = (x, y) ∈ R2 . There is
a unique n-variate polar form P for p in which each variable is also a point
in R2 . The polar form, P (x1 , x2 , . . . , xn ), xk ∈ R2 , is, as before, uniquely
defined by three properties: that it is (i) symmetric, (ii) multi-affine, and
(iii) agrees with p(x) on its diagonal. The polar form can be obtained from
p by replacing the term xi y j in (4) by the expression
.
X
n!
xk1 xk2 · · · xki yℓ1 yℓ2 · · · yℓj
.
(5)
i!j!(n − i − j)!
6
Here the sum is over all distinct pairs of sequences
1 ≤ k1 < k2 < · · · < ki ≤ n,
1 ≤ ℓ1 < ℓ2 < · · · < ℓj ≤ n,
i.e., such that ℓβ 6= kα . For example, the quadratic
p(x) = a0 + a10 x + a01 ya20 x2 + a11 xy + a02 y 2
has the bivariate polar form
P (x1 , x2 ) = a0 +a10
x1 + x2
y1 + y2
x1 y2 + x2 y1
+a01
+a20 x1 x2 +a11
+a02 y1 y2 .
2
2
2
The monomials p(x) = xy and p(x) = x2 y have the trivariate polar forms
1
P (x1 , x2 , x3 ) = (x1 y2 + x1 y3 + x2 y1 + x2 y3 + x3 y1 + x3 y2 ),
6
and
1
P (x1 , x2 , x3 ) = (x1 x2 y3 + x1 x3 y2 + x2 x3 y1 ),
3
respectively. As in the univariate case, the symmetry and multi-affine properties of P are easily verified from (5), and the diagonal property holds because
n!/(i!j!(n − i − j)!) is the number of terms in the sum.
Suppose now that p is a triangular Bezier surface in Rd ,
X
p(t) =
ci Bin (u),
c i ∈ Rd ,
|i|=n
over the triangular parameter domain T = [a1 , a2 , a3 ] ⊂ R2 , where i =
(i, j, k), |i| = i+j+k, and u = (u1 , u2, u3 ) is the set of barycentric coordinates
of t with respect to T .
In analogy to the previous theorem, one can show that if P is the polar
form of p, then
ci = P(a1 , . . . , a1 , a2 , . . . , a2 , a3 , . . . , a3 ).
| {z } | {z } | {z }
i
j
k
This can be done by defining the points
cri = P(a1 , . . . , a1 a2 , . . . , a2 , a3 , . . . , a3 , t, . . . , t),
| {z } | {z } | {z } | {z }
i
j
k
7
r
|i| = n − r,
(6)
and showing that these are the points in the de Casteljau algorithm for
finding p(t). One can further demonstrate the uniqueness of P by replacing
the t’s in (6) by t1 , . . . , tr .
In analogy to the univariate case, since
cki,j,0 = P(a1 , . . . , a1 a2 , . . . , a2 , t, . . . , t),
| {z } | {z } | {z }
i
j
i + j + k = n,
k
these are the control points of the representation of p on the sub-triangle
[a1 , a2 , t].
Finally, consider the conditions for two triangular Bezier surfaces to join
with C r continuity. Suppose that a4 ∈ R2 is any point on the side of the edge
[a1 , a2 ] opposite to a3 , and let p̃ be a Bezier surface on the adjacent triangle
U = [a1 , a2 , a4 ],
X
c̃i Bin (ũ),
p̃(t) =
|i|=n
where ũ = (ũ1 , ũ2 , ũ4 ) and the values ũ1 , ũ2 , ũ4 are the barycentric coordinates
of t with respect to U.
In analogy to the univariate case, the condition for p and p̃ to join with
C r continuity on the common edge [a1 , a2 ] is that
c̃i,j,k = ei,j,k ,
k = 0, 1, . . . , r,
i + j = n − k,
where the points ei,j,k are the control points of p when represented as a
Bezier surface over U. These points can be computed from the de Casteljau
algorithm for p on T with t = a4 , and the C r condition reduces to
X
k
c̃i,j,k =
ci+α,j+β,γ Bα,β,γ
(µ),
k = 0, 1, . . . , r, i + j = n − k,
α+β+γ=k
where µ = (µ1 , µ2 , µ3 ) is the set of barycentric coordinates of a4 with respect
to T .
8
Download