Journal of Mathematics
Volume 2021 (2021), Article ID 9945984, 9 pages
https://doi.org/10.1155/2021/9945984

Research Article

Optimal Intersection Curves for Surfaces

Jiwen Gao,¹ Faiza Sarfraz,² Misbah Irshad,² and Jia-Bao Liu³

¹College of Modern Service Industry, Hefei College of Finance & Economics, Hefei 230601, China
²Department of Mathematics, Lahore College for Women University, Lahore, Pakistan
³School of Mathematics and Physics, Anhui Jianzhu University, Hefei 230601, P.R., China

Correspondence should be addressed to Faiza Sarfraz; faizasarfraz03@yahoo.com

Received 17 March 2021; Revised 27 May 2021; Accepted 13 June 2021; Published 17 August 2021

Academic Editor: Ghulam Mustafa

Copyright © 2021 Jiwen Gao et al. 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.

In this article, an algorithm has been established to approximate parametric-parametric, explicit-implicit, and explicit-explicit surface intersection. Foremost, it extracts the characteristic points (boundary and turning points) from the sequence of intersection points and fits an optimal cubic spline curve to these points. Moreover, this paper utilizes genetic algorithm (GA) for optimization of shape parameters in the portrayal of cubic spline so that the error is minimal. The proposed algorithm is demonstrated with different types of surfaces to analyze its robustness and proficiency. In the end, all illustrations show the effectiveness of the algorithm which makes it more influential to resolve all complexities arises during intersection with a minimal error.

1. Introduction

Surface/surface intersection (SSI) has enormous applications in diverse fields while dealing with two surfaces/curves’ intersection problems. It is a fundamental ingredient in computer graphics to develop different shapes of ultrasonic machines (3D images from ultrasonic machines can be joined with CAD images for good results), airplanes, architecture designs, etc., via a variety of surfaces. With the advancement in 3D technologies, such as in laser scanning, one can scan more precisely even at a significant distance. Similarly, in engineering, curve of intersection (COI) is achieved by the intersection of different solids such as prism-prism, prism-cone, and cone-cone. It deals with complex mathematical geometry which arises in designing of automotive at large scale. A huge collection of work, extending back quite a few years, addresses the issues related to SSI. This is still an important issue in industrial engineering and mathematical fields. Usually, nonempty intersection intends to find an error bound for approximation of intersection curves, see, for example, [1–5] and references therein.

The algorithm proposed in [6] focused on evaluating intersection curves of rational polynomial parametric surface patches, which is based on a validated ordinary differential equation system solver. Later on, they emphasized on the marching method [7] for solving problems which offer remarkable advantages, but still their approach is facing some problems because of complicated initial and boundary values. In the same way, an approach in [8] worked on solving differential geometry problems of hypersurfaces; also, they are doing this research [9] by increasing dimensions of surfaces which take more time for showing results. Extracting boundary and turning points of parametric surface intersection curves by the GK method are discussed in [10, 11]. Their topology is still confronting problems of error that come up through surface intersection. Also, the methodology in [12] is used for finding characteristics points, but excess of points are calculated for appropriate results.

Explicit and implicit surfaces are not extensively used in a variety of fields, but researchers did remarkable work whatever the circumstances occurred during research. In the medical field, scientists used an explicit surface-based method for the cortical thickness of the brain [13]; still, they are doing their work on that purpose. In CAD, hybrid models can be merged with explicit models [14] for removing ambiguities and getting better graphic results. The problems occurring in ocean-free surface models can be solved explicitly or implicitly. In explicit surfaces, scaling behavior on parallel systems is better than implicit schemes [15] because baro-clinic time steps are used in implicit surfaces and are larger than the time-stepping scheme in explicit surfaces.

Collectively, methods involving implicit surfaces are quite diffusive because global communication in each iteration makes the method’s scale poorer; while explicit surface methods have flexibility to resolve all possible difficulties during the iteration process. The combination of these surfaces is good for intersection because if one surface is creating some problem during intersection the other may overcome the situation.

Soft computing behavior such as computational intelligence, is a blend of different techniques such as fuzzy logic [16], simulated annealing, genetic algorithm, numerical technics [17], etc., whose objective is to solve computational problems which is based on natural evolution theory [18], which is not easily demonstrated numerically. In this research work, a genetic algorithm is utilized, which is useful in getting optimal outcomes.

While a lot of work has been done on SSI issues, still there is hardly any established algorithm which can deal intersection of all types of surfaces. Each approach that was discussed in the previous section has its own disadvantages and limits. This motivated us to develop an optimal technique using genetic algorithm and cubic spline function, which can be used to approximate intersections of wider range of surfaces. The technique proposed in this paper works equally well to approximate intersection curves for following three cases of intersection of surfaces:

1Intersection of two explicit surfaces2Intersection of one implicit and one explicit surface3Intersection of two parametric surfaces

This paper is organized as follows. Section 2 includes the materials and methods of proposed approach. Genetic algorithm is discussed in Section 3. Results and discussion is given in Section 4. This paper is concluded in Section 5.

2. Materials and Methods

The proposed approach takes two surfaces as input. These surfaces may consist of two explicit surfaces and in , which are defined as

where .

One implicit and one explicit surface and are represented by

where .

Two parametric surfaces and in are denoted as

where .

In order to find sequence of intersection points of all above surfaces, the solution of the following equations is required, respectively:

Additionally, its nonempty intersection contains isolated sequence points and curves of intersected pieces.

2.1. Characteristic Points

Characteristic points are the subset of the sequence of intersection points which helps to identify the shape of intersection curves, including all the turning and boundary points.

2.1.1. Boundary Points

The boundary points can be determined by imposing the following conditions: , , , and in equation (4).

2.1.2. Turning Point

A point where curve changes its direction or where intersected curve makes a sharp turn is called turning point. The turning points can be estimated by finding

(i)The inflection point of equation (4)(ii)The points where curve (4) has slope 0, 1, or −1(iii)Where the function changes its curvature(iv)When derivative changes its sign

2.2. Cubic Spline Interpolant

Cubic spline function [19] is used to fit the curve at the points obtained in the previous section. Let and , , be distinct characteristic points. Moreover, the slope of tangent associated to these points is denoted by , and and are shape control parameters. Then, the cubic function is considered as

satisfying the following properties:

where denotes first derivative with respect to , which yields interpolating conditions as

So, takes the form:

The above equation can be rewritten as

where , , , and .

The functions , are like Bernstein Bezier basis functions such that

Two cases of optimal intersection curve are discussed below.

In order to achieve optimal curve fitted to characteristic points, the sum of squares of distances between data (intersection) points and approximated points using cubic spline should be minimized, i.e.,

where chord length parameterization which is used for parameter needs to be minimized.

In this procedure, such values of the shape control parameters and must be chosen with the help of genetic algorithm so that (equation (11)) is minimal and the following two cases may arise to do so.

Case 1.
Shape parameters are taken as equal in this case, so the objective function (11) depends on one variable only.

Case 2.
Shape parameters are not taken as equal in this case. The process of finding the best curve is the same as above by taking objective function (11) as a function of two variables.
Moreover, in this paper, results are obtained using case 2 as case 1 is special case of case 2.

3. Genetic Algorithm

As cubic spline has two parameters and , in case of achieving optimal values of and , a soft computing technique, i.e., genetic algorithm (GA) [18] is used. Genetic algorithm is one of the powerful evolutionary-based optimization technique to tackle complicated optimization problems. It forms adaptive patterns of searching, based on natural genetics and designs of natural selection. Natural evolution process works under some genetic operators (selection, crossover, and mutation). This procedure moves from one parent population (chromosomes) to another by using genetic operators where every chromosome consists of more than one bit strings. Selection operator helps selecting chromosome which allowed to reproduce and would die out. Crossover operator generates new chromosomes by exchanging some area of two bit strings (chromosomes) mutually. Mutation operator disseminates some new characteristics among the bit strings for more variety of chromosomes. Figure 1 shows an example of crossover and mutation operator for some particular choice of chromosomes.

Figure 1: Execution of crossover and mutation operator.

GA does not need any lengthy mathematical formulation for better results and rise as a significant technique which solves complex problems in short time with appropriate results. GA choses random values of the parameters from certain population and application of iterated process of GA along with genetic operators, selection, mutation, and crossover which specifically fit the optimal curve to intersection points by finding optimal values of shape control parameters .

For best curve fitted to given data, those values of shape parameters are required, for which the sums should be minimized. GA is used to optimize the values of parameters which help in minimizing the error.

In literature, different methods are used for finding the error. The error occurs when approximated points do not lie on the exact location. The error calculated by the proposed technique in this paper is shown in Tables 1–3. The minimized error gives best approximated curve which shows the efficiency of the proposed approach. Table 4 displays values of parameters which are used for GA.

Table 1: Iterative values with characteristic points of Example 1.

SPV
TE (seconds)
E (SSE)
TOIP
CP

1st iteration

0.047
0.02941
762
(–1.85,–0.39)
(0.19, 0.82)
(–0.15,–0.39)
(2, 1.77)
(–2, 0.5)

2nd iteration

0.039
0.00572

Optimal curve

0.023

Table 2: Iterative values with characteristics points of Example 2.

SPV
TE (seconds)
E (SSE)
TOIP
CP

1st iteration

