Degree Reduction of S-λ Curves Using a Genetic Simulated Annealing Algorithm

The S-λ Curves have become an important research subject in computer aided geometric design (CAGD), which owes to its good geometric properties (such as affine invariance, symmetry, and locality). This paper presents a new method to approximate an S-λ curve of degree n by using an S-λ curve of degree n-1. We transform this degree reduction problem into the function optimization problem first, and then using a new genetic simulated annealing algorithm to determine the global optimal solution of the optimization problem. The method can be used to approximate S-λ curves with fixed or unconstrained endpoints. Examples are given to verify the effectiveness of the presented algorithm; and these numeric examples show that the algorithm is not only easy to implement, but also offers high precision, which makes it valuable in practical applications.


Introduction
Many methods used in Computer Aided Geometric Design (CAGD) are closely associated with probability distributions, particularly discrete distributions (Johnson et al., 2005 [1]).For example, the Bernstein basis functions used in Bézier curves are related to the binomial distribution, the B-spline basis functions used in B-spline curves are connected with some stochastic processes (Dahmen et al., 1986 [2], Goldman et al., 2000 [3], Hu et al., 2018 [4-7]), the Poisson basis functions introduced by Goldman and Morin (2000) were developed from the Poisson distribution, and the Bernstein basis functions of negative degree presented by Goldman (1999) are taken from the negative binomial distribution [8].These basis functions and other basis functions generated from discrete distributions, are important in the approximation process based on approximation theory (Hahn 1980 [9], Khan 1980 [10], Omey 1996 [11], De La Cal J. 1993 [12], Zeng 2005 [13], Zeng and Cheng 2001 [14]).On the basis of these points, Fan and Zeng [15] have explored a novel class of discrete distributions known as S-λ distributions.The curves generated from S-λ distributions are called S-λ curves, which include Bézier curves, Poisson curves, rational Bézier curves, and many others.
Degree reduction of curves and surfaces has important practical significance because the approximation of curves and surfaces by other curves and surfaces of different degree is crucial to data conversion, transmission and compression (Watkins & Worsey 1988 [16], Lutterkort 1999 [17]).However, the efficiency and stability of the existing degree reduction algorithms still have much room for improvement.Two classes of methods for this purpose have been studied extensively.The first class is geometric method based on control points, which is an inverse process of degree elevation and has been used to determine the control points of degree-reduced curves (Ren et al., 2007 [18]).This method utilizes the geometric properties of the Bézier curve itself and some mathematical theories Symmetry 2019, 11, 15; doi:10.3390/sym11010015www.mdpi.com/journal/symmetryincluding generalized inverse matrix method, the best uniform approximation and the least squares approximation theory to achieve the degree reduction of Bézier curve (Cai et al., 2010 [19], Ahn et al., 2004 [20]).Moreover, some other scholars realize degree reduction of Bézier curves and surfaces by perturbing control vertices and using constrained optimization method (Lu et al., 2009 [21], Lu & Wang 2006 [22], Delgado et al., 2007 [23], Ait-Haddou & Barto ň 2016 [24]).The second class is algebraic method based on basis function transformation.In one example that utilized this approach, degree reduction was achieved by constraining Legendre polynomials (Liang et al., 2006 [25]).Similarly, based on Chebyshev polynomials (Rababah et al., 2006 [26], Lu et al., 2008 [27]) or Jacobi polynomials (Xu et al., 2008 [28]), the degree reduction of Bézier curves can be come true.A final interesting group of studies have focused on the problem of the approximate degree reduction of C-Bézier curves (Wang 2009 [29], Qin et al., 2013 [30]).Here we present a new method for the degree reduction of S-λ curves approximately based on a genetic simulated annealing algorithm.The outline of this paper is as follows.The definition of S-λ curves is described in Section 2. In Section 3, we investigate the degree reduction of S-λ curves using an intelligent algorithm.Finally, a short conclusion is given in Section 4.

S-λ Distributions and Basis Functions
Let A j m j=0 be a given sequence of positive numbers, where m may be equal to +∞.The generating function (gf ) of the sequence is S(x) = ∑ m j=0 A j x j , which satisfies S(0) = 1.Furthermore, suppose the convergence radius of S(x) is R and, let λ(x) be a strictly continuous monotone increasing function satisfying λ(0) = 0 and mapping [0, R 1 ) onto [0, R), where R and R 1 may be equal to , and then P 1,j (x) ∈ C[0, R 1 ) and ∑ m j=0 P 1,j (x) = 1.Now we give the following definition (Fan and Zeng 2012 [15]).

