Mathematical Problems in Engineering

Volume 2012 (2012), Article ID 732365, 9 pages

http://dx.doi.org/10.1155/2012/732365

## Polygon Morphing and Its Application in Orebody Modeling

Department of Mathematics, Hacettepe University, Beytepe, 06800 Ankara, Turkey

Received 2 December 2011; Revised 15 February 2012; Accepted 27 February 2012

Academic Editor: P. Liatsis

Copyright © 2012 Hacer İlhan and Haşmet Gürçay. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Three different polygon morphing methods are examined. The first one is based on the utilization of the trimmed skeleton of the symmetric difference of the source and target polygons as an intermediate polygon. The second one reduces the problem to the problem of morphing compatible planar triangulations and utilizes the representation of planar triangulations as a matrix constructed using barycentric coordinates of the planar triangulation's vertices relative to their neighbors. The third and last one describes the polygon by the parametric curve representation based on estimated Fourier parameters and thus transfers the morphing process to Fourier parametric space. The different features and comparative results of these methods are shown by the tests with different examples. These methods are used for generating a set of polygonal sections from two nonplanar polygonal sections which are nearly planar in 3D before constructing a three-dimensional object from these nonplanar sections.

#### 1. Introduction

Morphing or metamorphosis is usually defined as the gradual, smooth, and continuous transformation of a source object into a target object [1, 2]. Morphing is used in a variety of applications such as computer graphics, computer animation, industrial design, geometric modelling, and medicine.

The morphing problem has been examined in many domains, such as two-dimensional images [3–5], polygons and polylines [1, 6–12], free-form curves [13], polyhedra and volumetric representations [6, 14, 15]. The morphing process for polygons and polyhedras consists of solving two main problems. The first one, known as the vertex correspondence problem, is to generate a correspondence between geometric elements of the source and target objects. The second one, known as the vertex path problem, is to find paths that corresponding geometric elements travel during the morphing process. In this work, three different morphing methods for polygons with some correspondence between their vertices are compared, and a morphing method for nonplanar polygonal sections in 3D without correspondence between their vertices is generated.

Several approaches have been described on the polygon morphing problem. Shapira and Rappoport [11] presented a polygon morphing technique that takes into account both the interiors and the boundaries of the polygons. This is achieved by representing the interiors of the polygons with compatible skeletons which are called star skeletons and applying the morphing to the parametric description of these skeletons. The generation of corresponding skeletons of two polygons is used, and though theoretically possible for all shapes, it seems natural for similar shapes, but uncertain for rather different shapes. Alexa et al. [1] morphed the interiors of the polygons rather than their boundaries to achieve locally least distorting intermediate polygons. They compatibly triangulated the source and target polygons and developed the vertex paths during the morph in an attempt to maintain compatibility and preserve shape. Firstly they apply an algorithm to divide the source and target polygons into separate isomorphic triangles. Then, they develop a method for interpolating the locations of corresponding boundary and interior vertices along their paths from the source to the target polygons. Blanding et al. [6] described the skeleton-based polygon morphing and then generalized the same procedure directly to three dimensions. They used the trimmed skeleton of the symmetric difference of the source and target polygons as intermediate polygons. Gotsman and Surazhsky [9] described polygon morphing using compatible triangulation to reduce the polygon morphing problem to the problem of morphing compatible planar triangulations and utilized the representation of planar triangulations as a matrix constructed using barycentric coordinates of the planar triangulation’s vertices relative to their neighbors. Chen and Sun [7] described polygon morphing using Fourier parametrization to define the polygon by the parametric curve representation based on estimated Fourier parameters and thus transfer the morphing process to Fourier parametric space. In this work, the last three polygon morphing methods mentioned above are examined, and the last one is used for morphing nonplanar sections which are nearly planar in 3D.

#### 2. Polygon Morphing

Given a source polygon and a target polygon with a correspondence between their vertices, the morphing procedure can be defined by the continuous function , , where and are the source and target polygons, and for all , are intermediate polygons. Additionally, the intermediate polygon is similar to as and similar to as .

##### 2.1. Skeleton-Based Polygon Morphing

Skeleton-based polygon morphing method [6] is based on utilization of the trimmed skeleton of the symmetric difference of the source and target polygons as intermediate polygons.

Each boundary point of the intermediate polygon generated by the morphing process can be defined as points equidistant from the nearest points of the source and target polygons. Similarly, skeletons consist of points minimally equidistant from two boundary points of a given shape. Therefore the skeleton of a shape that incorporates the boundaries of both the source and target polygons can be used for constructing middle polygon generated on the morphing process.

In this method, firstly the intermediate polygon is computed by using the source polygon and the target polygon as shown in Figure 1. To achieve this, first the skeleton of the symmetric difference of a combination of the source and target polygons is computed. Then, the intermediate polygon is generated from the skeleton by applying a trimming operation to the skeleton. Similiary, the intermediate polygon is generated by using the polygons and , and the intermediate polygon is generated by using the polygons and . The same process is applied recursively until a desired sequence of intermediate polygons is produced.

##### 2.2. Polygon Morphing Using Compatible Triangulation

