International Journal of Physical Sciences an Efficient Technique for Morphing Zero-genus 3d Objects

In this paper, we present an algorithm to morph a zero-genus mesh model to a topologically equivalent one based on spherical parameterization, as it is the natural parameterization method for this kind of objects. Our algorithm starts by normalizing the two objects to the cube of unity, as a preprocessing step. Then, the two normalized models are parameterized onto a common spherical domain. We reposition the points of the objects on the sphere in accordance to the relative areas of their triangles. Repositioning on the sphere prevents point clustering and overlapping during the matching process. Experimental results are presented to demonstrate the efficiency of the algorithm.


INTRODUCTION
Shape changing has gained attention due to the attraction of scenes people see on the screen.Indeed, morphing is derived from the biological term "metamorphosis", meaning the change in form and often habits of the individual during normal development after the embryonic stage.Therefore, it suits very well modeling computer animation techniques dealing with the design of algorithms changing one object into another over time (Sompagdee, 2009).In other terms, morphing is an interpolation technique used to create from two objects a series of intermediate objects that change continuously to make a smooth transition from the source object to the target object.Morphing has been done in two dimensions by varying the values of the pixels of one image to make a different image, or in three dimensions by doing the same.We are presenting here a new type of morphing, which is applied to the geometry of three dimensional models, creating intermediate 3D objects which can be translated, rotated, scaled, and zoomed into.
The history of morphing can be categorized into two categories: 2D and 3D morphing.2D morphing seems to have reached its goals in finding the solutions for the transformations as well as feature handling, while 3D morphing is still far behind 2D success (Sompagdee, 2009).

Two-dimensional morphing
In general, 2D morphing techniques require a lot of manual processes.They can be classified into two categories: image-based and geometric-based.*Corresponding author.E-mail: amira_mohamed@ci.suez.edu.eg,mohamed_mousa@ci.suez.edu.eg,nassar@ci.suez.edu.egAuthor(s) agree that this article remain permanently open access under the terms of the Creative Commons Attribution License 4.0 International License

Image-based morphing
Image-based approaches are used enormously in the entertainment industry.Algorithms here are generally composed of three major steps: control, warping and cross dissolving.For controlling the morphing process, these algorithms rely heavily on the experience and knowledge of animators to define correspondence points.Good results can be obtained by using images captured from similar angles and positions regarding the lack of the depth information for generating intermediate objects.Beier and Neely (1992) proposed the line segment feature based method.Where, animators have less work but the complexity of calculation is increased.Lee et al. (1995) used moving curves called snakes in order to capture features accurately and fasten the process of feature defining.

Geometric-based morphing
For geometric-based approaches, 2D polygons are given as input.Sederberg and Greenwood (1992) proposed a minimization method without user interaction.New vertices are added to the polygon that has less number of vertices.All possible paths are calculated but only the best path, the one that gives a minimum amount of work or less shrinkage, is selected.Gao and Sederberg (1998) improved the method to measure the amount of work as well as the way to find the least work path.Shapira and Rappoport (1995) embedded skeletons inside each polygon by decomposing the polygon into star-shaped pieces with a star origin inside each piece then they connected those star origins.For interpolation, skeletons are interpolated and star pieces are unfolded.

Three-dimensional morphing
Three-dimensional morphing algorithms transform a 3D model into another.The complexity of an algorithm depends on many factors, such as: the object representation, genus, and convexity.The simplest morphing can be done when the initial and final shapes are convex and similar in their geometry and topology.Usually, 3D methods have restrictions on object models and how models are represented.Concave objects are more difficult to morph than convex ones.Objects with a different genus, e.g. with holes or with a closed surface are very complicated to transform.Without user intervention, it is not possible to get the desirable results.The existing solutions are categorized by object representations as follow (Sompagdee, 2009): (i) Polygonal-based representation: The objects are represented by their boundaries.This representation is commonly used and is easy to obtain.Elef et al. 303 (ii) Volumetric representation: The 3D models are described either by their geometric primitives or by volumes (volumetric data sets).A volumetric representation is ideal for modeling the behavior of objects with complex interior structures.In particular, this representation helps overcome the limitation on model types.

CONTRIBUTION
Our approach is focused on creating the series of intermediate objects, using spherical parameterization as a common domain of the source and target zero-genus objects.This parameterization domain is the natural domain to use, given when our object is a sphere, and as such-makes the mapping step easier.
To create this series of intermediate objects, we start by parameterizing the source and target objects on the sphere.We use progressive meshes (Hoppe, 1996;Zhou et al., 2004) in combination with a local smoothing strategy (Shen and Makedon, 2006) to find the final spherical parameterization.Then we create the point-topoint correspondence between the objects using the AABB tree search technique (CGAL, 2010).The spherical parameterization which we have used makes the mapping step easier since the objects are mapped to their natural parameterization domain.

