Shape Morphing of Complex Geometries Using

3 downloads 0 Views 1MB Size Report
regards the entire surface representing the object as a ... those based on the use of partial differential equations such as ... based on the change of the boundary conditions for the ... surface X(u, v), which is defined as the solution to an.
JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

15

Shape Morphing of Complex Geometries Using Partial Differential Equations Gabriela Gonz´alez Castro and Hassan Ugail University of Bradford, EIMC Department, School of Informatics, Richmond Road, Bradford, BD7 1DP, UK. Email: {G.Gonzalezcastro1, H.Ugail }@bradford.ac.uk

Abstract— An alternative technique for shape morphing using a surface generating method using partial differential equations is outlined throughout this work. The boundaryvalue nature that is inherent to this surface generation technique together with its mathematical properties are hereby exploited for creating intermediate shapes between an initial shape and a final one. Four alternative shape morphing techniques are proposed here. The first one is based on the use of a linear combination of the boundary conditions associated with the initial and final surfaces, the second one consists of varying the Fourier mode for which the PDE is solved whilst the third results from a combination of the first two. The fourth of these alternatives is based on the manipulation of the spine of the surfaces, which is computed as a by-product of the solution. Results of morphing sequences between two topologically nonequivalent surfaces are presented. Thus, it is shown that the PDE based approach for morphing is capable of obtaining smooth intermediate surfaces automatically in most of the methodologies presented in this work and the spine has been revealed as a powerful tool for morphing surfaces arising from the method proposed here. Index Terms— Morphing, PDE surfaces, Geometric modelling, PDE method, geometric algorithms, boundary representations.

I. I NTRODUCTION Metamorphosis, word with Greek origin in metamorphoun (transform, change shape), is used to denote a change of form or nature and, has been adopted in areas related to computer graphics and computer-aided geometric design to describe the action of changing smoothly and gradually from one shape into another. Some of these areas are industrial design [1], geometric modelling, medicine [2], visual effects and computer animation [3]. Now, given that smooth and aesthetic effects are generally pursued, the development of morphing techniques is oriented to fulfil such requirements. The current available morphing techniques are roughly classified into two major groups. These groups are essentially distinguished by the kind of approach employed in their development. These are volume-based and boundary-based approaches. The first kind of technique regards the entire surface representing the object as a means for transforming an object and manipulates the object by modifying a set of specific points (control This paper is based on “Shape Morphing Using PDE Surfaces ” by G. Gonz´alez Castro, H. Ugail, P.Willis and I. Palmer, which appeared in the Proceedings of the Visualization, Imaging and Image Procesing, Palma de Mallorca, Spain, August 2006.

© 2007 ACADEMY PUBLISHER

points). This technique provides excellent results when applied to objects represented by implicit surfaces, giving rise to some conservative properties and producing smooth transitions. Moreover, their implementation is fairly straightforward. As far as the boundary-based approaches are concerned, specific values of the boundaries describing the object are modified. However, it has been noticed that a small variation of the data describing the boundary of an object may result in an invalid object, disrupting the smoothness of the sequence. This problem is overcome by merging the two meshes associated with each of the objects into a third one, where a corresponding rule is the found. According to [4], the major problems present in morphing are feature specification, warp generation and transition control. These problems provide an additional mechanism for classifying morphing techniques. The work presented in [5] enlists such a classification by making reference to works based on mesh warping [6], field morphing [7], energy minimisation [8] and free-form deformations [9] among others. Works such as [2], [10], [3] and [11] are examples of some of the morphing techniques developed so far. For instance, [11] introduces a method that allows morphing between two objects using variational interpolation, whilst [10] offers an alternative for achieving morphing between two non-topologically equivalent objects by creating a four-dimensional transitional mesh. However, there are still a number of relevant areas in which little work has been done such as multiple image morphing and the development of appropriate real-time interactive deformation tools. Surface generation methods may provide a useful tool for addressing some of these problems. In particular, those based on the use of partial differential equations such as Bloor-Wilsons PDE method, a fast boundaryvalue surface generation technique, may offer an excellent alternative for problems related to feature specification and transition control. Preliminary work using the PDE method proposed by Bloor and Wilson as the foundations for a morphing technique is outlined in [12]. This work exploits some of the advantages offered by this PDE method, among which are the speed at which individual morphs are generated and the intrinsic parametrisation of the surface shapes generated through this method and has proved useful to

16

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