Definition 1.
Let ξ be an integer random variable satisfying: is an n-convolution of A j m j=0 with the generating function: Let {ξ i } ∞ i=1 be a sequence of independent random variables with the same distribution as ξ.Set η n = ∑ n i=1 ξ i .Then by the convolution formula of probability, we can obtain: We call the probability distributions (3) S-λ distributions.If we write: and then P n,j (x) are called the S-λ basis functions corresponding to S-λ distributions.
From Definition 1, two properties of P n,j (x) ≥ 0 and ∑ mn j=0 P n,j (x) = 1 are true obviously.According to Definition 1, we can construct different S-λ distributions by selecting appropriate generating functions S(x) = ∑ m j=0 A j x j and transformation factors λ(x), x ∈ [0, R 1 ).We give two interesting instances as follows.
. By convolving n-times we get: By recombining the transformation factor and generating function, we have: Therefore, according to Definition 1 we obtain the classical Bernstein basis of degree n: and the basis functions in (6) are shown in Figure 1a [15].

S-λ Curves
Definition 2. Let , then an S-λ curve of degree n can be defined as follows [15]: where 1 ≥ n , the number of m may be finite or infinite.However, since this paper focuses on practical applications, only the case of finite m is considered here.Some illustrative S-λ curves are discussed below.   2 shows the curves C(t) with different generating functions S(t).From Figure 2, we can see clearly that if the j-th coefficient Aj of the generating functions is even bigger, then the corresponding S-λ curve is even closer to the control point Vj [15].Example 2. Letting S(x) = e x and λ(x) = x, x ∈ [0, +∞), we can get S n [λ(x)] = e nx , m = ∞ and . By taking n-times convolution operation of the infinite sequence A j ∞ j=0 , we have: Thus, we can get the Poisson basis functions: and the Szász-Mirakjan basis functions (see Figure 1b)

S-λ Curves
Definition 2. Let V = V j mn j=0 be a given set of the control points, V j ∈ R 3 (j = 0, 1, . . ., mn), then an S-λ curve of degree n can be defined as follows [15]: where n ≥ 1, the number of m may be finite or infinite.However, since this paper focuses on practical applications, only the case of finite m is considered here.Some illustrative S-λ curves are discussed below.

The Degree Reduction Problem
Degree reduction for S-λ curves of degree n means finding a collection of control points on the S-λ curve of degree n-1, that is: and the initial curve and the degree-reduced curve represents the Euclidean distance of the vector.

The Degree Reduction Problem
Degree reduction for S-λ curves of degree n means finding a collection of control points on the S-λ curve of degree n-1, that is: and the initial curve C(t) and the degree-reduced curve C(t) satisfy the following condition: where the operator d[•, •] represents the Euclidean distance of the vector.This problem can be translated into the following constrained optimization problem: where V = V j mn j=0 and V = V j m(n−1) j=0 represent the control point vectors of the initial S-λ curve and the degree-reduced S-λ curve, respectively.

Elementary Algorithms
The simulated annealing algorithm is inspired by the annealing of hot physical objects, proposed by Metropolis et al. in 1953.It is an efficient way for finding a global optimal solution of a given problem.The process begins by generating an initial solution, we take it as the current solution; a nonlocal optimal solution in the vicinity of the current solution is then chosen and the algorithm decides whether to move to the new solution or not using a probability p.This algorithm not only has no prematurity, but also avoid trapping the optimal solution into local optimization.The temperature is gradually reduced (similar to the annealing of a real object), which makes the activity of the system decrease until it stabilizes in the vicinity of the global minimum with a probability of 1.
The concepts of genetic algorithms are based on Darwin's theory of biological evolution and Mendelian genetics [30][31][32][33].They combine Darwin's theory of survival of the fittest with random exchange theory to create a statistical model that is applicable to the evolution of natural systems and, more generally, as a universal adaptive search method for solving optimization problems.In a genetic algorithm, the parameters of the problem need to be solved are coded as chromosomes, and then exchanging their information through iterative selection, crossover and mutation, until the 'ideal' chromosomes are obtained.However, during initial iterations of the genetic algorithm, it is possible for some superior chromosomes to rapidly propagate throughout the population, this phenomenon is prematurity.
In this paper, we attempt to overcome the prematurity problem of genetic algorithms by combining them with complementary simulated annealing methods.In addition, we present a method for selecting a fitness function, which makes the algorithm more efficient and increases the convergence speed to global optimal solution.