Initial spherical parameterization
Parameterization of 3D mesh data is important in such applications as, texture mapping, remeshing and morphing.Closed manifold genus-0 meshes are topologically equivalent to a sphere; hence this is regarded as the natural parameterization domain for it.Parameterizing a triangle mesh onto a sphere means assigning a 3D position on the unit sphere to each of the mesh vertices, such that the spherical triangles induced by the mesh connectivity are not too distorted and do not overlap.Satisfying the non-overlapping requirement is the most difficult and critical component of this process.Moreover, it is usually an expensive optimization procedure for large meshes.Here, we describe the spherical parameterization algorithm we use, which is based on the algorithm proposed in (Praun and Hoppe, 2003;Zhou et al., 2004;Shen and Makedon, 2006).The later algorithm incorporates a local parameterization scheme into the progressive mesh representation (Hoppe, 1996).This reduces the complexity of global optimization for large meshes.
Given a triangle mesh , the problem of spherical parameterization is to form a continuous invertible map from the unit sphere to the mesh.That's, .The map is specified by assigning for each mesh vertex a parameterization .Therefore, each mesh edge is mapped to a great circle arc, and each mesh triangle is mapped to a spherical triangle bounded by these arcs.The spherical parameterization algorithm consists of two major steps: (i) A progressive mesh representation, , with embedded local parameterization information is generated from the original mesh .This is performed by iterating the successive edge collapse operations until the current simplified mesh becomes a convex polyhedron .The obtained polyhedron is considered as the base mesh of .For each edge collapse, the two decimated vertices are parameterized over the resulting simplified mesh.The local parameterization information is recorded in .(ii) Suppose that the centroid of the base mesh is the center of the unit sphere.The projection of the vertices of onto the considered sphere produces an initial spherical mesh.Starting from this initial spherical mesh, the sequence of vertex split operations, the inverse of the edge collapse, in is performed progressively.For each vertex split operation, the two split vertices are positioned on the unit sphere using the recorded connectivity and embedded parameterization information.
The key point of the progressive mesh hierarchical structure is the choice of the order of the edges to be collapsed.Here, we use the selection strategy proposed by Garland and Heckbert (1997) to determine the edge collapse order and to position the newly created vertices.In the classical progressive mesh representation (Hoppe, 1996;Zhou et al., 2004), the geometrical and topological information of each removed vertex are recorded in a vertex splitting operation during the decimation process.Thus the vertex can be completely recovered during progressive refinement process.
However, this information is not suitable to reposition the recovered vertex on the unit sphere when the same vertex split sequence is performed on the corresponding spherical mesh.In what follows, we present how to reposition the recovered vertex according to the relative position with respect to its first order neighborhood in the original mesh.As shown in Figure 1 (left and middle), edge is collapsed and a new vertex is created.Let be first order neighborhood of the vertex .Using the MAPS algorithm (Lee et al., 1998), is flattened into a planar region .The vertices and are embedded into and find the triangles and containing and respectively.The barycentric coordinates , of the embedding of and inside and respectively.Therefore, and can be locally parameterized with respect to the containing triangles and using the barycentric coordinates .The local parameterization information of the two decimated vertices, together with all collapse information of the edge, is recorded in avertex split operation for later reconstruction on the sphere.The final form of the progressive hierarchy of the given mesh is , where is the convex base mesh and the are the ordered split operations.That is .Starting from this base spherical mesh which is generated by projecting the convex base mesh onto the unit sphere, the vertex split operations in are performed progressively to simultaneously recover the original mesh and construct the spherical parameterization.Let be the recovered mesh after performing the ths vertex split operation, be its corresponding spherical mesh.The ths vertex split operation is then performed as follows.With the containing triangles and barycentric coordinates of the two new vertices and retrieved from ; two new vertices and are inserted into with the same connectivity as in and positioned on the unit sphere by: Where and are the triangles in corresponding to and respectively.

Local spherical improvement
The local spherical improvement uses iterations overthe vertices of the initial parameterization on the unit sphere (Shen and Makedon, 2006).At each vertex, it tries to reposition in the local neighborhood to gradually improve the mapping quality.The triangles composing the local neighborhood is piece-wise linear.Therefore it can be projected on the 2D plane while preserving the relative area of each spherical triangle.Given that the vertex to reposition, Figure 2 shows an example of the projection of on a 2D plane.Supposing that , the signed area of the triangle can be computed by: Thus, replacing with and treating and as the only unknowns in the previous equation, we can formulate a system of linear equations using all the triangles in the spherical and solve it in the least squares sense to locate a new center vertex position.This new center position minimizes the square sum of the relative area differences between on the object and on the sphere .Note that only the center position is concerned here.This indicates that the border of spherical is fixed,and consequently that.the total area of the spherical cannot be changed.Therefore, each triangle in the spherical aims to achieve not its correct absolute area but the correct area relative to the other triangles in .For example, Let be the set of projected triangles depicted in Figure 2 and be the corresponding triangles on the object.If we use to denote the area of a triangle, the relative area of can be given by: = In order to preserve this relative area, on the 2D project should have an ideal area of, Where , is the total area of the 2D projection of the parameter submesh.To calculate the new location ) for the parameter submesh center on its 2D projection, the following system of linear equations is formulated: The new center location is obtained by solving this linear system in a least squares sense.