Polygon morphing method using compatible triangulation [9] reduces the problem to the problem of morphing compatible planar triangulations.

The first task in polygon morphing using compatible triangulation is to compatibly triangulate the interiors of the given source polygon and the target polygon with the matching vertices. Then the polygons and are enclosed by identical convex polygons and , and subsequently the annuli between and and between and are compatibly triangulated as shown in Figure 2. These two compatible triangulations with common convex boundary are represented by matrices constructed using barycentric coordinates of the these triangulation’s vertices relative to their neighbors. The next step is to generate the convex combination morph between these two compatible triangulations with common convex boundary to produce desired intermediate compatible triangulation with common convex boundary. Finally, all edges of these intermediate triangulations which do not belong to polygons and are discarded to obtain the desired intermediate polygon. Given polygons and with matching vertices, an overview of all the steps of the method of polygon morphing using compatible triangulation is shown in Table 1.

##### 2.3. Polygon Morphing Using Fourier Parametrization

Polygon morphing method using Fourier parametrization [7] describes the polygon by the parametric curve representation based on estimated Fourier parameters and thus transfers the morphing process to Fourier parametric space.

In this method, firstly the polygon coordinates are transformed to local coordinates, and then polygons are divided into matching segments using the correspondence between their vertices. The Fourier parametrization for each matching segment is computed, and the Fourier parameters are linearly interpolated to generate intermediate Fourier parametrizations. Lastly, the intermediate polygons are constructed using the interpolated Fourier parameters. Given polygons and with matching vertices, an overview of all the steps of the method of polygon morphing using Fourier parametrization is shown in Table 2.

##### 2.4. Results and Discussion

The morphing problem can be solved by using a lot of different methods, but some constraints or desirable properties can be given for morphing procedure. Firstly, if the target polygon is a translation or rotation of the source polygon, then the intermediate polygons should also be an appropriate translation or rotation of the source polygon. Secondly, the area of the polygon generated by morphing should change smoothly as the source polygon turns into the target polygon. As Figure 3 shows, among the examined three methods, polygon morphing method using Fourier parametrization is the only one which guarantees these properties. Thirdly, if the source and target polygons are closed and simple, then the intermediate polygons should also be closed and simple. Figure 3 shows that all of the examined methods achieve this property. The comparative results of these methods are shown in the following experiments. The results of all methods seem natural for similar shapes, but the results of skeleton-based polygon morphing method seem ambiguous for rather different shapes.

As a distinction from the other two methods, skeleton-based polygon morphing method is capable of morphing between two polygons with different topologies, as shown in Figure 4, where the source polygon consists of multiple parts and the target polygon consists of a single part. This method can also be generalized directly to three dimensions. While relative position, orientation, and combination of the source and target polygons can change the results of skeleton-based polygon morphing, the matching vertices between the source and target polygons can have a dramatic effect on the results of polygon morphing method using compatible triangulation and using Fourier parametrization.

#### 3. Morphing of Nonplanar Sections

In mining, for 3D orebody modelling, three-dimensional objects are generated from nonplanar sections by building 3D triangulated or tetrahedral models. In the case where nonplanar sections are away from each other, three-dimensional models cannot be smooth as shown in Figure 5. To build higher quality 3D models, these nonplanar sections should be morphed to generate intermediate sections. Polygon morphing method using Fourier parametrization is utilized for morphing two nonplanar sections which are nearly planar.

To morph nonplanar sections which are nearly planar, firstly the source and target nonplanar sections are triangulated separately. The nonplanar section is specified in 3D, even though the triangulation is 2D. Thus, the nonplanar section is transformed in a plane, the transformed section is triangulated, and the topology of this triangulation is used for the original nontransformed section. To find a plane for triangulation, the most appropriate face of the oriented bounding box of the the nonplanar section can be used. These steps of the triangulation of the nonplanar section are shown in Figure 6.

Let the triangulations of the source and target nonplanar sections consist of the and triangles, respectively, and let the normal vectors of the triangles of the source triangulations be , and let the normal vectors of the triangles of the target triangulations be . Then, the source nonplanar section is transformed in the face of the source-oriented bounding box which has the minimum angle with the line with the normal vector , and similarly the target nonplanar section is transformed in the face of the target-oriented bounding box which has the minimum angle with the line with the normal vector . Thus, these transformed planar sections can be specified in 2D. Then, each transformed section in 2D is separately parametrized proportionally to arclength as , , and the Fourier parametrization for each curve is separately computed as

where Fourier parameters are

for any , and upper left vertex of each transformed section in 2D is chosen as initial vertex. The Fourier parameters are linearly interpolated to generate the intermediate Fourier parametrizations, and the intermediate transformed sections in 2D are constructed using the interpolated Fourier parameters. Let be the number of intermediate nonplanar sections, then the intermediate transformed sections in 2D are transformed into the plane with normal

and center

where and are the center of the planes and , respectively. Thus the intermediate sections are obtained. An overview of all these steps to morph nonplanar sections is shown in Table 3.