0.124
0.00365
217
(0, 1.249, 1.562)
(0, −1.249, 1.562)
(1.249, 0, –1.562)
(–1.249, 0, –1.562)
(1.414, 1.414, 0)
(–1.414, –1.414, 0)
(1.414, –1.414, 0)
(–1.414, 1.414, 0)

2nd iteration

0.086
0.00021

Optimal curve

  =  3.82
0.135

Table 3: Iterative values with characteristics points of Example 3.

SPV
TE (seconds)
E (SSE)
TNIP
CS

1st iteration

(1/3, 1/3)

0.049
0.0169
167
(0.993, 0.284)

2nd iteration

0.052
0.00021

Optimal curve

0.047
1.8

Table 4: Parameters utilized for GA.

Sr. no.
Name
Values

1
Population size
25–30

2
Genome length
15

3
Selection rate
0.5

4
Mutation rate
0.01

3.1. Proposed Algorithm Steps

The overall proposed scheme can be described in the form of an algorithm.

 Step 1: input surface data Step 2: find intersection of surfaces by the method mentioned in Section 2 Step 3: extract the characteristics points through criteria given in Section 2 Step 4: fit the spline curve to the points attained in Step 3 Step 5: compute the best optimal value of parameters and by using GA Step 6: if the optimal curve has been accomplished in Step 5, then go to Step 7, otherwise go to Step 4 and repeat these steps until the desired optimal curve is achieved Step 7: Stop

4. Results and Discussion

The execution of proposed approach on intersection of explicit-explicit, implicit-explicit, and parametric-parametric surfaces has been shown in the following examples.

Example 1. Two explicit surfaces are given by

Both explicit surfaces are shown in Figures 2 and 3. Figure 4 depicts intersection of surfaces, while Figure 5 epitomizes the -view of intersection along with boundary and turning points which extracted through criteria given in Section 2. Approximation of sequence of points is displayed in Figure 6. Figures 7 and 8 show how cubic spline is used to fit the curve through 1st and 2nd iterations of GA. The best optimal curve is given in Figure 9 and achieved in 20th iteration of GA.

Figure 2: Explicit surface 1.

Figure 3: Explicit surface 2.

Figure 4: Intersection of both surfaces.

Figure 5: -view of intersection along with boundary and turning points.

Figure 6: Sequence of points.

Figure 7: Cubic spline fitted for 1st iteration of GA.

Figure 8: Cubic spline fitted for 2nd iteration of GA.

Figure 9: Best optimal curve achieved.

Example 2. Implicit and explicit surfaces are given by

Explicit and implicit surfaces are displayed in Figures 10 and 11. Figure 12 portrays intersection of surfaces, while Figure 13 denotes the -view of intersection along with boundary and turning points which are extracted through criteria given in Section 2. Approximation of sequence of points is publicized in Figure 14. Figures 15 and 16 represent how cubic spline is used to fit the curve through 1st and 2nd iterations of GA. The best optimal curve is shown in Figure 17 and obtained after 24th iteration of GA.

Figure 10: Implicit surface.

Figure 11: Explicit surface.

Figure 12: Intersection of both surfaces.

Figure 13: -view of intersection along with boundary and turning points.

Figure 14: Sequence of points.

Figure 15: Cubic spline fitted for 1st iteration of GA.

Figure 16: Cubic spline fitted for 2nd iteration of GA.

Figure 17: Best optimal curve achieved.

Example 3. Two parametric surfaces with parameters are given by

Both parametric surfaces are shown in Figures 18 and 19. Figure 20 illustrates intersection of surfaces, while Figure 21 demonstrates the -view of intersection along with boundary and turning points which extracted through criteria given in Section 2. Approximation of sequence of points is shown in Figure 22. Figures 23 and 24 exemplify how cubic spline is used to fit the curve through 1st and 2nd iterations of GA. The best optimal curve is depicted in Figure 25 and produced in 31st iteration.
Some randomly selected values of shape parameters by GA and characteristics points of Example 1–3 are shown in Tables 1–3. In these tables, CS denotes characteristics points, TNIP denotes the total number of intersection points, E denotes the error, TE denotes time elapsed, and SPV denotes shape parameter values.

Figure 18: Implicit surface.

Figure 19: Explicit surface.

Figure 20: Intersection of both surfaces.

Figure 21: -view of intersection along with boundary and turning points.

Figure 22: Sequence of points.

Figure 23: Cubic spline fitted for 1st iteration of GA.

Figure 24: Cubic spline fitted for 2nd iteration of GA.

Figure 25: Best optimal curve achieved.

5. Conclusion