MESH MAPPING
Now that we have the source and the target 3D objects parameterized on the sphere, the objective here is to find the point-to-point correspondence between the two parameterized objects.According to the number of points in the two objects, we have two kinds of mesh mapping: (i) M to M mapping: The two input objects have the same number of points.We use the nearest neighbor algorithm (Manolis et al., 1997) to find the point to point correspondence.To avoid the case that multiple points are matched to a single point, we associate with each point an attribute, valued by true or false, to indicate whether that point is selected before or not.
(ii) M to N mapping: The source and the target objects have not the same number of points.Without loss of generality, assume that the source object has more points than the target object.To overcome this inequality problem we subdivide the target object using the subdivision algorithm (Kobbelt, 2000) such that the two objects have an equal number of points.We fall again in the first kind--M to M mapping.It can be seen that M to N mapping is more costly than M to M mapping, simply since we apply M to M mapping in addition to the subdivision step.M to N mapping has the disadvantage of being time consuming.We use an enhanced implementation of nearest neighbor searching called AABB tree (CGAL, 2010).The AABB tree features a static data structure and algorithms to perform efficient intersection and distance queries against sets of finite 3D geometric objects.Using this static data structure, we build a tree with the vertices of the target object.We then use the tree to find for each point of the source object the corresponding nearest neighbor from the tree.

RESULTS
The methods described in the preceding sections have been implemented in C++ and using CGAL the Computational Geometry Algorithms Library (CGAL, 2010).The experiments are carried out on a PC with a 2.8 GHZ dual-core processor and 2GB of memory.The input objects are in the form of triangular meshes.Before constructing the spherical parameterization of our objects, we apply the following two preprocessing steps: (1) Normalize the input models to a cube of unityto get a smooth and a robust transition between the input and output objects.This normalization of each object is performed separately.For each object, the centroid of the object is translated to the origin of the coordinates.Then, calculate the distance, of the farthest point with respect to the origin.Finally, divide the coordinates of each point, , by to get the normalized point .
(2) If the objects are not sufficiently sampled, apply surface subdivision to enhance the mapping between the input and output objects.
Figure 3 shows the spherical parameterization of two triangular meshes the input object is the Stanford bunny and the target object is the Gargoyle.In our experiment, the parameterization time is 79 s for the Gargoyle (100 k points and 200 k triangles).Once the spherical parameterization is constructed for the input and target objects, we construct the AABB tree for the set of spherical triangles of the target object (the gargoyle, in our case) for the mapping step, as shown in Figure 4. Once the matching step is performed, a linear interpolation is performed between the set of points of the Bunny and the corresponding points in the Gargoyle.This interpolation creates the set of frames to be visualized as the final morphing animation.Figure 5 shows the series of the frames that creates the morphing of Bunny-Gargoyle.

CONCLUSIONS
In this paper, we propose a novel technique for 3D mesh morphing capable to interpolate between arbitrary zerogenus objects.The technique can be presented as an animation by creating a series of intermediate objects using the spherical parameterization as a common domain of the source and target objects.We converted both objects into the same spherical domain with suitable modifications to reposition of the points on the sphere.This repositioning prevents the morphing from creating overlapping or clustering of points on the sphere during the mapping step.Then we carry out mesh mapping to realize the morphing process and this happened by using the point-to-point correspondence between the objects of the AABB tree search algorithm.The spherical parameterization which is used to make the mapping step easy since the objects are mapped to their natural parameterization domain.

Figure 1 .
Figure 1.An edge collapse operation.(A) (Left) the edge to be collapsed.(B) (Middle) The mesh after the edge contraction.(C) (Right) Parameterizing the deleted vertices using the created triangles.

Figure 2 .
Figure 2. The local neighborhood projected on the 2D plane.

Figure 3 .
Figure 3. (A) Left two images.The input triangular mesh of the Stanford Bunny (39 k points, 70 k triangles) and, its spherical parameterization, (B) Right two images.The target triangular mesh of the Gargoyle (100 k points and 200 k triangles) and its spherical parameterization.

Figure 4 .
Figure 4.The AABB tree for the set of the spherical triangles of the gargoyle.

Figure 5 .
Figure 5.The sequence of morphing the stanford bunny to the gargoyle.