for acquiring smooth and controlled transitions between surfaces as required in morphing. Three methodologies for morphing are proposed in [12]. The first one, is based on the change of the boundary conditions for the intermediate surfaces by using a weighted sum of the original boundary conditions of each surface. The second method is achieved by decreasing the Fourier mode for which the PDE is solved whilst the third one consists of a combination of the first two. This work presents and additional methodology. The additional alternative uses the spine as a morphing tool. The spine is a mathematical feature inherent to PDE surfaces obtained by Bloor-Wilsons PDE method [13]. Some of the advantages of centring a methodology for morphing in the use of the spine are: it is only required to solve the PDEs associated with the original surfaces, it increases the speed with which morphing sequences are obtained with respect to the speed offered by previous techniques based on Bloor-Wilsons PDE method. The results presented in this work include morphing sequences between two objects with different topologies and complex geometries showing that these morphing technique are capable of morphing complex geometries with different topologies. This paper is organised as follows: Section 2 outlines the mathematical basis of the PDE method in use, while Section 3 describes the details of four approaches for morphing using this method. The results obtained for each of the methods are discussed in Section 4. Section 5 contains a discussion where the advantages of the methodology presented in this work is compared to other morphing techniques. Finally, the conclusions obtained from this work are outlined in Section 6. II. T HE B LOOR -W ILSON PDE M ETHOD A surface generation technique based on the use of partial differential equations has been formulated by Bloor and Wilson and was firstly used in the area of computer aided design as a blend generation technique [14]. Thereafter, the areas of application of this method have been widely increased. These include areas such as automatic design optimisation and interactive design [15] together with applications to physical and biological systems. The Bloor-Wilson PDE method produces a parametric surface X(u, v), which is defined as the solution to an elliptic PDE of the form,  ∂2 2 2 2 ∂ + a X(u, v) = 0 , (1) ∂u2 ∂v 2 where u and v are the parametric surface coordinates, which are then mapped into the physical space; i. e., (x(u, v), y(u, v), z(u, v)) and a ≥ 1 is a parameter inherent to the PDE. Equation (1) is solved subject to a specific set of four boundary conditions that define the value of X(u, v) and some of its derivatives at determined regions. The particular case when a = 1, Equation (1) is known as the biharmonic equation, which is widely used to describe some phenomena occurring within areas such as

© 2007 ACADEMY PUBLISHER

fluid and solid mechanics and therefore, many alternatives for solving it have been developed. Nevertheless, it is stressed that the implementation of this method is not restricted to the use of Equation (1) for obtaining PDE surfaces. For instance, this formulation was adapted in [16] where a sixth order PDE was considered with the aim of achieving fast surface modelling. Restrictions in the choice of the boundary conditions to periodic cases give rise to a closed form analytic solution to Equation (1). In particular, when the parametric region defined by u and v is delimited by 0 ≤ u ≤ 1 and 0 ≤ v ≤ 2π, the solution to Equation (1) is given by, X(u, v) = A0 (u)+

∞ 

[An cos(nv)+Bn sin(nv)] , (2)

n=1

where, A0 An

= =

a00 + a01 u + a02 u2 + a03 u3 , (an1 + an3 u) eanu

(3)

(an2 + an4 u) e−anu , (bn1 + bn3 u) eanu

(4)

Bn

+ = +

(bn2 + bn4 u) e−anu .

(5)

The value of the constants a ij and bij are determined by the specified boundary conditions, which for this purpose, have to be expressed in terms of a Fourier series. In specific cases when all the boundary conditions can be exactly expressed in terms of finite Fourier series, Equation (2) will also be finite. However, when the solution is given in terms of an infinite series, it can be approximated by the sum of the first N Fourier modes and the so called remainder term; i. e., X(u, v)

= +

N 

A0 (u) +

[An cos(nv) + Bn sin(nv)]

n=1

R(u, v) ,

(6)

where R(u, v) is a function defined as, R(u, v) = +

r1 (u)ewu + r2 (u)e−wu r3 (u)uewu + r4 (u)ue−wu ,

(7)

where w has been conveniently chosen as w = a(N + 1) and, r1 , r2 , r3 and r4 are functions denoting the difference between the original boundary conditions and the ones satisfied by, F(u, v) = A0 (u)+

N 

[An cos(nv)+Bn sin(nv)] . (8)

n=1

Therefore, Equation (7) guarantees that the original boundary conditions are exactly satisfied in Equation (6) in spite of the truncation of the series. It is important to stress that the traditional implementation of the PDE method proposed by Bloor and Wilson requires two positional boundary conditions and its respective derivative with respect to u. These derivatives are calculated using standard finite differences between

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

the original positional boundary curve and an additional curve for each respective case. An example of a surface generated by the PDE method in use is outlined in Figure 1. The generating positional boundary conditions are presented in Figure 1.a. The outer curves represent the positional boundary conditions at u = 0 and u = 1 respectively, whereas the inner ones are the curves used in the intrinsic calculation of the derivatives accordingly. The associated surface is sketched in Figure 1.b. In this example, the expansion has been truncated after 5 modes.

(a)

(b)

Figure 1. Example of a surface generated by the PDE method in use. The boundary curves are shown in (a) and their PDE surface is sketched in (b).

According to the mathematical properties of the expression stated in Equation (6) is qualitatively composed as follows: the  term A0 (u), which describes the spine of the N object, and n=1 [An cos(nv) + Bn sin(nv)] + R(u, v), which defines its radial component. The spine of the object can be thought as the medial axis of the object and in general represents much richer topologies than the object itself [17]. This characterization of Equation (6) provides an excellent tool for manipulating the shape of an object, a feature that is exploited in this work. Figure 2 shows an example of a PDE surface representing a Klein bottle (Fig. 2.a) and its corresponding spine, (Fig. 2.b).

