Before we are able to evaluate the polynomial piece (3.7), i.e. compute the value and the derivatives of the spline s|T at a given point q∈ Ω, we need to know the location of q = (qx, qy, qz) in the partition and its barycentric coordinates according to a tetrahedron T . Thus, first we have to find a cube Q ∈ ♦ with q ∈ Q (cf. Sec. 2.3), a tetrahedron T ∈ with q ∈ T , where T ⊂ Q, and the barycentric coordinates
λν(q) ∈ R, ν = 0, 1, 2, 3 according to T . As we know, the uniformity of allows a translation of q such that the remaining computations can be performed for (the tetrahedral partition of) the unit cube Q0 = [−0.5, +0.5] (see Fig. 3.1).
However, to find the tetrahedron T the observation from Sec. 3.1 is used, where each cube Q is split into 24 congruent tetrahedra by slicing it with six planes (3.1). Thus, the orientation of q with respect to these planes is found from Pν(qx, qy, qz, d), ν = 0, . . . , 5
followed by a sign check for each of the six planes. This gives a six-bit binary code for the orientation of q and finally the tetrahedron T ⊂ Q with q ∈ T is found by a simple table lookup.
The barycentric coordinates λν(q)∈ R, ν = 0, 1, 2, 3 according to T ⊂ Q are computed from (3.9). First, the vertices of a tetrahedron T = [v0, v1, v2, v3] have to be organized. For example, if the first vertex v0 is identified with the origin of the unit cube Q0, the second vertex v1 with the intersection point of the two diagonals drawn into a face F of Q, the third vertex v2 and fourth vertex v3 are identified with the two corners of that face F . Then, this allows generating another lookup table with 24 entries of the pre-computed solutions. Thus, the barycentric coordinates of q with respect to T are computed by
λ0(q) = 1 + L2+ L2, λ1(q) = 1 + L3+ L4, λ2(q) = 1 + L0+ L4,
λ3(q) = 1− λ0(q)− λ1(q)− λ2(q), (3.14) where L5ν=0 := [+qx, +qy, +qz,−qx,−qy,−qz] is an ordered list. Both tables can be deter- mined by analyzing all of the 24 possible solutions of (3.9) and, therefore, the barycentric coordinates of q are found without performing expensive rotation or transformation op- erations, branching over the 24 cases and any multiplication. Note that the identification of the vertices vi, i = 0, 1, 2, 3 of the tetrahedron T with the appropriate vertices of Q
defines the lookup table with 24 entries of the pre-computed solutions, and thus has to be performed carefully.
2Once the cubeQ
0is found, all its B´ezier pointsbi,j,k are known as well.
3.4 Piecewise Linear Splines
Piecewise linear splines defined on a tetrahedral partition are called in this thesis
linear type-6 splines. These polynomials are also continuous but not smooth over the
volume domain Ω (similar to the linear type-0 splines). The space of these splines with respect to is defined by
S1() = {s ∈ C0(Ω) : s|T ∈ P1,∀T ∈ }, (3.15) whereP1 := span{xiyjzk : i, j, k≥ 0, i + j + k ≤ 1} denotes the four-dimensional space of linear polynomials, i.e. the space of trivariate polynomials of total degree one. A spline s∈ S1 can be written in its piecewise Bernstein-B´ezier form (3.7), i.e. in that equation we set n = 1.
3.4.1 Bernstein-B´ezier Coefficients
For piecewise linear splines the 4(15) Bernstein-B´ezier coefficients for an arbitrary tetra- hedron T ∈ (Q ∈ ♦) are determined as follows. First, according to Equ. 3.11 two different layers L1ν, ν = 0, 1 have to be considered. The coefficients of s|T associ- ated with its corresponding B´ezier points (shown as left blue, right blue, and green circle in Fig. 3.3, respectively) b0,0,1,0 = (ϑ10,0,1,0, a0,0,1,0), b0,0,0,1 = (ϑ10,0,0,1, a0,0,0,1), and b0,1,0,0 = (ϑ10,2,0,0, a0,1,0,0) at the domain points ϑ0,0,1,01 = v2, ϑ10,0,0,1 = v3, and
ϑ10,1,0,0 = v1 in layer L10 are determined by
a0,0,1,0 = 1 8(C + F + L + T + LT + F L + F T + F LT ), a0,0,0,1 = 1 8(C + F + R + T + RT + F R + F T + F RT ), a0,1,0,0 = 1 2(C + F ). (3.16)
Then, the last Bernstein-B´ezier coefficient a1,0,0,0associated with the B´ezier point b1,0,0,0= (ϑ11,0,0,0, a1,0,0,0) located at the center of the cube Qi,j,k in layerL11, i.e. at the domain point ϑ11,0,0,0= v0 (cyan circle in right drawing of Fig. 3.3) is simply set to
a1,0,0,0 = C, (3.17)
where C is the data value itself located in the center of a cube Qi,j,k. 3.4.2 Evaluation of Polynomial Pieces and its Derivatives
Once the cube Q0 := Qi,j,k ∈ ♦ and the tetrahedron T = [v0, v1, v2, v3] ⊂ Q0 with the point q ∈ T are determined and the local coordinates λν(q), ν = 0, 1, 2, 3 of q according to T are computed. The polynomial piece (3.7) and its derivatives at q can be determined. Note that when the cube and tetrahedron T are found, all B´ezier points according to T are known as well and the polynomial piece (3.7) can be evaluated applying Alg. 3.2.1 (see Fig. 3.4).
CHAPTER 3. TRIVARIATE B ´EZIER SPLINES
Figure 3.3: The data values (white circles in the left drawing) in the local 27 neighborhood of a considered cube Q0(blue cube) and appropriate averaging rules – for linear splines – give the 4 Bernstein-B´ezier coefficients located on its B´ezier points (colored circles in the right illustration) on two different layers L1ν, ν = 0, 1 of a tetrahedron T (right figure). The other coefficients for the remaining 23 tetrahedra of Q0 are computed by symmetry and are not shown here.
3.5 Piecewise Quadratic Splines
In this section we describe piecewise continuous splines which satisfy additional smooth- ness conditions in comparison to the previously defined linear splines – such splines are called quadratic type-6 splines, also better known as Super-Splines (see [RZNS03] [RZNS04a]). The accurate smoothness conditions can be found in [NRSZ04]. The space of these splines with respect to is defined by
S2() = {s ∈ C1(Ω) : s|T ∈ P2,∀T ∈ , s smooth at v, ∀v of ♦}, (3.18)
where P2 := span{xiyjzk : i, j, k ≥ 0, i + j + k ≤ 2} denotes the 10-dimensional space of quadratic polynomials, i.e. the space of trivariate polynomials of total degree two. Note, this splines are not everywhere on Ω continuously differentiable.
Once again a spline s ∈ S2 can be written in its piecewise Bernstein-B´ezier form (3.7) with n = 2.
3.5.1 Bernstein-B´ezier Coefficients
For piecewise quadratic splines the 10(65) Bernstein-B´ezier coefficients for an arbitrary tetrahedron T ∈ (Q ∈ ♦) are determined as follows. First, according to Equ. 3.11 three different layers L2ν, ν = 0, 1, 2 have to be considered now. The six coefficients of s|T associated with its corresponding points in layer L20 of T (also located on Q) are determined by a0,0,2,0 = 1 8(C + F + L + T + LT + F L + F T + F LT ), a0,0,0,2 = 1 8(C + F + R + T + RT + F R + F T + F RT ), a0,0,1,1 = 1 4(C + F + T + F T ), a0,1,1,0 = 1 4(C + F ) + 1 8(L + T + F L + F T ), a0,1,0,1 = 1 4(C + F ) + 1 8(R + T + F R + F T ), a0,2,0,0 = 1 4(C + F ) + 1 16(D + L + R + T + F D + F L + F R + F T ), (3.19)
Figure 3.4: The evaluation of a polynomial piece s|T ∈ P1 at a point q (green dot) with the de Casteljau algorithm (3.2.1) using the B´ezier points (colored circles) on the two dif- ferent layers L1ν, ν = 0, 1 of the tetrahedron T (as in right drawing of Fig. 3.3). These four colored dots show the B´ezier points b00,0,1,0 := b0,0,1,0 = (ϑ10,0,1,0, a0,0,1,0), b00,0,0,1 := b0,0,0,1 = (ϑ10,0,0,1, a0,0,0,1), b00,1,0,0 := b0,1,0,0 = (ϑ10,2,0,0, a0,1,0,0), and b01,0,0,0 := b1,0,0,0 = (ϑ11,0,0,0, a1,0,0,0) at the domain points ϑ10,0,1,0 = v2, ϑ0,0,0,11 = v3, ϑ10,1,0,0= v1, and ϑ11,0,0,0 = v0 and the associated coefficients aτ0,τ1,τ2,τ3, τ0+τ1+τ2+τ3= 1 on level = 0. The new B´ezier point (green dot) s|T(q) = b10,0,0,0 and its associated coefficient on level = 1 is determined from an
affine combination by weighting with the barycentric coordinates of q w.r.t. T = [v0, v1, v2, v3] and is the final result. The arrows show which points are involved, where the different colors represent the barycentric coordinates λν(q), ν = 0, 1, 2, 3. Note, the coefficients a0τ0,τ1,τ2,τ3 of the corresponding points (colored circles) already define the partial derivatives ∂ξ∂
νs|T ∈ P0 along the
edges of the tetrahedron T .
where the Bernstein-B´ezier coefficients a0,0,2,0 and a0,0,0,2 located on the domain points
ϑ20,0,2,0 = v2 and ϑ20,0,0,2 = v3 define the B´ezier points b0,0,2,0 = (ϑ20,0,2,0, a0,0,2,0) and
b0,0,0,2 = (ϑ20,0,0,2, a0,0,0,2) (show as left blue and right blue circles in Fig. 3.5), re- spectively. Accordingly the coefficients a0,0,1,1, a0,1,1,0, a0,1,0,1 and their domain points give us the B´ezier points b0,0,1,1= (ϑ20,0,1,1, a0,0,1,1), b0,1,1,0 = (ϑ20,1,1,0, a0,1,1,0), b0,1,0,1 = (ϑ20,1,0,1, a0,1,0,1) (shown as red, left yellow, right yellow circles in Fig. 3.5), respectively. The last coefficient a0,2,0,0 in this layer and its associated domain point ϑ20,2,0,0 = v1 results in the B´ezier point b0,2,0,0 = (ϑ20,2,0,0, a0,2,0,0) and is depicted by a green circle in Fig. 3.5. Then, the next three coefficients of s|T associated with its corresponding points ϑ21,0,1,0, ϑ21,0,0,1, ϑ21,1,0,0 in layer L21 of T (located inside Q) are determined by
a1,0,1,0 = 5 16(C) + 3 16(F + T + L) + 1 16(F L + F T + LT− F LT ), a1,0,0,1 = 5 16(C) + 3 16(F + T + R) + 1 16(F R + F T + RT − F RT ), a1,1,0,0 = 20 64(C) + 12 64(F ) + 6 64(D + L + R + T ) + 2 64(F D + F L + F R + F T ) + 1 64(LD + LT + RD + RT − F LD − F LT − F RD − F RT ), (3.20) where the B´ezier points b1,0,1,0 = (ϑ21,0,1,0, a1,0,1,0), b1,0,0,1 = (ϑ21,0,0,1, a1,0,0,1), and b1,1,0,0= (ϑ21,1,0,0, a1,1,0,0) are shown as left brown, right brown, and magenta circles in Fig. 3.5. Finally, the Bernstein-B´ezier coefficient a2,0,0,0associated with the B´ezier point b2,0,0,0 = (ϑ22,0,0,0, a2,0,0,0) (cyan circle in right drawing of Fig. 3.3) located at the center ϑ22,0,0,0 =
CHAPTER 3. TRIVARIATE B ´EZIER SPLINES v0 of the cube Q in layerL22 of T is computed by
a2,0,0,0 = 40 128(C) + 12 128(B + D + F + R + T + L) + 2 128(BD + BL + BR + BT + F D + F L + F R + F T + LD + LT + RD + RT )− 1 128(BLD + BLT + BRD + BRT + F LD + F LT + F RD + F RT ). (3.21)
Figure 3.5: The data values (white circles in the left drawing) in the local 27 neighborhood of a considered cube Q0 (blue cube) and appropriate averaging rules – for quadratic splines – give the 10 Bernstein-B´ezier coefficients located on its B´ezier points (colored circles in the right illustration) on three different layers L2ν, ν = 0, 1, 2 of a tetrahedron T (right figure). The other coefficients for the remaining 23 tetrahedra of Q0 are computed by symmetry and are not shown here.
3.5.2 Evaluation of Polynomial Pieces and its Derivatives
Once the cube Q0 := Qi,j,k ∈ ♦ and the tetrahedron T = [v0, v1, v2, v3]⊂ Q0 with the point q ∈ T have been determined and the local coordinates λν(q), ν = 0, 1, 2, 3 of q according to T are computed. The polynomial piece (3.7) and its derivatives at q can be determined. Once the cube and tetrahedron T are found, all B´ezier points according to
T are known as well and the polynomial piece (3.7) can be evaluated applying Alg. 3.2.1
(see Fig. 3.6).