Bernstein-Bezier Splines on the Unit Sphere Victoria Baramidze Department of Mathematics Western Illinois University ABSTRACT I will introduce scattered data fitting problems on the sphere and discuss applications of spherical splines. I will define Bernstein-Bezier polynomials and describe methods based on spherical splines.
Introduction: Data fitting problems and differential equations. Differential calculus on the unit sphere BB-polynomials on spherical triangles BB-polynomial spline methods on the sphere
Data Fitting Let S 2 be the unit sphere in R 3. Suppose we are given a set of scattered locations on S 2 along with real numbers associated with these locations. The problem is to find a smooth function interpolating or approximating these data. Figure 1: Cubic minimal energy spline interpolating apple data.
Approximating Boundary Values V = 0 inside S 2 V = f on the surface of S 2. V (u) = 1 u 2 4π S 2 f(v) u v 3dσ. V (u) 1 u 2 4π S 2 s(v) u v 3dσ. Figure 2: Cubic spline fitting geo-potential boundary data.
Geometric Surface Design Figure 3: Minimal energy cubic interpolant of the point cloud.
Spherical PDE u t (v, t) u(v, t) = 0 v S 2, t (0, T ] u(v, 0) = f(v) v S 2 U + w 2 U = F
Spherical functions and Homogeneous Extensions Homogeneous functions in R 3 Definition: The function F : R 3 R is homogeneous of degree d if F (αx, αy, αz) = α d F (x, y, z) for all real α > 0. Examples: F (x, y, z) = xn y k G(x, y, z) = x y + 1
Homogeneous Polynomials The set of homogeneous polynomials of degree d H d := span{x i y j z k : i + j + k = d} is a vector space of dimension ( ) d+2 2. We are to agree that a zero function has an undefined degree of homogeneity or that its degree of homogeneity can take on any value. Spherical homogeneous polynomials are the elements of H d restricted to the unit sphere. Since x 2 + y 2 + z 2 = 1 we have the following inclusions: H 0 H 2 H 2n H 1 H 3 H 2n+1
Homogeneous Extensions Let f(x, y, z) be a function defined on the unit sphere. The function F (X, Y, Z) = ( X2 + Y 2 + Z 2 ) d f(x, y, z) is a homogeneous extension of f to R 3 \{0} of degree d. Here x = X X2 + Y 2 + Z 2 and similarly for Y and Z. Geometrically (x, y, z) is a radial projection of (X, Y, Z) onto the unit sphere. Examples: Spherical functions f(x, y, z) = 1 g(x, y, z) = e y have the homogeneous extensions F (X, Y, Z) = X 2 + Y 2 + Z 2 G(X, Y, Z) = e Y X 2 +Y 2 +Z 2 of degree d = 1 d = 0.
Differentiation For a given function f on the unit sphere let F denote the zero homogeneous extension of f to R 3 \{0}, i.e. where x = F (X, Y, Z) = f(x, y, z), X X 2 +Y 2 +Z 2, y = Y Z X 2 +Y 2 +Z2, and z = X 2 +Y 2 +Z 2. By the derivative of a spherical function f with respect to the Cartesian direction X we mean ( ) f X := F (X, Y, Z) X S 2. Examples: f(x, y, z) = 1 F (X, Y, Z) = 1 F (X, Y, Z) = 0 X f(x, y, z) = y F (X, Y, Z) = Y X2 + Y 2 + Z 2
X Y X F (X, Y, Z) = ( X 2 + Y 2 + Z 2 ) 3 D X f(x, y, z) = yx A derivative of a linear polynomial is a quadratic polynomial! Alternative Procedure for Differentiating Using the chain rule for partial derivatives we find X F (X, Y, Z) = f xx X + f y y X + f z z X, where f x, f y, f z are regular partial derivatives of f with respect to the first, second and third argument respectively. Restricting partial derivatives of f with respect to x, y, z to the sphere does not affect the derivatives since the differentiation and evaluation is done in terms of the spherical coordinates x, y, z only.
Calculating x X S 2 = 1 x 2 y X S 2 z X S 2 = yx = zx we obtain f X = (1 x 2 )f x yxf y zxf z f Y = yxf x + (1 y 2 )f y zyf y f Z = xzf x yzf y + (1 z 2 )f z. To simplify our notation let v denote a column vector with the components x, y, z. Let v X denote a column vector with the components x X, y X, z X. Then denoting f the gradient of f with respect to x, y, z we get f X f Y f Z = v T X f = v T Y f = v T Z f.
Example: Let f(x, y, z) = cos(x). Calculate the partials f x = sin(x) f y = 0 f z = 0. Then with respect to Cartesian coordiates: f X = (1 x 2 ) sin(x) f Y = xy sin(x) f Z = xz sin(x). Let p(x, y, z) be a polynomial of degree d 1 on the unit sphere. The derivatives p X, p Y, p Z are polynomials of degree d + 1. Let p(x, y, z) be a homogeneous polynomial on the unit sphere. The derivatives p X, p Y, p Z are homogeneous polynomials subject to 1 = x 2 + y 2 + z 2.
Second Order Partials Minimal energy interpolation and penalized least squares fit require second order derivative calculations. Laplace-Beltrami operator is a common differential operator involved in PDE s on the unit sphere. Definition: The spherical Laplacian of f, that is the Laplace- Beltrami operator, for a spherical function f is f = F XX S 2 + F Y Y S 2 + F ZZ S 2 = f XX + f Y Y + f ZZ. the sum of second order partial derivatives of F, the constant homogeneous extension of f, restricted to S 2. This definition is in agreement with how the Laplace s operator behaves for a function in R 3 if we switch to spherical coordinates r, θ, φ and set the partials with respect to the radius to zero.
We need a recursive definition for higher order derivatives which is consistent with the above, i.e. f XX = (F XX ) S 2 = ((f X ) X ) S 2 However, constant homogeneous extension of f X does not work. Example: Let f(x, y, z) = y. The constant homogeneous extension of f is F (X, Y, Z) = Y X2 + Y 2 + Z 2. On one hand if we calculate two derivatives of F before restricting to the sphere: 2 XY X2F (X, Y, Z) = X ( X 2 + Y 2 + Z 2 ) = 3 Y ( X 2 + Y 2 + Z 2 ) 3 3X 2 Y ( X 2 + Y 2 + Z 2 ) (X 2 + Y 2 + Z 2 ) 3 = f XX = 3x 2 y y
On the other hand we already had f X = xy. Extending it to and differentiating once we get restricting to the unit sphere XY ( X 2 + Y 2 + Z 2 ) 2 Y ( X 2 + Y 2 + Z 2 ) 2 2X 2 Y (X 2 + Y 2 + Z 2 ) 2, (f X ) X = 2x 2 y y. With the recursive procedure above we have in general f XX (f X ) X f XY f Y X Lemma: Let g(t) be a homogeneous function of degree d. The derivative g (t) is homogeneous of degree d 1. If g(t) = 1, the degree of homogeneity is 0, the derivative of g is a zero function which has an undetermined degree of homogeneity.
In our definition of f X the function f is extended to R 3 as a homogeneous constant. When the function is differentiated it looses one degree of homogeneity, i.e. while F is a constant homogeneous function, F X, F Y, F Z are homogeneous of degree 1. When we restrict the derivatives to the unit sphere we loose this information. It is therefore essential to define the second order derivative of f as the derivative of the 1 extension of the first derivative of f, that is ( ) f X f XX = D X X2 + Y 2 + Z 2 S 2. This definition is consistent with differentiating a constant extension twice and then restricting it back to the sphere, that is f XX = ( ) 2 X2F (X, Y, Z) S 2, where F (X, Y, Z) is the constant homogeneous extension of f.
Even though we have excluded constant functions from the Lemma, our definition for the 2nd order derivatives applies to constant functions on the sphere just the same, since the 1 degree extension of a zero function is still a zero function, and thus the second order partials of a constant are all zero. Note: even though first order partials of a constant function are zero, the second order partials of a linear function are not! Let us complete this section with formulas for the second order partial derivatives of a spherical function f with respect to X, Y, Z in terms of the derivatives of f with respect to its natural coordinates x, y, z.
f XX = v T XH(f)v X + f T v XX. f XY = v T XH(f)v Y + f T v XY. f = f v T H(f)v 2 f T v.
Bernstein-Bezier Polynomials on a Spherical Triangle Figure 4: Triangulation on the sphere. Barycentric Coordinates Let τ be a triangle on the unit sphere with vertices v 1, v 2 and v 3. The barycentric coordinates of a point v = (x, y, z) with respect to τ are the unique real numbers b 1, b 2, b 3 satisfying b 1 v 1 + b 2 v 2 + b 3 v 3 = v.
Properties b i (v j ) = δ ij Barycentric coordinates do not form a partition of unity. Barycentric coordinates vanish on the edges opposite to the associated vertices. Barycentric coordinates are positive on the triangle of the definition. Barycentric coordinates are linear homogeneous functions of x, y, z. Barycentric coordinates are quotients of certain volumes, not areas.
Bernstein-Bezier Basis Fix a triangle τ with vertices v 1, v 2 and v 3. The Bernstein- Bezier basis polynomials of degree d with respect to τ are defined by B d ijk(v) = d! i!j!k! b 1(v) i b 2 (v) j b 3 (v) k, i + j + k = d. Properties There are ( ) d+2 2 BB-basis polynomials. BB-basis polynomials are linearly independent. BB-basis polynomials form a basis for functions in H d restricted to the sphere. BB-basis polynomials are homogeneous polynomials of degree d. BB-basis polynomials do not form a partition of unity.
BB-basis polynomials are positive on the triangle of the definition. BB-basis polynomials have values at the vertices that are easy to determine: B d ijk(v 1 ) = d! i!j!k! b 1(v 1 ) i b 2 (v 1 ) j b 3 (v 1 ) k = 1, i = d, j = k = 0, 0, otherwise. Similarly, and B d ijk(v 2 ) = B d ijk(v 3 ) = 1, j = d, i = k = 0, 0, otherwise. 1, k = d, j = i = 0, 0, otherwise.
A polynomial p = c ijk Bijk, d i+j+k=d is called a spherical homogeneous BB-polynomial of degree d defined with respect to the triangle τ. It is easy to evaluate the polynomial at the vertices of τ: p(v 1 ) = c d00 p(v 2 ) = c 0d0 p(v 3 ) = c 00d This property is essential for interpolating given function values at the vertices. As long as we make sure that c d00 = f(v 1 ) c 0d0 = f(v 2 ) c 00d = f(v 3 ) any polynomial p will interpolate f at the vertices.
Derivatives of BB-polynomials We are often interested in defining a derivative of p in the direction of a unit vector u. We need to follow a chain of coordinate changes: Cartesian: X, Y, Z Spherical: x, y, z Barycentric: b 1, b 2, b 3. D u f(x, y, z) = D u F (X, Y, Z) S 2 = (u T F ) S 2 = u T ( F ) S 2 = u T (f X, f Y, f Z ) T. Recall f X = v T X f f Y = v T Y f f Z = v T Z f
Then D u f(x, y, z) = u T 1 x 2 xy xz yx 1 y 2 yz zx zy 1 z 2 f = u T P f = u T (I vv T ) f. The matrix P = 1 x 2 xy xz yx 1 y 2 yz zx zy 1 z 2 is symmetric, and on the unit sphere it is a projection, we have P 2 = P (simplifies products of gradients).
Suppose now that f is our homogeneous polynomial of degree d. We need to calculate p x = p b 1 b 1 x + p b 2 b 2 x + p b 3 b 3 x and similarly for p y and p z. Differentiating p with respect to b 1, b 2, b 3 is straight forward. What are b i x, b i y and b i z? Recall the definition: b 1 v 1 + b 2 v 2 + b 3 v 3 = v. Using Kramer s rule we find the solutions explicitly as b i = det(a i) det(a) where A = x 1 x 2 x 3 y 1 y 2 y 3 z 1 z 2 z 3 A 1 = x x 2 x 3 y y 2 y 3 z z 2 z 3
A 2 = x 1 x x 3 y 1 y y 3 z 1 z z 3 A 3 = x 1 x 2 x y 1 y 2 y z 1 z 2 z Expand A 1 along the first column, and differentiate the determinant of A 1 with respect to x. The result is equal to the determinant of B 1 = 1 x 2 x 3 0 y 2 y 3 0 z 2 z 3 Denote e 1 = (1, 0, 0) T. Then To sum it up b 1 x = det(b 1) det(a) = b 1(e 1 ). b i x = b i(e 1 ) b i y = b i(e 2 ) b i z = b i(e 3 ). p x = (b 1 (e 1 ), b 2 (e 1 ), b 3 (e 1 )) T b p = b(e 1 ) T b p,
p y = b(e 2 ) T b p p z = b(e 3 ) T b p D u p = u T P p = u T P (A 1 ) T b p since b(e 1 ) T b(e 2 ) T b(e 3 ) T = [b(e 1 ) b(e 2 ) b(e 3 )] T = (A 1 ) T. We are interested in special cases when a directional derivative is evaluated at a vertex of a triangle. P (v l ) = I v l v T l, b p(v l ) = i+j+k=d c ijk b B d ijk(v l ).
Derivatives BB-basis polynomials evaluated at vertices B d (d 1)! b ijk(v 1 ) = d 1 (i 1)!j!k! bi 1 1 b j 2 bk 3 = d, i = d, j = k = 0, 0, otherwise. B d (d 1)! b ijk(v 2 ) = d 1 (i 1)!j!k! bi 1 1 b j 2 bk 3 = d, i = 1, j = d 1, k = 0, 0, otherwise. B d (d 1)! b ijk(v 3 ) = d 1 (i 1)!j!k! bi 1 1 b j 2 bk 3 = d, i = 1, j = 0, k = d 1, 0, otherwise.
B d (d 1)! b ijk(v 1 ) = d 2 i!(j 1)!k! bi 1b j 1 2 b k 3 = d, i = d 1, j = 1, k = 0, 0, otherwise. B d (d 1)! b ijk(v 2 ) = d 2 i!(j 1)!k! bi 1b j 1 2 b k 3 = d, i = 0, j = d, k = 0, 0, otherwise. B d (d 1)! b ijk(v 3 ) = d 2 i!(j 1)!k! bi 1b j 1 2 b k 3 = d, i = 0, j = 1, k = d 1, 0, otherwise.
B d (d 1)! b ijk(v 1 ) = d 3 i!j!(k 1)! bi 1b j 2 bk 1 3 = d, i = d 1, j = 0, k = 1, 0, otherwise. B d (d 1)! b ijk(v 2 ) = d 3 i!j!(k 1)! bi 1b j 2 bk 1 3 = d, i = 0, j = d 1, k = 1, 0, otherwise. B d (d 1)! b ijk(v 3 ) = d 3 i!j!(k 1)! bi 1b j 2 bk 1 3 = d, i = 0, j = 0, k = d, 0, otherwise.
Finally, for a polynomial p: p b 1 (v 1 ) = dc d00 p b 1 (v 2 ) = dc 1,d 1,0 p b 1 (v 3 ) = dc 1,0,d 1 p b 2 (v 1 ) = dc d 1,1,0 p b 2 (v 2 ) = dc 0,d,0 p b 2 (v 3 ) = dc 0,1,d 1 p b 3 (v 1 ) = dc d 1,0,1 p b 3 (v 2 ) = dc 0,d 1,1 p b 3 (v 3 ) = dc 0,0,d D u p(v 1 ) = du T P (A 1 ) T (c d00, c d 1,1,0, c d 1,0,1 ) T D u p(v 2 ) = du T P (A 1 ) T (c 1,d 1,0, c 0,d,0, c 0,d 1,1 ) T D u p(v 3 ) = du T P (A 1 ) T (c 1,0,d 1, c 0,1,d 1, c 0,0,d ) T
Smoothness conditions d ijk = r+s+t=i c r,j+s,k+t B i rst(v 4 ) i = 0,..., r and 0 j, k d with i + j + k = d. Figure 5: C 1 smoothness conditions.
Spherical Spline Space S r d( ) := {s : s τ H d (S 2 )} C r (S 2 ) Domain Points ξ τ ijk = iv 1 + jv 2 + kv 3 iv 1 + jv 2 + kv 3, i + j + k = d D d, = {ξ τ ijk : τ, i + j + k = d}
Determining Sets List all domain points without repetitions and index them in some order: D d, = {ξ i } n i=1. A spline in Sd 0 ( ) can be now described as s = n c i B i i=1 Let J be a subset of 1,..., n. A subset D J of D d, is a determining set for S r d ( ) if c i = 0 for all i J implies that s = 0 everywhere on the sphere. We are interested in Minimal Determining Sets. Cardinality of MDS is the dimension of Sd r ( ). To built a qusi-interpolant with optimal approximation power we need to be careful in finding a local stable basis. Such a basis is constructed using certain linear functionals associated with a MDS.
Examples of MDS in S 1 3( ) Let be a triangulation of S 2 based on 6 vertices which as vectors in R 3 are ±e i, i = 1, 2, 3. The dimension of S 1 3( ) is 19. Every MDS must contain 3 domain points in the first disk around every vertex of : there exist quasi-interpolants that interpolate function values at the vertices, in fact there exist quasi-interpolants that fit the derivatives at the vertices as well. There is a problem with locality of the basis: all coefficients c τ 111 form an independent subsystem that influences all of the triangles.
Examples of MDS in S 1 3( ) Change by shifting one of the vertices along an existing edge. The dimension of S 1 3( ) is 18. Every MDS must contain every vertex of : there exist quasiinterpolants that interpolate function values at the vertices, there may not exist quasi-interpolants that fit the derivatives at the vertices. There is a problem with locality of the basis: all coefficients c τ 111 form an independent subsystem that influences all of the triangles.
Global methods Minimal energy interpolation Γ f := {s S r d( ) : s(v) = f(v), v V} E(f) = S 2 α =2 (D α f δ ) 2. E(S f ) = min s Γf E(s). Discrete least squares splines L(s) = v V (s(v) f(v)) 2 L(S f ) = min s S r d ( )L(s).
Penalized least square fitting P λ (s) := L(s) + λe δ (s), P λ (S f ) = min s S r d ( )P λ (s). Linear systems A LT L 0 c λ = g h (A + 1 ɛ LT L)c (l+1) = Agc (l) + 1 ɛ LT h
Interpolation c 003 V3 c 102 c 012 c 021 c 201 c 111 V1 c 300 c 210 c 120 c 030 V2 Figure 6: Coefficients of a cubic BB-polynomial. c 300 = f(v 1 ) c 030 = f(v 2 ) c 003 = f(v 3 ) I c = F.
Smoothness conditions d ijk = r+s+t=i c r,j+s,k+t B i rst(v 4 ) i = 0,..., r and 0 j, k d with i + j + k = d (cf.[alfeld, Neamtu, Schumaker, 96]). Thus a spline s S 1 ( ) belongs to Sd r ( ) if and only if d Figure 7: C 1 smoothness conditions. S c = 0.
Energy matrix E(s) = S 2 α =2 (D α s 0 ) 2 Minimize E(c), subject to Sc = 0 and Ic = F. E[i, j] := S 2 α =2 (D α B i )(D α B j ). E[i, j] := α =2 T (D α B i )(D α B j ).
Differentiation p 0 (v) = p( v v ) = v d p(v) D i,j p 0 S 2 = ( d)(δ ij (d + 2) v, e i v, e j )p(v) + ( d)(p i (v) v, e j + p j (v) v, e i ) + p ij (v) p i (v) = b(e i ) t b p(v) b p(v) i = b i p(v) p ij (v) = b(e i ) t H b p(v)b(e j ) H b p(v) ij = 2 b i b j p(v)
Integration ds = v N v N ds, v = v v T f(v)ds = T f( v v ) v N v N ds 1 1 b 2 T g(v )ds = 2A T 0 0 g(b 1, b 2)db 1db 2 T f(v)ds = 2A T N 1 1 b 2 0 0 f(b 1, b 2) v v N db 1db 2 E I T S I 0 0 S 0 0 c λ η = F 0 0
Theorem 1. Suppose Sd r ( ) is a spline space defined on a β-quasi-uniform triangulation with 1 and d 3r + 2. There exists a constant C depending only on d and β, such that the energy interpolant S f minimizing E satisfies f S f,s 2 C 2 f 2,,S 2 for all f C 2 (S 2 ).
Theorem 2. Let be a β-quasi-uniform triangulation of the sphere S 2 whose vertices form a subset of the data sites V and 1. Let N be the number of triangles in. Suppose that the data locations V have the property that for every s Sd r( ) and every τ, there exist a positive constant F 1, independent of s and τ, such that F 1 s,τ ( V τ s(v) 2 ) 1/2. (1) Let F 2 be the largest number of data sites in a triangle τ. That is, we have ( V τ s(v) 2 ) 1/2 F 2 s,τ. (2) For d 3r + 2 let s λ,f be the spline minimizing P λ. Then f s λ,f,s 2 C m+1 f m+1,,s 2 + λc N for every function f in W m+1, (S 2 ). Here m is between 0 and d with (d m) mod 2 = 0. The constant C depends on d, β, F 1, F 2, and C depends on d, β, F 1, F 2, f and.
References 1. Alfeld, P.,M. Neamtu, and L. L. Schumaker, Bernstein- Bezier Polynomials on Spheres and Sphere-Like Surfaces, Comput. Aided Geom. Design 13 (1996),no. 4, 333 349. 2. Alfeld, P.,M. Neamtu, and L. L. Schumaker, Fitting Scattered Data on Sphere-like Surfaces Using Spherical Splines, J. Comp. Appl. Math. 73 (1996), 5 43. 3. Awanou, G. M., M. J. Lai, P. Wenston, The Multivariate Spline Method for Numerical Solution of Partial Differential Equations and Scattered Data Interpolation, in Wavelets and Splines: Athens 2005, edited by G. Chen and M. J. Lai, Nashboro Press, 2006, 24 74. 4. Baramidze, V. and M. J. Lai, Error Bounds for Minimal Energy Interpolatory Spherical Splines, Approximation Theory XI, edited by C. K. Chui, M. Neamtu and L. L. Schumaker, Nashboro Press, Brentwood, 2005, 25 50. 5. Baramidze, V. and M. J. Lai, Spherical Splines for Data Interpolation and Fitting, SIAM J. Scientific Computing,
28(2006), 241 259. 6. Baramidze,V., and M. J. Lai, Spherical Spline Solution to a PDE on a Sphere, Wavelets and Splines, Nashboro Press, 2006, 75 92. 7. Baramidze, V., Spherical Spline Solution of the Heat Equation, manuscript, 2008. 8. Lai, M. J., C. K. Shum, V. Baramidze, and P. Wenston, Triangulated spherical splines for geopotential reconstruction, to appear in J. of Geodesy, 2008.