(a)

positional boundary conditions. This technique is faster for solving this kind of PDE than methods such as the ones based on either finite element or finite differences. As far as surface generation is concerned, the speed with which the PDE is solved (results are obtained virtually in real time) makes this technique an excellent choice. The reader is referred to [14] for further details on the mathematical formulation of the Bloor-Wilson PDE method. III. M ETHODOLOGY Morphing using partial differential equations for generating surfaces is achieved with the aim of creating intermediate surfaces between two given surfaces; the source surface, denoted by S s , and the target one represented by St . These intermediate surfaces can be generated by taking advantage of the many mathematical features inherent to Equation (6) and thus, different choices by which a morphing sequence can be achieved are available. Moreover, the boundary conditions of any intermediate surface, prescribed with the use of some mathematical properties of Equation (6), may lead to find iterative boundary conditions for each of the intermediate surfaces so that a smooth transition from S s to St can be achieved. This work comprises four methodologies involving different features inherent to the proposed PDE method. The first methodology proposed exploits the property of closure of Fourier series; i. e., the sum of any two Fourier series is equal to another Fourier series, permitting a linear combination of the boundary conditions associated with Ss and the ones specified for S t . The second alternative takes advantage of the fact that given that the larger the number of Fourier modes employed in the Fourier series expansion, the better the boundary conditions are satisfied, intermediate surfaces can be obtained by using a progressive decrement in the number of modes involved in the computation of S s until one mode is used and then, increasing the number of modes involved in the computation of S t from one to the number originally used in its computation. A combination of the first two methodologies leads to a third one, whilst the use of a linear combination of the spine of the original surfaces together with a linear combination of its respective radial components give rise to the fourth methodology assessed throughout this work. Technical details concerning each of the methodologies mentioned in the former paragraph are given below.

(b)

Figure 2. PDE surface representations associated with a Klein bottle (a) and its spine (b).

The PDE method employed throughout this work differs slightly from the one proposed in [14] since such a method requires two positional boundary conditions and their respective first derivative boundary conditions for solving the PDE, whilst the alternative used in this work is formulated so that the PDE is solved by using four

© 2007 ACADEMY PUBLISHER

17

A. Variation of the boundary conditions The first alternative consists of using weighted sums of the boundary conditions associated with the source and target surfaces. Let B s = {S1 , S2 , S3 , S4 } be the set of boundary conditions specified for the S s and Bt = {T1 , T2 , T3 , T4 } be the set of boundary conditions representing S t . Thus, the ith intermediate set of boundary conditions B i = {I1 , I2 , I3 , I4 } is achieved

18

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

by, I1 I2

= =

(1 − )S1 + T1 , (1 − )S2 + T2 ,

I3 I4

= =

(1 − )S3 + T3 , (1 − )S4 + T4 ,

Now, the boundary conditions employed to solve Equation (11) for each of the i th intermediate surfaces are given by, Bs , for i = 1, ..., Ns , (9)

where, =

γ(i − 1) , m

with γ ≥ 0 and m represents the number of intermediate surfaces to be created. Equation (9) provides an iterative formulation giving rise to intermediate boundary conditions. Such an iterative process generates surfaces that are gradually transforming the original source surface into the target one at a constant rate. The exclusion of the remainder term in Equation (6) is not mandatory; however, for the purposes of speed, this term has been omitted. Therefore, the intermediate surface is then given by, Si (u, v) = A0 (u) +

N 

[An cos(nv) + Bn sin(nv)] ,

n=1

(10) where A0 , An and Bn are subject to the set of boundary conditions specified by Equation (9). This method is particularly useful when the morphing of two surfaces with perfect cylindrical symmetry is required. B. Variation of the number of Fourier modes The second method to be assessed in this work concerns the iterative manipulation of the number of Fourier modes associated with the expansions of the source and target surfaces. This alternative is divided in two stages: The first one consists of decreasing the number of modes employed in the computation of S s until the number of modes employed reaches one. The second stage calculates intermediate surfaces using the boundary conditions associated with St and gradually increasing the number of modes from one until it reaches the number of Fourier modes for which S t was originally computed. Let Ns and Nt be the number of Fourier modes for which Ss and St have been respectively expanded. For the purposes of this work, let m = N s +Nt be the number of intermediate surfaces and thus, the i th intermediate surface is obtained according to the following formulation, Si (u, v) = A0 (u) +

N s −i 

[An cos(nv) + Bn sin(nv)] ,

n=1

for i = 1, ..., Ns , Si (u, v) = A0 (u) +

i−N s

[An cos(nv) + Bn sin(nv)] ,

n=1

for i = Ns + 1, ..., m. © 2007 ACADEMY PUBLISHER

(11)