Figure 7 shows a set of intermediate sections generated from two nonplanar polygonal sections in 3d, and Figure 8 shows a three-dimensional object of the source, target and intermediate sections. the transformations of nonplanar sections can have an important effect on the results of morphing nonplanar section, namely this method relies on having data organized in nearly planar sections.

#### 4. Conclusion

We have presented the different features and comparative results of three different morphing methods which are skeleton-based polygon morphing, polygon morphing using compatible triangulation, and polygon morphing using Fourier parametrization. According to results, we developed a generalization of the intermediate sections from two nonplanar polygonal sections in 3D which are nearly planar, before constructing a three-dimensional object from these nonplanar polygonal sections to build higher quality 3D models. To achieve this, firstly we needed to solve the vertex path problem. In the skeleton-based polygon morphing method, the source and target objects are combined into a single object as desired instead of generating a correspondence between the geometric elements of the source and target objects. This process is important and has a major effect on the morph history generated. But in mining, there are nonplanar sections with many different initial relative positions and orientations in 3D. Therefore transformed combination of two nonplanar sections in 2D can be constructed, and polygon morphing method using Fourier parametrization is utilized for morphing these two 2D sections, and so intermediate sections are obtained in 2D. Then these intermediate sections are transformed to appropriate location between the source and target nonplanar polygonal sections. In this manner, intermediate polygonal sections in 3D are generated on the morphing process of the source and target nonplanar polygonal sections in 3D. Our method relies on having data organized in nearly planar sections, since transformation of folded sections in 2D cannot be simple, and the method is based on the transformations of nonplanar sections.

#### Acknowledgment

This work is supported by The Scientific and Technological Council of Turkey (no. 108G036).

#### References

- M. Alexa, D. Cohen-Or, and D. Levin, “As-rigid-as-possible polygon morphing,” in
*Proceedings of the 27th Annual Conference on Computer Graphics (SIGGRAPH '00)*, p. 157, New Orleans, Lo, USA, July 2000. - V. Surazhsky and C. Gotsman, “Controllable morphing of compatible planar triangulations,”
*ACM Transactions on Graphics*, vol. 20, no. 4, pp. 203–231, 2001. View at Google Scholar - T. Beier and S. Neely, “Feature-based image metamorphosis,”
*Computer Graphics*, vol. 26, no. 2, pp. 35–42, 1992. View at Google Scholar · View at Scopus - K. Fujimura and M. Makarov, “Foldover-free image warping,”
*Graphical Models and Image Processing*, vol. 60, no. 2, pp. 100–111, 1998. View at Google Scholar · View at Scopus - A. Tal and G. Elber, “Image morphing with feature preserving texture,”
*Computer Graphics Forum*, vol. 18, no. 3, pp. 339–348, 1999. View at Google Scholar - R. L. Blanding, G. M. Turkiyyah, D. W. Storti, and M. A. Ganter, “Skeleton-based three-dimensional geometric morphing,”
*Computational Geometry: Theory and Applications*, vol. 15, no. 1–3, pp. 129–148, 2000. View at Google Scholar · View at Scopus - D. Chen and Y. Sun, “Boundary based parametric polygon morphing,”
*Ieice Transactions on Information and Systems*, vol. E84-D, no. 4, pp. 511–520, 2001. View at Google Scholar · View at Scopus - E. Goldstein and C. Gotsman, “Polygon morphing using a multiresolution representation,” in
*Proceeding of Graphics Interface*, pp. 246–254, Quebec City, Canada, 1995. - C. Gotsman and V. Surazhsky, “Guaranteed intersection-free polygon morphing,”
*Computers and Graphics*, vol. 25, no. 1, pp. 67–75, 2001. View at Publisher · View at Google Scholar · View at Scopus - T. W. Sederberg, P. Gao, G. Wang, and H. Mu, “2-d shape blending: an intrinsic solution to the vertex path problem,” in
*Proceedings of the ACM SIGGRAPH '93 Conference on Computer Graphics*, pp. 15–18, August 1993. View at Scopus - M. Shapira and A. Rappoport, “Shape blending using the star-skeleton representation,”
*IEEE Computer Graphics and Applications*, vol. 15, no. 2, pp. 44–50, 1995. View at Publisher · View at Google Scholar · View at Scopus - V. Surazhsky and C. Gotsman, “Morphing stick figures using optimized compatible triangulations,” in
*9th Pacific Conference on Computer Graphics and Applications*, pp. 40–49, Tokyo, Japan, October 2001. - T. Samoilov and G. Elber, “Self-intersection elimination in metamorphosis of two-dimensional curves,”
*Visual Computer*, vol. 14, no. 8-9, pp. 415–428, 1998. View at Google Scholar · View at Scopus - D. Cohen-Or, D. Levin, and A. Solomovici, “Three-dimensional distance field metamorphosis,”
*ACM Transactions on Graphics*, vol. 17, pp. 116–141, 1998. View at Google Scholar - T. W. Sederberg and S. R. Parry, “Free-form deformation of solid geometric models,”
*Computer Graphics*, vol. 20, no. 4, pp. 151–160, 1986. View at Google Scholar · View at Scopus