Initialization of the Control Parameters and the Group
To use a genetic algorithm or simulated annealing method, we must define the values of several control parameters including the size of the population, the maximum number of evolutionary generations, the probability of crossover, the probability of mutation, the initial temperature, the cooling factor, and the final temperature.Generally, since the parameters of a problem cannot convert into the terms of a genetic algorithm directly, it is necessary to translate the feasible solutions of the problem into chromosomes or individuals within genetic space first.Various coding techniques can be used for this purpose containing binary coding, Greg coding, real-valued coding, and multi-level parameter coding.We adopt real-valued coding in this work because most real-valued optimization problems used this method do not require numerical conversion, which makes they can utilize genetic algorithms directly.
The populations of interest in this work are the feasible solutions of the control points for the degree-reduced S-λ curve.The first step in the initialization process is to generate a random number α j ∈ [0, 1], j = 0, 1, . . ., m(n − 1), and then applying the following equation to compute a set of control points in the interval [V min , V max ].
where V j represents a coordinate component of the control point vector V j = (x j , y j , z j ) for the degree-reduced S-λ curve C(t); that is to say, V j can be taken as the coordinate component x j , or y j , or z j .The symbol V min and V max is a coordinate component of the vector V min = (x min , y min , z min ) and V max = (x max , y max , z max ), respectively; the coordinate components of the vectors V min and V max are calculated as follows: x min = min x j mn j=0 , y min = min y j mn j=0 , z min = min z j mn j=0 , x max = max x j mn j=0 , y max = max y j mn j=0 , z max = max z j mn j=0 . (15)

Selection of a Fitness Function
The fitness function is a criterion to assess the fitness of an individual in the group; that is, measuring an individual whether can carried forward into the next iteration or not.It is generally obtained by transforming the objective function.To satisfy the approximation conditions of the S-λ curve, we choose the fitness function of the following form: 1/2 (16) where d [C(t j ), C(t j )] are Euclidean distances between C(t j ) and C(t j ) (j = 0, 1, . . ., s); C(t j ) and C(t j ) (j = 0, 1, . . ., s) are the different points on the initial S-λ curve and the degree-reduced S-λ curve, respectively.

Selection
The purpose of selection is to select superior individuals from the old group to form a new population, so that we can obtain a new generation.The likelihood of an individual be selected depends on its fitness value: the greater the fitness value, the higher the probability of selection.Various selection methods can be utilized including roulette wheel selection, random competition, best reserved selection and random selection without replacement.To ensure the optimal solutions are retained during search process, we use the standard random competition process for selection.

Crossover
Crossover involves selecting two individuals from the population at random and recombining the corresponding chromosomes such that the 'offspring' can inherit the superior characteristics of both parents, thereby creating even fitter individuals.An arithmetic hybridization system is adopted for crossover in this work.This approach works as follows.Suppose there are two parental vectors: . Using arithmetic hybridization system to create two offspring vectors s 1 = (v 1 0 . . .v 1 n−1 ) and s 2 = (v 2 0 . . .v 2 n−1 ) that satisfy: where β i , γ i ∈ [0, 1] are random numbers.

Mutation
The mutation aim is to maintain the diversity of the population.Some of the genes in the chromosomes will undergo mutation and generate new genes.The mutation process gives genetic algorithms a local random search capacity and retains the diversity of the population, which lends to the absence of prematurity.In this work, mutation is implemented by using the usual method of substitution with random points, i.e. we mutate the point selected in the sub-solution vector and replace it with a point chosen randomly from the interval [p min , p max ].More specifically, if r 1 < p m , then we proceed as follows: where p min and p max are the lower boundary and upper boundary of the value for gene p ij , respectively; p m is the probability of the mutation, "gen" denotes the current number of evolutionary generations, "maxgen" is the maximum permitted number of evolutionary generations, and r, r 1 , r 2 are random numbers in the interval [0,1].

Termination Conditions
The algorithm can be terminated if either of the two conditions is satisfied: (1) if the current temperature is below the termination temperature and and (2) if there is no difference between successive generations (indicating that further iteration will not yield a better result).

Setting Parameters
The genetic simulated annealing algorithm requires seven parameters to be set in advance: the size of the population (psize), the maximum number of evolutionary generations (maxgen), the probability of crossover p c , the probability of mutation p m , the initial temperature T 0 , the cooling factor q, and the final temperature T end .A large number of experiments show that these parameters can be set to: psize = 100, maxgen ∈ [10,30], p m = 0.1, T 0 = 100, q = 0.8 and T end = 1.

The Procedure of the Degree Reduction for S-λ Curve
Degree reduction using the genetic simulated annealing method is performed via the following steps: Step 1: Input the dimension of the initial S-λ curve and the corresponding control points {V 0 , V 1 , • • • V mn }, then draw the S-λ curve and its control polygon.
Step 2: Specify the control parameters including the population size, maximum number of evolutionary generations and so on.
Step 3: Generate the initial population and calculate the fitness value of each individual within it according to Equation (16).
Step 4: Initialize the next generation and set "gen" equals to 1.
Step 5: Use the genetic algorithm to obtain a new population through selection, crossover and mutation, and then calculate the fitness value of each individual in the new population, finally, utilize the simulated annealing algorithm to substitute the old individuals.
Step 6: If gen < maxgen, augment the value of gen by one and go to Step 5; otherwise, go to Step 7.
Step 7: Check the current temperature.If it is higher than the final temperature, let T i+1 = qT i , and go to Step 4; if not, go to Step 8.
Step 8: Draw the degree-reduced S-λ curve and its corresponding control polygon.