Bt , for i = Ns + 1, ..., m . Notice that, as mentioned before, the remainder term is excluded in Equation (11) for computing S i . This is due to the fact that throughout this methodology for this term is the one responsible for the exact satisfaction of the boundary conditions and consequently contributing to the attenuation of the morphing effects achieved by this alternative. C. Combination of a gradual variation of the boundary conditions and the number of Fourier modes This method results from the combination of the ones presented above. The intermediate surfaces are found according to a corresponding rule similar to Equation (11), whilst the boundary conditions prescribed to each respective intermediate surface are determined by Equation (9). D. Linear combination of the spine and the radial components of the original surfaces The use of the spine and radial components of the source and target surfaces offers additional alternatives to follow in the aim of achieving morphing sequences. For the purposes of this work, intermediate surfaces are determined by a new spine resulting from a sequential linear combination of the spines of the source and target surfaces, whereas the radial component of these intermediate surfaces is computed analogously. Thus, let A 0s and A0t denote the spine of the source and target surfaces respectively and, let A ns , Bns , Ant and Bnt represent the coefficients associated with the radial component of the source and target surfaces on each respective case. Thus, each intermediate surface is determined by Si = A0i +

N 

[Ani cos(nv) + Bni sin(nv)] ,

(12)

n=1

where A0i

=

(1 − )A0s + A0t ,

Ani Bni

= =

(1 − )Ans + Ant , (1 − )Bns + Bnt ,

(13)

and , γ and m are subject to the same definitions and restrictions as in Equation (9). Again, the remainder term is excluded from the computation of the intermediate surfaces for the same reasons for which it was previously omitted. Note that this methodology reduces the number of operations involved in finding intermediate surfaces in the sense that this procedure only requires the estimation of the coefficients of the source and target surfaces in full. Therefore, it is expected that this alternative may reduce computing time significantly. This aspect will be discussed with detail in the next section.

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

IV. R ESULTS The efficiency of the methodologies explained in the previous section is assessed through the use of particular examples. The results obtained for each case are compared qualitatively. Additionally, the time required for computing each morphing sequence is obtained in order to determine the fastest methodology among the ones proposed here.

19

The analytic expressions outlined above have been employed to obtain the boundary curves responsible for producing a PDE surface representation on each respective case. Figure 3 shows the PDE surface representations have resulted from solving nine PDEs for both the sea shell and the Klein bottle.