A new scheme together with a genetic algorithm has been introduced to approximate surface to surface (parametric-parametric, explicit-implicit, and implicit-implicit) intersection curves. Characteristics points are evaluated from sequence points of surface intersection and fit optimal curve using cubic spine. Finest shape parameter values in cubic spline are selected by genetic algorithm. Moreover, it does not include any extra points for approximation. Finally, the optimal outcomes from the proposed technique suggested that it is more reliable scheme with GA in order to overcome surface intersection problems.

Data Availability

All data required for this research is included within this paper.

Conflicts of Interest

Authors declare that they have no conflicts of interest.

Authors’ Contributions

All authors contributed equally in this paper.

Acknowledgments

This work was supported by the Key Teaching Research Project of Quality Engineering in Colleges and Universities in Anhui Province and Hefei College of Finance & Economics Guangzhou Zhuoya Education Investment Co., Ltd. Practical Education Base (subject no. 2020sjjd093).

References

D. Ritelli and G. Spaletta, “Trinomial equation: The hypergeometric way,” Open Journal of Mathematical Sciences, vol. 5, no. 1, pp. 236–247, 2021.

I. Kovcs and T. Vrady, “Constrained fitting with free-form curves and surfaces,” Computer-Aided Design, vol. 122, Article ID 102816, 2020.

S. Motta, A. Montenegro, M. Gattass, and D. Roehl, “A 3D sketch-based formulation to model salt bodies from seismic data,” Computers & Geosciences, vol. 142, Article ID 104457, 2020.

S. Foschi and D. Ritelli, “The lambert function, the quintic equation and the proactive discovery of the implicit function theorem,” Open Journal of Mathematical Sciences, vol. 5, no. 1, pp. 94–114, 2021.

F. Liang, C. Kang, and F. Fang, “A smooth tool path planning method on NURBS surface based on the shortest boundary geodesic map,” Journal of Manufacturing Processes, vol. 58, pp. 646–658, 2020.

H. Mukundun, T. Maekawa, T. Sakkalis, and N. Patrikalakis, “Tracing surface intersections with validated ODE system solver,” ACM Symposium on Solid Modeling and Applications, vol. 4, 2004.

N. M. Patrikalakis, T. Maekawa, K. H. Ko, and H. Mukundan, “Surface to surface intersections,” Computer Aided Design and Applications, vol. 1, pp. 449–457, 2013.

N. H. Abdel-All, S. A. N. Badr, M. A. Soliman, and S. A. Hassan, “Intersection curves of hypersurfaces in,” Computer Aided Geometric Design, vol. 29, no. 2, pp. 99–108, 2012.

M. Salem, O. Alessio, M. Jamali, and M. Hassan, “Transversal intersection curves of hyper-surfaces in R⁵,” 2007, https://arxiv.org/abs/1601.04252.

S. Hur, M. Oh, and T. W. Oh, “Approximation of surface-to-surface intersection curves within a prescribed error bound satisfying G continuity,” Computer-Aided Design, vol. 41, no. 1, pp. 37–46, 2009.

S. Hur, M. Oh, and T. W. Oh, “Classification and resolution of critical cases in grandine and klein’s topology determination using a perturbation method,” Computer Aided Geometric Design, vol. 26, no. 2, pp. 243–258, 2009.

M. Sarfraz, M. Irshad, F. Sarfraz, and M. Zawwar, “A novel approach for surface to surface intersection approximation,” in Proceedings of the Information Visualisation 17th International Conference, London, England, July 2013.

A. Gutman, “Intersection of neuroscience, ethics, and society,” Presidential Commission for the Study of Bioethical, vol. 2, 2015.

S. Ilic and P. Fua, From Explicit to Implicit Surfaces for Visualization. Animation and Modelling, Computer Vision Lab, Swiss Federal Institute of Technology, Zürich, Switzerland, 2008.

M. A. Latif, H. Abdel, S. Ali, and S. A. Naeim, “Intersection curves of implicit and parametric surfaces in R³,” Applied Mathematics, vol. 2, 2011.

I. Silambarasan, “Generalized orthopair fuzzy sets based on hamacher T-norm and T-conorm,” Open Journal of Mathematical Sciences, vol. 5, no. 1, pp. 44–64, 2021.

U. K. Qureshi, A. A. Shaikhi, F. K. Shaikhi, S. K. Shaikh, S. K. Hazarewal, and T. A. Laghari, “New simpson type method for solving nonlinear equations,” Open Journal of Mathematical Sciences, vol. 5, no. 1, pp. 94–100, 2021.

G. Renner and A. Ekárt, “Genetic algorithms in computer aided design,” Computer-Aided Design, vol. 35, no. 8, pp. 709–726, 2003.

M. Sarfraz, Z. Hussain, and F. S. Chaudary, “Shape preserving cubic spline for data visualization,” Computer Graphics and CAD/CAM, vol. 1, no. 6, pp. 185–193, 2005.