Results and Discussions
We assess the validity of the proposed algorithm by applying it to some numerical examples.The domain of the transformation factor is set to R 1 = 1, which is used in all cases of this paper.And the following expression is employed to measure the error between the original curve C(t) and the degree-reduced curve C(t) in this paper: A large number of numeric examples have been carried out on the proposed degree reduction method, and good degree reduction effects are achieved.In this section, we only give partial numeric example results.Note that the detailed information of simulation environment as follows: (1) the operating environment is personal computer with graphics card of i5/GTX1060 and processor frequency of 2.8 GHz; (2) WINDOWS 7 operating system with memory of two gigabytes; and (3) using the programming language of Matlab 2010.Moreover, the run time of each example in this section is less than 300 ms (the reference time).
Symmetry 2018, 10, x FOR PEER REVIEW 9 of 14 A large number of numeric examples have been carried out on the proposed degree reduction method, and good degree reduction effects are achieved.In this section, we only give partial numeric example results.Note that the detailed information of simulation environment as follows: (1) the operating environment is personal computer with graphics card of i5/GTX1060 and processor frequency of 2.8 GHz; (2) WINDOWS 7 operating system with memory of two gigabytes; and (3) using the programming language of Matlab 2010.Moreover, the run time of each example in this section is less than 300ms (the reference time).

Quantitative Evaluation of the Degree Reduction Algorithm
The examples discussed in preceding section show that the presented algorithm is valid, which imply that it is a general tool to reduce degree of S-λ curves approximately.In this section we attempt to evaluate its performance objectively based on the error between the degree-reduced curves and the corresponding originals.
Tables 1 and 2 show the degree reduction errors for the curves shown in Figures 2-4 and Figures 5-7, respectively.From the tables, we can see that the degree reduction errors of the genetic simulated annealing method are relatively small in all cases, which is consistent with the figures showed in Figures 2-7, and means the proposed algorithm is quite effective.

Conclusions
This paper presents a new method, which combines the geometric properties of the curves with a new genetic simulated annealing algorithm, to reduce degree of the S-λ curves approximately.The performance of the algorithm is demonstrated by applying it to several examples; the results show that the proposed algorithm can achieve the degree reduction process efficiently and the generated degree-reduced curves are very close to the originals.It is worth noting that the proposed method in

Quantitative Evaluation of the Degree Reduction Algorithm
The examples discussed in preceding section show that the presented algorithm is valid, which imply that it is a general tool to reduce degree of S-λ curves approximately.In this section we attempt to evaluate its performance objectively based on the error between the degree-reduced curves and the corresponding originals.
Tables 1 and 2 show the degree reduction errors for the curves shown in Figures 2-4 and Figures 5-7, respectively.From the tables, we can see that the degree reduction errors of the genetic simulated annealing method are relatively small in all cases, which is consistent with the figures showed in Figures 2-7, and means the proposed algorithm is quite effective.

Conclusions
This paper presents a new method, which combines the geometric properties of the curves with a new genetic simulated annealing algorithm, to reduce degree of the S-λ curves approximately.The performance of the algorithm is demonstrated by applying it to several examples; the results show that the proposed algorithm can achieve the degree reduction process efficiently and the generated degree-reduced curves are very close to the originals.It is worth noting that the proposed method in this paper is used for approximate degree reduction of S-λ curves for the first time.And we will focus on studying the degree reduction of S-λ surfaces in future work.

.
The corresponding S-λ curve is

Figure 2 .
Figure 2. The S-λ curves with same transformation factor and different generating functions.

Figure 2 .
Figure 2. The S-λ curves with same transformation factor and different generating functions.
S-λ curve control polygon third-order S-λcurve second-order S-λ curve control polygon second-order S-λ curve
S-λ curve control polygon sixth-order S-λcurve fifth-order S-λ curve control polygon fifth-order S-λ curve
S-λ curve control polygon third-order S-λcurve second-order S-λ curve control polygon second-order S-λ curve
S-λ curve control polygon third-order S-λcurve second-order S-λ curve control polygon second-order S-λ curve

Table 1 .
Error values for degree reduction with fixed endpoints.

Table 2 .
Error values for degree reduction with unconstrained endpoints.

Table 1 .
Error values for degree reduction with fixed endpoints.

Table 2 .
Error values for degree reduction with unconstrained endpoints.