A. Variation in the boundary conditions The technique using a linear combination of the boundary conditions has been assessed by specifying the constant rate γ at which the boundary conditions are to be changed and the value set for this purpose has been defined as 0.1. Therefore, according to Equation (9), eleven intermediate surfaces are found. Each of these intermediate surfaces is then computed by solving Equation (6) and using the boundary conditions determined by Equation (9). The transformation between a sea shell and a Klein bottle has been chosen as a first example for assessing the four methodologies proposed in this work since they present different topologies. Both shapes possess analytical expressions in terms of two parametric variables namely, u and v. The sea shell, representing S s , is determined by   1 x=α 1− cos (2u) (1 + cos (v)) + δ cos (2u) , 2π   1 y = β (1 − sin (2u) (1 + cos (v)) + δ cos (2u) , 2π  v  u +α 1− sin (v) , 2π 2π where α, β and γ are constants, 0 ≤ u < π and 0 ≤ v < 2 π. The graphical representation of the sea shell used throughout this work has been obtained using the values of α = 0.2, β = 1.0 and δ = 0.1. The analytical expressions of the coordinates representing the Klein bottle are given by ⎧ α cos(u)(1 + sin(u)) ⎪ ⎪ ⎪ ⎪ +δ cos(u) cos(v) ⎪ ⎪ ⎨ 0 ≤ u < π x= α cos(u)(1 + sin(u)) ⎪ ⎪ ⎪ ⎪ +δ cos(v + π) ⎪ ⎪ ⎩ π ≤ u < 2π , and

z=δ

y=

β sin(u) + δ sin(u) cos(v) 0 ≤ u < π β sin(u) π ≤ u < 2π ,

and z = δ sin(v) . Again α and β are constants, whereas δ is a function of u, 0 ≤ u < π and 0 ≤ v < 2 π. For the purposes of this work, the values of α = 6.0, β = 16.0 and δ = 4 1 − cos(u) . 2 © 2007 ACADEMY PUBLISHER

(a)

(b)

Figure 3. PDE surface representations associated with a sea shell (a) and a Klein bottle (b).

Figure 4 shows the results obtained after transforming the sea shell into the Klein bottle using the methodology based upon a linear combination of the boundary conditions associated with the source and target surfaces. A smooth and progressive transition between the sea shell (Fig. 4.a) and the Klein bottle (Fig. 4.m) is observed throughout the entire sequence. The results have been calculated using a 3.4 GHz Intel Pentium 4 processor resulting on the use of a computing time equivalent to 1.448 seconds corresponding to a mesh of 40 x 40 points. The second example presented in this section discusses the transformation of a Klein bottle, regarded as S s , into a dolphin, which is therefore considered as S t . The geometric representation of the dolphin has been achieved by extracting the necessary boundary curves using MAYA and then, producing a blend of different surface patches, each of which represents a different region of the body of the dolphin. A total of five surface patches are used in this model. Figure 5 shows the schematic representation of A PDE surface representing the source and target surfaces associated with this example. These surfaces have been obtained with the aid of the Bloor-Wilson PDE method by using specific sets of boundary conditions for each respective case. A morphing sequence from the source surface to the target one passing through eleven intermediate surfaces is shown in Figure 6. This sequence is outlined as follows: Figure 6.a corresponds to the PDE representation of a Klein bottle; i. e., the remainder term is included, which is transformed into Figure 6.b by changing its boundary conditions according to Equation (10) when i = 1. Then, Figure 6.b evolves into Figure 6.c successively until the last change in the boundary conditions is carried out, which is schematised in Figure 6.l. Finally, Figure 6.m represents the original PDE representation of the dolphin. The sequence qualitatively shows how the Klein bottle is smoothly transformed into the dolphin. For instance, it can be noticed a gradual appearance of the dorsal and lateral fins of the dolphin together with a progressive growth

20

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

(a)

(b)

(c) (a)

(j)

(d)

(e)

(f)

(g)

(h)

(i)

(k)

(l)

(b)

Figure 5. PDE surfaces associated with a Klein bottle (a) and a dolphin (b) employed to assess the efficiency of the methodology based on the gradual variation of the boundary conditions.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

(m)

Figure 4. Sequence showing how the source surface Ss , representing a sea shell, has been morphed into the target one St , a Klein bottle, by using a gradual change in the boundary conditions and finding each of the intermediate surfaces via the proposed PDE method.

of the tail, which has been completely formed from the beginning of this sequence. The time employed in the computation of such a morphing sequence has been equal to 2.662 seconds using a mesh containing 20 × 20 points for each surface patch. Thus, the results obtained through the two examples studied in this work suggest that this method can be used for morphing surfaces without losing its advantages of speed and accuracy. B. Results obtained by varying the number of Fourier modes in the series The effects of varying the number of Fourier modes employed for computing intermediate PDE surfaces in a morphing sequence are assessed here. The two examples considered in the previous case are again used. The Fourier series associated with their respective PDE surfaces Ss and St have been expanded to 5 modes. Thus, according to the methodology proposed in Section 3.2, it is possible to find 10 intermediate surfaces; the first five are computed by decreasing the Fourier mode for which Equation (6) and using the boundary conditions associated with Ss , whilst the remaining surfaces are computed by increasing the Number of Fourier modes

© 2007 ACADEMY PUBLISHER

(j)

(k)

(l)

(m)

Figure 6. Sequence showing how the source surface Ss (Kelin Bottle) has been morphed into the target one St (dolphin) by using a gradual change in the boundary conditions and finding each of the intermediate surfaces via the proposed PDE method.

used in Equation (6) from 1 to 5 and using the boundary conditions corresponding to S t . The results obtained by morphing a sea shell into a Klein bottle (Figure 3) are sketched in Figure 7. The results outlined in this figure suggest that no change is achieved by varying the Fourier mode for which the solution to the PDE has been expanded. However, this is due to the cylindrical symmetry of the objects involved in this sequence. The time employed in calculating this sequences has been equivalent to 0.989 seconds when the mesh contains 40 x 40 points. Now, regarding the results obtained for the case posed by transforming a Klein bottle, S s , into a dolphin, S t , are sketched in Figure 8. The first (Figure 8.a) and last

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

(a)

(b)

(d)

(j)

(c)

(e)

(g)

(l)

(Figure 8.l) figures correspond to the source and target surface respectively, whereas the remaining ten figures outline the transition between them. Again, the sequence presented in Figure 8 shows little or no morphing between these two surfaces. This is due to the nearly perfect cylindrical symmetry observed by the two objects involved in the morphing sequence. Therefore, the efficiency of this methodology cannot be exclusively assessed. The time consumed in obtaining such a sequence has been 1.428 seconds using a mesh using 20 x 20 points for each surface patch associated with the geometric model of a dolphin used in this work. The examples employed through this work have been proved unable to assess the efficiency of this methodology and therefore, the future use of another example is proposed. Thus, a third example is used to assess the efficiency of this alternative. Such an example consists of the transformation of a super ellipsoid into a super toroid. the Cartesian coordinates of the super ellipsoid are given in terms of the parametric coordinates u and v by

y = β sinn1 (v) sinn2 (u) , © 2007 ACADEMY PUBLISHER

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

(j)

(k)

(l)

(i)

Figure 7. Morphing sequence obtained by varying the Fourier mode of the expansion when the source surface consisting of a sea shell whilst the target one is represented by a Klein bottle.

x = α sinn1 (v) cosn2 (u) ,

(a)

(f)

(h)

(k)

21

Figure 8. Morphing sequence obtained by varying the Fourier mode of the expansion associated with the solution of the PDEs when the source and target surfaces surface represent a Klein bottle and a dolphin respectively.

and z = γ sinn1 (v) , where the constants α, β and γ denote the scale on each direction, n1 and n2 are constants controlling the shape of the ellipsoid, 0 ≤ u < 2π and 0 ≤ v < π. Analogously, the coordinates associated with the super toroid are determined by x = rx (γ + α cosn2 ) (v) cosn1 (u) , Y = ry (γ + α cosn2 ) (v) sinn1 (u) , and z = rz α sinn2 (v) , where the constants rx , ry and rz denote the scales on each direction, α and γ represent the inner and outer radius respectively, n 1 and n2 are constants controlling the shape of the ellipsoid, whereas the domain is defined by 0 ≤ u < 2π and 0 ≤ v < 2π. Figure 9 shows a set of source and target surfaces to use as a third example for assessing the alternative based on the variation of the Fourier mode. Figur 9.a corresponds to a super ellipsoid obtained by defining α = 1.0, β = γ = 2.0, n1 = 0.8 and n2 = 1.7, whereas Fig.9.b represents a super toroid that was calculated using r x = ry = rz = 1.0, α = 1.0, β = 2.0, n1 = 0.6 and n2 = 0.7.

22

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

(a)

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

(j)

(k)

(l)

(b)

Figure 9. PDE surfaces associated with a super ellipsoid (a) and a super toroid (b) employed to assess the efficiency of the methodology based on the gradual variation of the Fourier mode.

Figure 10 shows a morphing sequence between a super ellipsoid and a super toroid by varying the Fourier mode. Again the first and last surfaces in this figure correspond to the original super ellipsoid and super toroid respectively. As expected, an abrupt transition between Fig. 10.e and Fig. 10.f is observed as a consequence of changing set of boundary conditions used for solving the PDE. However two subtle transitions can be observed. The first one takes place between Fig. 10.a and Fig. 10.e, whereas the second one occurs between Fig. 10.f and Fig. 10.l. The computing time employed in the calculation of this morphing sequence has been equal to 0.267 seconds when using a mesh composed of 40 x 40 points. Thus, it is shown that the variation of the Fourier mode represents an alternative method for morphing. However, this technique is less efficientthan the one based on the variation of the boundary conditions.

Figure 10. Morphing sequence obtained by varying the Fourier mode of the expansion associated with the solution of the PDEs when the source and target surfaces surface represent a super ellipsoid and a super toroid respectively.

C. Results obtained by combining the two methodologies The combination of the two previous methodologies, the use of a linear combination of the boundary conditions and the variation of the Fourier mode for which the Fourier series is expanded has been proposed as a third methodology for achieving morphing. Again, the boundary conditions associated with the intermediate surfaces are determined by Equation (9) for γ = 1 and i varying from 0 to 10 in Equation (10). In the interest of taking all possible advantage of this methodology, the intermediate surfaces will be computed as follows: The first five are calculated by decreasing the Fourier mode from 5 to 1 along with the first five sets of boundary conditions. The sixth intermediate surface is estimated by using one Fourier mode together with the sixth set of boundary conditions. This one corresponds to the surface with central morph; i.e., it resembles both source and target surfaces equally. The remaining five surfaces are determined by an increment in the Fourier mode and the rest of the pre-determined sets of boundary conditions. The results obtained by morphing a sea shell into a Klein bottle using this methodology are sketched in Figure 11. A sequence consisting of thirteen surfaces has been obtained where a smooth transition between the source and target surface is achieved. This sequence has been computed in 1.921 seconds, time slighter bigger than

© 2007 ACADEMY PUBLISHER

the one employed for obtaining the respective sequence with the exclusive use of a linear combination of the boundary conditions. Figure 12 shows the transformation sequence in which a Klein bottle (Ss ) is transformed into a dolphin (S t ) by sketching the original surfaces and their corresponding eleven intermediate surfaces. A smooth transition similar to the one outlined in Figure 6 is achieved. Again, a gradual appearance of features such as fins and tail together with a progressive change in the topology of the Klein bottle can be observed. This morphing sequence has been computed in 3.1857 seconds, which again is slightly larger than the one invested in computing the respective morphing sequence associated with the use of a linear combination of the boundary conditions exclusively. D. Results obtained by using the spine The last methodology to be evaluated throughout this work consists of using a pre-determined manipulation of the spine and the radial components associated with two given surfaces for achieving intermediate ones. The spine and radial component corresponding to each of the intermediate surfaces are determined by Equation (13) with γ = 1 and i varying from 1 to 10 leading to nine

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

23

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

(i)

(j) (j)

(k)

(l)

(l)

(m)

(m)

Figure 11. Morphing sequence obtained using a linear combination of the boundary conditions and a variation of the Fourier mode simultaneously. This sequence has been obtained by using the PDE surface representation of a sea shell and a Klein bottle as source and target surfaces respectively.

intermediate surfaces. The remainder term associated with each of generating PDE surfaces are combined in an analogous manner in order to obtain a remainder term for each of the intermediate surfaces. This term has been included with the aim of proving that such a term does not modify the obtained results substantially. The use of this methodology for morphing a sea shell into a Klein bottle gives rise to the results sketched in Figure 13, where the surfaces obtained are similar to those obtained by the use of a linear combination of the boundary conditions. However, the computing time used for obtaining this sequence is equal to 0.738 seconds, suggesting that the use of this methodology produces acceptable results faster than the rest of the alternatives studied here. Figure 14 shows the sequence in which a Klein bottle (Fig 14.a) is morphed into a dolphin (Fig 14.k). A smooth transition between these two surfaces similar to the ones obtained for the first and third methodologies is observed. Moreover, the time required for its computation has been equal to 1.1722 seconds, which is the smallest so far for this example. This confirms the hypothesis sustaining that

© 2007 ACADEMY PUBLISHER

(k)

Figure 12. Morphing sequence obtained by using a linear combination of the boundary conditions and a variation of the Fourier mode simultaneously for transforming a Klein bottle into a dolphin.

the spine could represent a powerful parameter by which smooth morphing could be obtained. V. D ISCUSSION A direct comparison between the methodology presented in this work in general and some others is not a very straightforward task to carry out. However, it is necessary to highlight the existing differences between the alternative presented in this work and those techniques based on the use of generalised cylinders. The works presented in [18] and [19] uses generalized cylinders for achieving morphing under different scenarios; the first uses Boolean operators to create, morph and animate objects; whereas the second achieves morphing by including Fourier interpolation to the process. Some of the differences are listed below: • The techniques based on generalised cylinders are not based on the use of partial differential equations as a surface generating tool. • The use of Fourier interpolation as a morphing tool in [19] consists of controlling the region of the crosssectional curve which want to be morphed along the axis. This technique differs from the ones presented in our work; however, it can be easily adapted to our methodology.

24

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

(a)

(b) (a)

(c)

(f)

(i)

(d)

(g)

(j)

(e) (c)

(d)

(e)

(f)

(g)

(h)

(i)

(j)

(k)

(h)

(k)

Figure 13. Sequence showing how the source surface representing a sea shell has been morphed into the target one, a Klein bottle, by using a linear combination of their spine and radii.

The time reported in [19] refers to the time employed in rendering some of the objects presented in this work; however, this work does not report the times required for morphing two different objects and thus, it is not possible to compare the efficiency of this technique to the methodology based on the use of partial differential equations. Thus, it can be concluded that the ideas presented through this work can be enriched by some of the arguments employed throughout the works discussed in this section without losing its contribution to the field as PDE-based methodology for achieving morphing. •

VI. C ONCLUSIONS Shape morphing using partial differential equations and adapting the PDE method formulated by Bloor and Wilson has been achieved by taking advantage of its numerous mathematical properties enabling the implementation of different methodologies for the purpose. Four alternatives are described in this work: the first one consists of a linear combination of the prescribed boundary conditions associated with the source and target surfaces, the second alternative explores the effects of morphing by varying the number of Fourier modes for

© 2007 ACADEMY PUBLISHER

(b)

Figure 14. Sequence showing how the source surface representing a Klein bottle has been transformed into the target one, a dolphin, with the aid of a linear combination of their respective spines.

which the source and target surfaces are expanded, whilst the third results from a combination of the previous two. The fourth methodology assesses the use of the spine of these surfaces as a morphing tool by using a linear combination of the spines associated with the generating PDE surfaces. Two examples have been used to evaluate the efficiency of these methodologies obtaining interesting results. Notice that the examples studied here carry out morphing between two objects that are not topologically equivalent proving that the method proposed in this work can achieve smooth morphing between any two objects. Additionally, one of the examples morphs two objects that are represented by a different number of PDEs without presenting unwanted effects. The third and fourth alternatives are likely to be more successful than the other methodologies proposed since both offer smooth results and the former includes the variation of the parameters, whilst the latter requires less time for its computation. The use of the second alternative is not recommended for morphing objects with cylindrical symmetry since their Fourier expansion only requires one mode. The major advantage of using surface generation techniques based on PDEs such as Bloor-Wilsons PDE method as a morphing tool relies on the fact that the intermediate surfaces can be obtained in virtually real time and the intermediate surfaces can be as smooth as required. Furthermore, the morphing

JOURNAL OF MULTIMEDIA, VOL. 2, NO. 6, NOVEMBER 2007

methodology presented in this work modifies one or several parameters inherent to PDE surfaces avoiding complications offered by other methodologies such as those based on subdivision or NURBS where the nontrivial task of modifying each control point describing the surface is required. Therefore, the proposed PDE method represents an excellent choice for developing an interactive morphing tool and further studies concerning its potential may encourage a formulation of such a tool. Future work on this area can be oriented towards the use of different values of  for each of the boundary conditions, which may result particularly useful when some features characterizing the target surface need emphasis at the early stages of the morphing sequence. Additionally, the use of nonlinear weighted sums of the boundary conditions represents another alternative for achieving morphing that can be explored in the future. This may be useful when dramatic morphing effects are required. Thus, the potential of the PDE method proposed here can be extended further. Another alternative for expanding this work consists of developing a methodology in which the morphing process is determined by a rate of change in the arc of length that is transformed from the original boundary curve into the source ones [19].

25

[11] G. Turk and J. F. OBrien, “Shape transformation using variational implicit functions,” in Proc. ACM SIGGRAPH ’99, 1999, pp. 335–342. [12] G. Gonz´alez Castro, H. Ugail, P. Willis, and I. Palmer, Visualization, Imaging and Image Processing. ACTA Press, 2006, ch. Shape Morphing Using PDE Surfaces, pp. 553–558. [13] H. Ugail, “Spine Based Shape Parametrisation for PDE Surfaces,” Computing, vol. 72, pp. 195–204, 2004. [14] M. I. G. Bloor and M. J. Wilson, “Using partial differential equations to generate free-form surfaces,” Computer-Aided Design, vol. 22, no. 4, pp. 202–212, 1990. [15] H. Ugail, M. I. G. Bloor, and M. J. Wilson, “Techniques for interactive design using the PDE method,” ACM Transactions on Graphics, vol. 18, no. 2, pp. 195–212, 1999. [16] J. J. Zhang and L. H. You, “Fast surface modelling using a 6th order PDE,” in Proc. Eurographics 2004, vol. 23, no. 3, 2004, pp. 311–320. [17] H. Ugail, “On the Spine of a PDE Surface,” in Mathematics of Surfaces, M. J. Wilson and R. R. Martin, Eds. Springer, 2003, pp. 366–376. [18] A. Barbier, E. Galin, and S. Akkouche, “A Framework for Modeling, Animating and Morphing Textured Implicit Models,” Graphical Models, vol. 67, no. 3, pp. 166–188, 2004. [19] A. S. Aguado, E. Montiel, and E. Zaluska, “Modeling Generalized Cylinders via Fourier Morphing,” ACM Transactions on Graphics, vol. 18, no. 4, pp. 293–315, 1999.

ACKNOWLEDGMENTS The authors wish to acknowledge the support received by the UK Engineering and Physical Sciences Research Council grants EP/C015118/1 and EP/D000017/1 through which this work has been endeavoured.

Gabriela Gonz´alez Castro obtained her bachelor degree in Physics from UNAM in Mexico and her PhD in Industrial Applied Mathematics from the University of Southampton in the United Kingdom. Currently, she is a post-doctoral research assistant at the School of Informatics of the University of Bradford in the United Kingdom.

R EFERENCES [1] K. C. Hui and Y. Li, “A feature-based shape blending technique for industrial design,” Computer-Aided Design, vol. 30, no. 10, pp. 823–834, 1998. [2] L. Liu, G. Wang, B. Zhang, B. Guo, and H. Shum, “Perceptually based approach for planar shape morphing,” Computer Graphics and Applications, pp. 111–120, 2004, (12th Pacific conference). [3] V. Kraevoy and A. Sheffer, “Cross-parametrization and compatible remeshing of 3D models,” in Proc. SIGGRAPH ’04, vol. 23, 2004, pp. 861–869. [4] G. Wolberg, “Image morphing: a survey,” The Visual Computer, vol. 14, pp. 360–372, 1998. [5] F. Lazarus and A. Verroust, “Three-dimensional metamorphosis: a survey,” The Visual Computer, vol. 14, pp. 373– 389, 1998. [6] D. B. Smythe, A two-pass mesh warping algorithm for object transformation and image interpolation. Technical Report 1030, IML Computer Graphics Department, Lucasfilm, San Rafael California, 1990. [7] T. Beier and S. Neely, “Feature-based image metamorphosis,” in Proc. SIGGRAPH ’92, vol. 26, 1992, pp. 35–42. [8] S. Lee, K. Chwa, J. Hahn, and S. Y. Shin, “Image morphing using deformation techniques,” Journal of Visualization and Computer Animation, vol. 7, pp. 3–23, 1996. [9] S. Cohen, G. Elber, and R. Bar-Yehuda, “Matching of freefrom curves,” Computer-Aided Design, vol. 29, no. 5, pp. 369–378, 1997. [10] S. Takahashi, Y. Kokojima, and R. Ohbuchi, “Explicit control of topological transitions in morphing shapes of 3D meshes,” in Proc. Pacific Graphics ’01, 2001, pp. 70– 79.

© 2007 ACADEMY PUBLISHER

Hassan Ugail received his first degree in Mathematics and a postgraduate degree in Education from King’s College London in 1995 and 1996 respectively. Between 1996 and 1999 he was a research student at the School of Mathematics at University of Leeds and received his PhD in 2000. He then worked at the School of Mathematics at University of Leeds as a postdoctoral research fellow until 2002. He was appointed to a lecturer at the School of Informatics at University of Bradford in 2002. He is currently a senior lecturer and head of Distributed Virtual Environments research at Bradford.

Suggest Documents