Research Article Firefly Algorithm for Explicit B-Spline ...

13
Hindawi Publishing Corporation Mathematical Problems in Engineering Volume 2013, Article ID 528215, 12 pages http://dx.doi.org/10.1155/2013/528215 Research Article Firefly Algorithm for Explicit B-Spline Curve Fitting to Data Points Akemi Gálvez 1 and Andrés Iglesias 1,2 1 Department of Applied Mathematics and Computational Sciences, E.T.S.I. Caminos, Canales y Puertos, University of Cantabria, Avenida de los Castros s/n, 39005 Santander, Spain 2 Department of Information Science, Faculty of Sciences, Toho University, 2-2-1 Miyama, Funabashi 274-8510, Japan Correspondence should be addressed to Andr´ es Iglesias; [email protected] Received 11 May 2013; Revised 8 September 2013; Accepted 13 September 2013 Academic Editor: Yang Xu Copyright © 2013 A. G´ alvez and A. Iglesias. is 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. is paper introduces a new method to compute the approximating explicit B-spline curve to a given set of noisy data points. e proposed method computes all parameters of the B-spline fitting curve of a given order. is requires to solve a difficult continuous, multimodal, and multivariate nonlinear least-squares optimization problem. In our approach, this optimization problem is solved by applying the firefly algorithm, a powerful metaheuristic nature-inspired algorithm well suited for optimization. e method has been applied to three illustrative real-world engineering examples from different fields. Our experimental results show that the presented method performs very well, being able to fit the data points with a high degree of accuracy. Furthermore, our scheme outperforms some popular previous approaches in terms of different fitting error criteria. 1. Introduction e problem of recovering the shape of a curve/surface, also known as curve/surface reconstruction, has received much attention in the last few years [114]. A classical approach in this field is to construct the curve as a cross-section of the surface of an object. is is a typical problem in many research and application areas such as medical science and biomedical engineering, in which a dense cloud of data points of the surface of a volumetric object (an internal organ, for instance) is acquired by means of noninvasive techniques such as computer tomography, magnetic resonance imaging, and ultrasound imaging. e primary goal in these cases is to obtain a sequence of cross-sections of the object in order to construct the surface passing through them, a process called surface skinning. Another different approach consists of reconstructing the curve directly from a given set of data points, as it is typically done in reverse engineering for computer-aided design and manufacturing (CAD/CAM), by using 3D laser scanning, tactile scanning, or other digitizing devices [15, 16]. Depending on the nature of these data points, two different approaches can be employed: interpolation and approxima- tion. In the former, a parametric curve is constrained to pass through all input data points. is approach is typically employed for sets of data points that are sufficiently accurate and smooth. On the contrary, approximation does not require the fitting curve to pass through the data points, but just close to them, according to prescribed distance criteria. Such a distance is usually measure along the normal vector to the curve at that point. e approximation approach is partic- ularly well suited when data are not exact but subjected to measurement errors. Because this is the typical case in many real-world industrial problems, in this paper we focus on the approximation scheme to a given set of noisy data points. ere two key components for a good approximation: a proper choice of the approximating function and a suitable parameter tuning. e usual models for curve approximation are the free-form curves, such as B´ ezier, B-spline, and NURBS [1726]. In particular, B-splines are the preferred

Transcript of Research Article Firefly Algorithm for Explicit B-Spline ...

Page 1: Research Article Firefly Algorithm for Explicit B-Spline ...

Hindawi Publishing CorporationMathematical Problems in EngineeringVolume 2013 Article ID 528215 12 pageshttpdxdoiorg1011552013528215

Research ArticleFirefly Algorithm for Explicit B-Spline CurveFitting to Data Points

Akemi Gaacutelvez1 and Andreacutes Iglesias12

1 Department of Applied Mathematics and Computational Sciences ETSI Caminos Canales y Puertos University of CantabriaAvenida de los Castros sn 39005 Santander Spain

2Department of Information Science Faculty of Sciences Toho University 2-2-1 Miyama Funabashi 274-8510 Japan

Correspondence should be addressed to Andres Iglesias iglesiasunicanes

Received 11 May 2013 Revised 8 September 2013 Accepted 13 September 2013

Academic Editor Yang Xu

Copyright copy 2013 A Galvez and A Iglesias This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

This paper introduces a new method to compute the approximating explicit B-spline curve to a given set of noisy data points Theproposedmethod computes all parameters of the B-spline fitting curve of a given orderThis requires to solve a difficult continuousmultimodal and multivariate nonlinear least-squares optimization problem In our approach this optimization problem is solvedby applying the firefly algorithm a powerful metaheuristic nature-inspired algorithm well suited for optimizationThemethod hasbeen applied to three illustrative real-world engineering examples from different fields Our experimental results show that thepresented method performs very well being able to fit the data points with a high degree of accuracy Furthermore our schemeoutperforms some popular previous approaches in terms of different fitting error criteria

1 Introduction

The problem of recovering the shape of a curvesurface alsoknown as curvesurface reconstruction has received muchattention in the last few years [1ndash14] A classical approachin this field is to construct the curve as a cross-section ofthe surface of an object This is a typical problem in manyresearch and application areas such as medical science andbiomedical engineering inwhich a dense cloud of data pointsof the surface of a volumetric object (an internal organ forinstance) is acquired by means of noninvasive techniquessuch as computer tomography magnetic resonance imagingand ultrasound imaging The primary goal in these cases isto obtain a sequence of cross-sections of the object in order toconstruct the surface passing through them a process calledsurface skinning

Another different approach consists of reconstructingthe curve directly from a given set of data points as itis typically done in reverse engineering for computer-aideddesign and manufacturing (CADCAM) by using 3D laser

scanning tactile scanning or other digitizing devices [15 16]Depending on the nature of these data points two differentapproaches can be employed interpolation and approxima-tion In the former a parametric curve is constrained topass through all input data points This approach is typicallyemployed for sets of data points that are sufficiently accurateand smoothOn the contrary approximation does not requirethe fitting curve to pass through the data points but justclose to them according to prescribed distance criteria Sucha distance is usually measure along the normal vector to thecurve at that point The approximation approach is partic-ularly well suited when data are not exact but subjected tomeasurement errors Because this is the typical case in manyreal-world industrial problems in this paper we focus on theapproximation scheme to a given set of noisy data points

There two key components for a good approximation aproper choice of the approximating function and a suitableparameter tuningThe usual models for curve approximationare the free-form curves such as Bezier B-spline andNURBS [17ndash26] In particular B-splines are the preferred

2 Mathematical Problems in Engineering

approximating functions because of their flexibility theirnice mathematical properties and its ability to representaccurately a large variety of shapes [27ndash29] The determi-nation of the best parameters of such a B-spline fittingcurve is troublesome because the choice of knot vectors hasproved to be a strongly nonlinear continuous optimizationproblem It is also multivariate as it typically involves alarge number of unknown variables for a large number ofdata points a case that happens very often in real-worldexamples It is also overdetermined because we expect toobtain the approximating curve with many fewer parametersthat the number of data points Finally the problem isknown to be multimodal that is the least-squares objectivefunction can exhibit many local optima [30 31] meaning thatthe problem might have several (global andor local) goodsolutions

11 Aims and Structure of This Paper To summarize the pre-vious paragraphs our primary goal is to compute accuratelyall parameters of the approximating B-spline curve to a setof input data points Unfortunately we are confronted with avery difficult overdetermined continuous multimodal andmultivariate nonlinear optimization problem In this paperwe introduce a new method to solve this fitting problemby using explicit free-form polynomial B-spline curves Ourmethod applies a powerful metaheuristic nature-inspiredalgorithm called firefly algorithm introduced recently byprofessor Xin-SheYang (CambridgeUniversity) to solve opti-mization problems The trademark of the firefly algorithm isits search mechanism inspired by the social behavior of theswarms of fireflies and the phenomenon of bioluminescentcommunication The paper shows that this approach can beeffectively applied to obtain a very accurate explicit B-splinefitting curve to a given set of noisy data points providedthat an adequate representation of the problem and a properselection of the control parameters are carried out To checkthe performance of our approach it has been applied to someillustrative examples of real-world engineering problemsfrom different fields Our results show that the methodperforms very well being able to yield a very good fittingcurve with a high degree of accuracy

The structure of this paper is as follows in Section 2 pre-vious work for computing the explicit B-spline fitting curveto a set of data points is briefly reported Then some basicconcepts about B-spline curves and the optimization problemto be solved are given in Section 3 Section 4 describes thefundamentals of the firefly algorithm the metaheuristic usedin this paperThe proposed fireflymethod for data fittingwithexplicit B-spline curves is described in detail in Section 5Then some illustrative examples of its application to real-world engineering problems from different fields along withthe analysis of the effect of the variation of firefly parameter120572 on the method performance and some implementationdetails are reported in Section 6 A comparison of ourapproach with other alternative methods is analyzed in detailin Section 7 The paper closes with the main conclusionsof this contribution and our plans for future work in thefield

2 Previous Work

Many previous approaches have addressed the problem ofobtaining the fitting curve to a given set of data points withB-spline curves (the reader is kindly referred to [32ndash34] fora comprehensive review of such techniques) Unfortunatelymany works focus on the problem of data parameterizationand they usually skip the problem of computing the knotsBut since in this work we consider explicit B-spline curves asapproximating functions our problem is just the opposite thefocus is not on data parameterization but on the knot vectorTwomain approaches have been described to tackle this issuefixed knots and free knots In general fixed-knot approachesproceed by setting the number of knots a priori and then com-puting their location according to some prescribed formula[6 9 18 19 22]The simplest way to do it is to consider equallyspaced knots the so-called uniform knot vector Very oftenthis approach is not appropriate as it may lead to singularsystems of equations and does not reflect the real distributionof data A more refined procedure consists of the de Boormethod and its variations [32] which obtain knot vectorsso that every knot span contains at least one parametricvalue

However it has been shown since the 70s that theapproximation of functions by splines improves dramaticallyif the knots are treated as free variables of the problem[30 31 35ndash38] This is traditionally carried out by changingthe number of knots through either knot insertion or knotremoval Usually these methods require terms or parameters(such as tolerance errors smoothing factors cost functionsor initial guess of knot locations) whose determination isoften based on subjective factors [31 39ndash43] Therefore theyfail to automatically generate a good knot vector Somemethods yield unnecessary redundant knots [44] Finallyother approaches are generally restricted to smooth datapoints [20 45ndash47] or closed curves [11]

In the last few years the application of Artificial Intel-ligence techniques has allowed the researchers and prac-titioners to achieve remarkable results regarding this datafitting problem Most of these methods rely on some kind ofneural networks [1 8] and its generalization the functionalnetworks [3ndash5 7 21 23 48] Other approaches are based onthe application of metaheuristic techniques which have beenintensively applied to solve difficult optimization problemsthat cannot be tackled through traditional optimization algo-rithms Recent schemes in this area involve particle swarmoptimization [10 13 24] genetic algorithms [12 49ndash51]artificial immune systems [25 52] estimation of distributionalgorithms [11] and hybrid techniques [26] As it will bediscussed later on the approach introduced in this paper alsoit belongs to this class of methods (see Sections 4 and 5 formore details)

3 Basic Concepts and Definitions

31 B-Spline Curves Let U = 0 le 1199060

= 119886 1199061 1199062

119906119903minus1

119906119903= 119887 be a nondecreasing sequence of real numbers

on the interval [119886 119887] called knotsU is called the knot vectorWithout loss of generality we can assume that [119886 119887] = [0 1]

Mathematical Problems in Engineering 3

The 119894th B-spline basis function 119873119894119896(119905) of order 119896 (or equiv-

alently degree 119896 minus 1) can be defined by the Cox-de Boorrecursive relations [38] as

1198731198941

(119905) =

1 if 119906119894le 119905 lt 119906

119894+1

0 otherwise(119894 = 0 119903 minus 1) (1)

119873119894119896

(119905) =

119905 minus 119906119894

119906119894+119896minus1

minus 119906119894

119873119894119896minus1

(119905)

+

119906119894+119896

minus 119905

119906119894+119896

minus 119906119894+1

119873119894+1119896minus1

(119905)

(2)

for 119894 = 0 119903 minus 119896 with 119896 gt 1 Note that 119894th B-spline basisfunction of order 1 in (1) is a piecewise constant functionwith value 1 on the interval [119906

119894 119906119894+1

) called the support of1198731198941(119905) and zero elsewhere This support can be either an

interval or reduced to a point as knots 119906119894and 119906

119894+1must

not necessarily be different The number of times a knotappears in the knot vector is called themultiplicity of the knotand has an important effect on the shape and properties ofthe associated basis functions (see for instance [29 32] fordetails) If necessary the convention 00 = 0 in (2) is applied

A polynomial B-spline curve of order 119896 (or degree 119896 minus 1) isa piecewise polynomial curve given by

119862 (119905) =

119899

sum

119894=0

119887119894119873119894119896 (

119905) (3)

where 119887119894119894=0119899

are coefficients called control points as theyroughly determine the shape of the curve and 119873

119894119896(119905) are the

basis functions defined above For a proper definition of a B-spline curve in (3) the following relationship must hold 119903 =

119896 + 119899 (see [32] for further details)In many practical applications the first and last knots of

U are repeated as many times as the order as follows 1199060=

1199061= sdot sdot sdot = 119906

119896minus1= 0119906

119899+1= 119906119899+2

= sdot sdot sdot = 119906119899+119896

= 1 (such a knotvector is usually called a nonperiodic knot vector) In generala B-spline curve does not interpolate any of its control pointsinterpolation only occurs for nonperiodic knot vectors Insuch a case the B-spline curve does interpolate the first andlast control points [32] Since they are the most common incomputer design and manufacturing and many other fieldsin this work we will restrict ourselves to nonperiodic knotvectors Note however that ourmethod does not preclude anyother kind of knot vectors to be used instead

32 The Optimization Problem Similar to [49] let us assumethat the data to be fitted are given as

119910119894= 119865 (119905

119894) + 120598119894 (119894 = 1 119873) (4)

where 119865(119905) is the underlying (unknown) function of the dataand 120598119894is the measurement error and we assume that 119873 ≫

119899 In this regard a convenient model function 119891(119905) for (4)is given by (3) where both the vector B = (119887

0 1198871 119887

119899)119879

of coefficients and the vector U of knots are considered astuning parameters and (sdot)

119879 denotes the transpose of a vectoror matrix In the least-squares minimization of problem (4)

we determine the control points 119887119895(119895 = 0 119899) of the B-

spline curve 119891(119905) by minimizing the least-squares error 119876defined as the sum of squares of the residuals as follows

119876 =

119873

sum

119894=1

(119910119894minus 119891 (119905

119894))2=

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(5)

Note that the objective function to be optimized 119876 dependson the B-spline coefficients and the interior knots Thisproblem is well known to be a continuous multimodal andmultivariate nonlinear minimization problem [31] In orderto address this problem in this paper we apply a fireflyalgorithm and obtain an accurate choice of bothU andB

4 Firefly Algorithm

The firefly algorithm is a metaheuristic nature-inspired algo-rithm introduced in 2008 by Yang to solve optimization prob-lems [53 54] The algorithm is based on the social flashingbehavior of fireflies in nature The key ingredients of themethod are the variation of light intensity and formulation ofattractiveness In general the attractiveness of an individualis assumed to be proportional to their brightness which inturn is associated with the encoded objective function

In the firefly algorithm there are three particular ideal-ized rules which are based on some of the major flashingcharacteristics of real fireflies [53] They are as follows

(1) All fireflies are unisex so that one firefly will beattracted to other fireflies regardless of their sex

(2) The degree of attractiveness of a firefly is proportionalto its brightness which decreases as the distance fromthe other firefly increases due to the fact that the airabsorbs light For any two flashing fireflies the lessbrighter one will move towards the brighter one Ifthere is not a brighter or more attractive firefly thana particular one it will then move randomly

(3) The brightness or light intensity of a firefly is deter-mined by the value of the objective function of a givenproblem For instance for maximization problemsthe light intensity can simply be proportional to thevalue of the objective function

The distance between any two fireflies 119894 and 119895 at positionsX119894and X

119895 respectively can be defined as a Cartesian or

Euclidean distance as follows

119903119894119895=

10038171003817100381710038171003817X119894minus X119895

10038171003817100381710038171003817= radic

119889

sum

119896=1

(119909119894119896

minus 119909119895119896)

2

(6)

where 119909119894119896

is the 119896th component of the spatial coordinate X119894

of the 119894th firefly and 119889 is the number of dimensionsIn the firefly algorithm as attractiveness function of a

firefly 119895 one should select any monotonically decreasingfunction of the distance to the chosen firefly for example theexponential function as follows

120573 = 1205730119890minus120574119903120583

119894119895 (120583 ge 1) (7)

4 Mathematical Problems in Engineering

where 119903119894119895is the distance defined in (6) 120573

0is the initial

attractiveness at 119903 = 0 and 120574 is an absorption coefficient atthe source which controls the decrease of the light intensity

The movement of a firefly 119894 which is attracted by a moreattractive (ie brighter) firefly 119895 is governed by the followingevolution equation

X119894= X119894+ 1205730119890minus120574119903120583

119894119895(X119895minus X119894) + 120572 (120590 minus

1

2

) (8)

where the first term on the right-hand side is the currentposition of the firefly the second term is used for consideringthe attractiveness of the firefly to light intensity seen byadjacent fireflies and the third term is used for the randommovement of a firefly in case there are not any brighter onesThe coefficient 120572 is a randomization parameter determinedby the problem of interest while 120590 is a random numbergenerator uniformly distributed in the space [0 1]

5 The Proposed Method

In this section the firefly algorithm described in previousparagraphs is applied to obtain the approximating explicitB-spline curve of a given set of noisy data points expressedaccording to (3)-(4) To this aim in this work we considerfour different fitness functions The first objective functioncorresponds to the evaluation of the least-squares functiongiven by (5) Since this error function does not consider thenumber of data points we also compute the RMSE (root-mean squared error) given by

RMSE =radic

sum119873

119894=1(119910119894minus sum119899

119895=0119887119895119873119895119896

(119905119894))

2

119873

(9)

Note however that the best error might be obtained ineither (5) or (9) at the expense of an unnecessarily large num-ber of variables To overcome this limitation we also computetwo other fitness functions Akaike Information Criterion(AIC) [55 56] and Bayesian Information Criterion (BIC) [57]Both are penalized information-theoretical criteria aimedat finding the best approximating model to the true datathrough an adequate trade-off between fidelity and simplicityThey are comprised of two terms the first one accounts forthe fidelity of the model function while the second one is apenalty term to minimize the number of free parameters ofthe model 120578 They are given respectively by

AIC = 119873log119890(119876) + 2120578

BIC = 119873log119890(119876) + 120578log

119890(119873)

(10)

A simple comparison between (10) shows that bothcriteria are quite similar but BIC applies a larger penaltythan AIC Thus as other factors are equal it tends to selectsimpler models than AIC (ie models with fewer parame-ters) Both methods provide very similar results for smoothunderlying functions Differences might arise however forfunctions exhibiting sharp features discontinuities or cuspsIn particular AIC tends to yield unnecessary redundant knots

and therefore BIC becomes more adequate for such modelsA great advantage of AIC and BIC criteria is that they avoidthe use of subjective parameters such as error bounds orsmoothing factors Furthermore they provide a simple andstraightforward procedure to determine the best model thesmaller their value the better fitness Because of that weuse them to select the best model for our examples and tocompare our results to those of other alternative approaches

Before searching a solution to the problem two sets ofcontrol parameters must be set up The first set correspondsto the curve parameters the number of control points andthe order of the B-spline curve In general they are freelychosen by the user according to the complexity of the shapeof the underlying function of data and the requirements ofthe particular problem under study with the only constraintthat 119899 ge 119896 The second set of parameters relates to the fireflyalgorithm itself As usual when working with nature-inspiredmetaheuristic techniques the choice of control parametersis very important as it strongly influences the performanceof the method Although some guidelines are given in theliterature to tackle this issue such a selection is problem-dependent and therefore it remains empirical to a largeextent In this paper our parameter tuning is based on acombination of both theoretical results found in the literatureof the field and a large collection of empirical results Fromthe former it is well known that the value of absorptioncoefficient 120574 is important in determining the speed ofconvergence and the behavior of the method In theory 120574 isin

[0infin) but in practice values in the extremes should beavoided When 120574 rarr 0 the attractiveness becomes constantwhich is equivalent to say that the light intensity does notdecrease with distance so the fireflies are visible anywherewhile that 120574 rarr infin corresponds to the case where theattractiveness function in (7) becomes a Dirac 120575-functionThis case is equivalent to the situation where the firefliesmove in a very foggy environment where they cannot see theother fireflies and hence theymove randomly In other wordsthis corresponds to the case of a completely random searchmethod Based on this analysis we carried out thousands ofsimulations to determine a suitable value for 120574 and foundthat the value 120574 = 05 provides a quick convergence ofthe algorithm to the optimal solution Regarding the initialattractiveness 120573

0 some theoretical results suggest that 120573

0= 1

is a good choice for many optimization problems We alsotake this value in this paper with very good results as it willbe discussed in next section For the potential coefficient 120583any positive value can be used But it is noticed that the lightintensity varies according to the inverse square law so weset up 120583 = 2 accordingly Finally a stochastic component isnecessary in the fireflymethod in order to allownew solutionsappear and avoid to getting stuck in a local minimumHowever larger values introduces large perturbations on theevolution of the firefly and therefore delay convergenceto the global optima In this work we carried out severalsimulations to determine the optimal value for this parameter120572 and finally we set up its value of 05 for this randomizationparameter The reader is referred to Section 64 for a moredetailed discussion about how the variation of this parameteraffects the behavior of our method

Mathematical Problems in Engineering 5

Once the parameters have been set up the firefly algo-rithm is executed for a given number of fireflies representingpotential solutions of the optimization problem Each fireflyin our method is a real-valued vector of length 119899 minus 119896 + 1initialized with uniformly distributed random numbers onthe parametric domain [0 1] and then sorted in increasingorder In this work an initial population 119899

119891 of fireflies is

considered Its value is set up to 119899119891

= 100 in all examplesof this paper We also tried larger populations of fireflies(up to 1000 individuals) but found that our results do notchange significantly Since larger populations mean largercomputation times with no remarkable improvement at allwe found this value to be appropriate in our simulations

This initial population is then subjected to the fireflymechanism and least-squares minimization yielding a col-lection of new solutions to the optimization problem (5)In our executions we compute independently all four fitnessfunctions indicated above meaning that our simulationsare to be repeated for each fitness function On the otherhand each simulation is repeated several times accordingto a parameter 120581 in order to remove the spurious effects ofrandomization typically arising in any stochastic process Inthis paper we consider a value of 120581 = 20 meaning that eachsimulation is independently carried out 80 times to obtainthe final results Each execution is performed for a givennumber of iterations 119899iter In general the firefly algorithmdoes not need a large number of iterations to reach the globaloptima This also happens in this case In all our computersimulations we found empirically that 119899iter = 10

3 is a suitablevalue and larger values for this parameter do not improveour simulation results Once the algorithm is executed forthe given number of iterations the firefly with the best (ieminimum) fitness value is selected as the best solution to theoptimization problem

6 Experimental Results

The method described in the previous section has beenapplied to several examples from different fields To keep thepaper in manageable size in this section we describe onlythree of them the response of an RC circuit a volumetricmoisture content example and the side profile section of acar body These examples have been carefully chosen for tworeasons firstly to show the diversity of situations to whichour algorithm can be applied and secondly because theycorrespond to interesting real-world engineering problemsrather than to academic examples As wewill show below ourmethod provides a very accurate solution to these problemsin terms of explicit B-spline curves We think we haveprovided enough examples to convince our readers about thewide range of applicability of our approach

61 Response of an RC Circuit The resistor-capacitor (RC)circuit is an electronic circuit comprised of resistors andcapacitors driven by a voltage or current source RC circuitsare very popular the most common being the high-passand low-pass filters The simplest version is the first-orderRC circuit where just one capacitor and one resistor are

Figure 1 Applying the firefly algorithm to fit a series of data pointsfrom an RC circuit original data points (red cross symbols) and bestexplicit B-spline fitting curve (blue solid line)

considered In this example we consider a signal of 301 datapoints of a series first-order RC circuit They are depicted asa collection of red cross symbols in Figure 1 We apply ourmethod to this sequence of data points by using a third-orderB-spline curve with 119899 = 42 The best fitting curve we obtainis displayed as a blue solid line in Figure 1 This example hasbeen primarily chosen because the underlying curve of datashows a qualitatively different behavior at both ends with ahighly oscillating region on the left and a steady-state behav-ior on the right All these features make this function a goodcandidate to check the performance of our approach Even inthis case our method yields a fitting of the curve to the datapointsThe corresponding fitting errors for the best executionand the average of 20 executions are reported in the lastcolumnof Table 3They are in good agreementwith the visualresults in the figure about the accurate fitting of data points

62 Volumetric Moisture Content This example uses a setof 16 measurements of a volumetric moisture content asdescribed in [41]This example has been traditionally used asa benchmark to test different curve approximation methods(see [41] for details) Figure 2 shows the collection of 16

data points along with their best fourth-order B-spline fittingcurve for 119899 = 7 obtained with our firefly-based method forthis data setThe figure clearly shows the good approximationof data points Note that the fitting curve does not generallypass through the data points (ie it is truly an approximatingcurve not an interpolating one) Note also that the fittingcurve captures the tendency of points verywell evenwith onlya few parameters thus encoding economically the primaryinformation of data The corresponding fitting errors for thebest execution and the average of 20 executions are againreported in the last column of Table 3

63 Side Profile Section of a Car Body This example consistsof the data fitting of a set of 243 noisy data points from the In(+119884 axis) side profile section of a clay model of a notchbackthree-box sedan car bodyThe data points were obtained by alayout machine by the Spanish car maker provider Candematyears ago Data points of the side profile section are sorted instandard order that is from forward (minus119883 axis) on the left to

6 Mathematical Problems in Engineering

Table 1 Best and average values of 119876 RMSE AIC and BIC fitting errors of the first example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 406737 119876(best) 413276 119876(best) 441259

119876(avg) 453278 119876(avg) 508751 119876(avg) 537882

RMSE(best) 011624 RMSE(best) 011717 RMSE(best) 012107

RMSE(avg) 012271 RMSE(avg) 013000 RMSE(avg) 013367

AIC(best) 5883019 AIC(best) 5931025 AIC(best) 6128230

AIC(avg) 6209119 AIC(avg) 6556633 AIC(avg) 6724231

BIC(best) 8959921 BIC(best) 9007927 BIC(best) 9205131

BIC(avg) 9286021 BIC(avg) 9633534 BIC(avg) 9801133

120572 = 04 120572 = 05 120572 = 06

119876(best) 375236 119876(best) 384178 119876(best) 433295119876(avg) 402171 119876(avg) 400119 119876(avg) 512274RMSE(best) 011165 RMSE(best) 011297 RMSE(best) 011997RMSE(avg) 011559 RMSE(avg) 011529 RMSE(avg) 013045AIC(best) 5640378 AIC(best) 5711274 AIC(best) 6073408AIC(avg) 5849038 AIC(avg) 5833645 AIC(avg) 6577405BIC(best) 8717280 BIC(best) 8788175 BIC(best) 9150309BIC(avg) 8925940 BIC(avg) 8910546 BIC(avg) 9654306

120572 = 07 120572 = 08 120572 = 09

119876(best) 631058 119876(best) 856754 119876(best) 879361

119876(avg) 697132 119876(avg) 971118 119876(avg) 1014490

RMSE(best) 014479 RMSE(best) 016871 RMSE(best) 017092

RMSE(avg) 015218 RMSE(avg) 017961 RMSE(avg) 018358

AIC(best) 7205105 AIC(best) 8125421 AIC(best) 8203816

AIC(avg) 7504831 AIC(avg) 8502566 AIC(avg) 8634083

BIC(best) 10282006 BIC(best) 11202323 BIC(best) 11280717

BIC(avg) 10581733 BIC(avg) 11579467 BIC(avg) 11710984

Figure 2 Applying the firefly algorithm to fit a series of data pointsfrom the volumetric moisture content example in [41] original datapoints (red cross symbols) and best explicit B-spline fitting curve(blue solid line)

backward (+119883 axis) on the right [58] This example has beenchosen because it includes areas of varying slope rangingfrom the strong slope at both ends (upwards on the leftdownwards on the right) to the soft slope inmiddle part witha horizontal area between pillars119860 and119862 and in the cargo boxarea and a soft upward area in the car hood Consequently it

Figure 3 Applying the firefly algorithm to fit a series of data pointsfrom a side profile section of a car body original data points (redcross symbols) and best explicit B-spline fitting curve (blue solidline)

is also a very good candidate to check the performance of ourapproach

We have applied our firefly-based fitting method by usinga fourth-order B-spline curve with 119899 = 30 The best fittingcurve alongwith the data points is displayed in Figure 3Onceagain note the excellent fitting of the curve to the data pointsThe corresponding fitting errors for the best execution andthe average of 20 executions are again reported in the lastcolumn of Table 3

64 Analysis of Variation of Parameter 120572 In this section wepresent a detailed discussion about the effects of the variationof the parameter 120572 on the performance of our method

Mathematical Problems in Engineering 7

Table 2 Best and average values of 119876 RMSE AIC and BIC fitting errors of the third example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 126931119864 minus 3 119876(best) 142578119864 minus 3 119876(best) 128343119864 minus 3

119876(avg) 148146119864 minus 3 119876(avg) 171288119864 minus 3 119876(avg) 161544119864 minus 3

RMSE(best) 228549119864 minus 3 RMSE(best) 242227119864 minus 3 RMSE(best) 229817119864 minus 3

RMSE(avg) 246911119864 minus 3 RMSE(avg) 265497119864 minus 3 RMSE(avg) 257835119864 minus 3

AIC(best) minus15046354 AIC(best) minus14763878 AIC(best) minus15019472

AIC(avg) minus14670787 AIC(avg) minus14318077 AIC(avg) minus14460399

BIC(best) minus13020379 BIC(best) minus12737902 BIC(best) minus12993496

BIC(avg) minus12644811 BIC(avg) minus12292101 BIC(avg) minus12434423

120572 = 04 120572 = 05 120572 = 06

119876(best) 133544119864 minus 3 119876(best) 124781E minus 3 119876(best) 126573119864 minus 3

119876(avg) 155296119864 minus 3 119876(avg) 144402E minus 3 119876(avg) 147353119864 minus 3

RMSE(best) 234427119864 minus 3 RMSE(best) 226606E minus 3 RMSE(best) 228227119864 minus 3

RMSE(avg) 252799119864 minus 3 RMSE(avg) 243771E minus 3 RMSE(avg) 246250119864 minus 3

AIC(best) minus14922941 AIC(best) minus15087864 AIC(best) minus15053218

AIC(avg) minus14556249 AIC(avg) minus14732995 AIC(avg) minus14683829

BIC(best) minus12896965 BIC(best) minus13061884 BIC(best) minus13027242

BIC(avg) minus12530274 BIC(avg) minus12707020 BIC(avg) minus12657853

120572 = 07 120572 = 08 120572 = 09

119876(best) 138751119864 minus 3 119876(best) 157325119864 minus 3 119876(best) 179923119864 minus 3

119876(avg) 162695119864 minus 3 119876(avg) 193681119864 minus 3 119876(avg) 247886119864 minus 3

RMSE(best) 238954119864 minus 3 RMSE(best) 254446119864 minus 3 RMSE(best) 272210119864 minus 3

RMSE(avg) 258752119864 minus 3 RMSE(avg) 282319119864 minus 3 RMSE(avg) 319391119864 minus 3

AIC(best) minus14829994 AIC(best) minus14524706 AIC(best) minus14198563

AIC(avg) minus14443147 AIC(avg) minus14019512 AIC(avg) minus13419894

BIC(best) minus12804018 BIC(best) minus12498730 BIC(best) minus12172587

BIC(avg) minus12417171 BIC(avg) minus11993536 BIC(avg) minus11393918

To this purpose we carried out several simulation trials andcomputed the fitting error for the eight error criteria used inthis work In this section we show the results obtained for thefirst and third examples of this paperResults for the secondexample are not reported here because the low number ofinput data points makes it particularly resilient to variationsof parameter 120572 As a result the fitting errors for differentvalues of120572 are very similar to each other and to those reportedin the second row of Table 2

Table 1 shows the variation of the eight fitting error crite-ria for the RC circuit example and parameter 120572 varying from01 to 09 with step-size 01 Once again we carried out 20independent simulations for each value of 120572 and obtained thebest and the average values of the 20 executions Best resultsfor each error criterion are highlighted in bold for the sake ofclarity We can see that the values 120572 = 04 and 120572 = 05 leadto the best results for the best and average fitting error valuesrespectively Figure 4 shows graphically from left to right andtop to bottom the best (in blue) and average (in red) valuesof the 119876 RMSE AIC and BIC fitting errors respectivelyFrom the figure we can conclude that both 120572 = 04 and120572 = 05 are good choices as they lead to the best resultsfor this example Note that values lower and larger than thisoptimal values yield worse fitting error results This effect isparticularly noticeable for values of 120572 approaching to 1

Table 2 and Figure 5 show the corresponding results forthe side profile section of a car body example As the readercan see the value 120572 = 05 is again a very good choicealthough 120572 = 01 and 120572 = 06 also yields good results Onceagain increasing the value of 120572 towards 1 leads to a strongincrease of the fitting errors

It is worthwhile to recall that the choice of parameters isproblem-dependent meaning that our choice of parametersmight not be adequate for other examples Therefore it isalways advisable to carry out a preliminary analysis and com-puter simulations to determine a proper parameter tuning forbetter performance as it has been done in this section

65 Computational Issues All computations in this paperhave been performed on a 29GHz Intel Core i7 processorwith 8GB of RAM The source code has been implementedby the authors in the native programming language of thepopular scientific programMatlab version 2010b Regardingthe computation times all exampleswe tested can be obtainedin less than a second (excluding rendering) Obviously theCPU time depends on several factors such as the number ofdata points and the values of the different parameters of themethod making it hard to determine how long does it takefor a given example to be reconstructed

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Research Article Firefly Algorithm for Explicit B-Spline ...

2 Mathematical Problems in Engineering

approximating functions because of their flexibility theirnice mathematical properties and its ability to representaccurately a large variety of shapes [27ndash29] The determi-nation of the best parameters of such a B-spline fittingcurve is troublesome because the choice of knot vectors hasproved to be a strongly nonlinear continuous optimizationproblem It is also multivariate as it typically involves alarge number of unknown variables for a large number ofdata points a case that happens very often in real-worldexamples It is also overdetermined because we expect toobtain the approximating curve with many fewer parametersthat the number of data points Finally the problem isknown to be multimodal that is the least-squares objectivefunction can exhibit many local optima [30 31] meaning thatthe problem might have several (global andor local) goodsolutions

11 Aims and Structure of This Paper To summarize the pre-vious paragraphs our primary goal is to compute accuratelyall parameters of the approximating B-spline curve to a setof input data points Unfortunately we are confronted with avery difficult overdetermined continuous multimodal andmultivariate nonlinear optimization problem In this paperwe introduce a new method to solve this fitting problemby using explicit free-form polynomial B-spline curves Ourmethod applies a powerful metaheuristic nature-inspiredalgorithm called firefly algorithm introduced recently byprofessor Xin-SheYang (CambridgeUniversity) to solve opti-mization problems The trademark of the firefly algorithm isits search mechanism inspired by the social behavior of theswarms of fireflies and the phenomenon of bioluminescentcommunication The paper shows that this approach can beeffectively applied to obtain a very accurate explicit B-splinefitting curve to a given set of noisy data points providedthat an adequate representation of the problem and a properselection of the control parameters are carried out To checkthe performance of our approach it has been applied to someillustrative examples of real-world engineering problemsfrom different fields Our results show that the methodperforms very well being able to yield a very good fittingcurve with a high degree of accuracy

The structure of this paper is as follows in Section 2 pre-vious work for computing the explicit B-spline fitting curveto a set of data points is briefly reported Then some basicconcepts about B-spline curves and the optimization problemto be solved are given in Section 3 Section 4 describes thefundamentals of the firefly algorithm the metaheuristic usedin this paperThe proposed fireflymethod for data fittingwithexplicit B-spline curves is described in detail in Section 5Then some illustrative examples of its application to real-world engineering problems from different fields along withthe analysis of the effect of the variation of firefly parameter120572 on the method performance and some implementationdetails are reported in Section 6 A comparison of ourapproach with other alternative methods is analyzed in detailin Section 7 The paper closes with the main conclusionsof this contribution and our plans for future work in thefield

2 Previous Work

Many previous approaches have addressed the problem ofobtaining the fitting curve to a given set of data points withB-spline curves (the reader is kindly referred to [32ndash34] fora comprehensive review of such techniques) Unfortunatelymany works focus on the problem of data parameterizationand they usually skip the problem of computing the knotsBut since in this work we consider explicit B-spline curves asapproximating functions our problem is just the opposite thefocus is not on data parameterization but on the knot vectorTwomain approaches have been described to tackle this issuefixed knots and free knots In general fixed-knot approachesproceed by setting the number of knots a priori and then com-puting their location according to some prescribed formula[6 9 18 19 22]The simplest way to do it is to consider equallyspaced knots the so-called uniform knot vector Very oftenthis approach is not appropriate as it may lead to singularsystems of equations and does not reflect the real distributionof data A more refined procedure consists of the de Boormethod and its variations [32] which obtain knot vectorsso that every knot span contains at least one parametricvalue

However it has been shown since the 70s that theapproximation of functions by splines improves dramaticallyif the knots are treated as free variables of the problem[30 31 35ndash38] This is traditionally carried out by changingthe number of knots through either knot insertion or knotremoval Usually these methods require terms or parameters(such as tolerance errors smoothing factors cost functionsor initial guess of knot locations) whose determination isoften based on subjective factors [31 39ndash43] Therefore theyfail to automatically generate a good knot vector Somemethods yield unnecessary redundant knots [44] Finallyother approaches are generally restricted to smooth datapoints [20 45ndash47] or closed curves [11]

In the last few years the application of Artificial Intel-ligence techniques has allowed the researchers and prac-titioners to achieve remarkable results regarding this datafitting problem Most of these methods rely on some kind ofneural networks [1 8] and its generalization the functionalnetworks [3ndash5 7 21 23 48] Other approaches are based onthe application of metaheuristic techniques which have beenintensively applied to solve difficult optimization problemsthat cannot be tackled through traditional optimization algo-rithms Recent schemes in this area involve particle swarmoptimization [10 13 24] genetic algorithms [12 49ndash51]artificial immune systems [25 52] estimation of distributionalgorithms [11] and hybrid techniques [26] As it will bediscussed later on the approach introduced in this paper alsoit belongs to this class of methods (see Sections 4 and 5 formore details)

3 Basic Concepts and Definitions

31 B-Spline Curves Let U = 0 le 1199060

= 119886 1199061 1199062

119906119903minus1

119906119903= 119887 be a nondecreasing sequence of real numbers

on the interval [119886 119887] called knotsU is called the knot vectorWithout loss of generality we can assume that [119886 119887] = [0 1]

Mathematical Problems in Engineering 3

The 119894th B-spline basis function 119873119894119896(119905) of order 119896 (or equiv-

alently degree 119896 minus 1) can be defined by the Cox-de Boorrecursive relations [38] as

1198731198941

(119905) =

1 if 119906119894le 119905 lt 119906

119894+1

0 otherwise(119894 = 0 119903 minus 1) (1)

119873119894119896

(119905) =

119905 minus 119906119894

119906119894+119896minus1

minus 119906119894

119873119894119896minus1

(119905)

+

119906119894+119896

minus 119905

119906119894+119896

minus 119906119894+1

119873119894+1119896minus1

(119905)

(2)

for 119894 = 0 119903 minus 119896 with 119896 gt 1 Note that 119894th B-spline basisfunction of order 1 in (1) is a piecewise constant functionwith value 1 on the interval [119906

119894 119906119894+1

) called the support of1198731198941(119905) and zero elsewhere This support can be either an

interval or reduced to a point as knots 119906119894and 119906

119894+1must

not necessarily be different The number of times a knotappears in the knot vector is called themultiplicity of the knotand has an important effect on the shape and properties ofthe associated basis functions (see for instance [29 32] fordetails) If necessary the convention 00 = 0 in (2) is applied

A polynomial B-spline curve of order 119896 (or degree 119896 minus 1) isa piecewise polynomial curve given by

119862 (119905) =

119899

sum

119894=0

119887119894119873119894119896 (

119905) (3)

where 119887119894119894=0119899

are coefficients called control points as theyroughly determine the shape of the curve and 119873

119894119896(119905) are the

basis functions defined above For a proper definition of a B-spline curve in (3) the following relationship must hold 119903 =

119896 + 119899 (see [32] for further details)In many practical applications the first and last knots of

U are repeated as many times as the order as follows 1199060=

1199061= sdot sdot sdot = 119906

119896minus1= 0119906

119899+1= 119906119899+2

= sdot sdot sdot = 119906119899+119896

= 1 (such a knotvector is usually called a nonperiodic knot vector) In generala B-spline curve does not interpolate any of its control pointsinterpolation only occurs for nonperiodic knot vectors Insuch a case the B-spline curve does interpolate the first andlast control points [32] Since they are the most common incomputer design and manufacturing and many other fieldsin this work we will restrict ourselves to nonperiodic knotvectors Note however that ourmethod does not preclude anyother kind of knot vectors to be used instead

32 The Optimization Problem Similar to [49] let us assumethat the data to be fitted are given as

119910119894= 119865 (119905

119894) + 120598119894 (119894 = 1 119873) (4)

where 119865(119905) is the underlying (unknown) function of the dataand 120598119894is the measurement error and we assume that 119873 ≫

119899 In this regard a convenient model function 119891(119905) for (4)is given by (3) where both the vector B = (119887

0 1198871 119887

119899)119879

of coefficients and the vector U of knots are considered astuning parameters and (sdot)

119879 denotes the transpose of a vectoror matrix In the least-squares minimization of problem (4)

we determine the control points 119887119895(119895 = 0 119899) of the B-

spline curve 119891(119905) by minimizing the least-squares error 119876defined as the sum of squares of the residuals as follows

119876 =

119873

sum

119894=1

(119910119894minus 119891 (119905

119894))2=

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(5)

Note that the objective function to be optimized 119876 dependson the B-spline coefficients and the interior knots Thisproblem is well known to be a continuous multimodal andmultivariate nonlinear minimization problem [31] In orderto address this problem in this paper we apply a fireflyalgorithm and obtain an accurate choice of bothU andB

4 Firefly Algorithm

The firefly algorithm is a metaheuristic nature-inspired algo-rithm introduced in 2008 by Yang to solve optimization prob-lems [53 54] The algorithm is based on the social flashingbehavior of fireflies in nature The key ingredients of themethod are the variation of light intensity and formulation ofattractiveness In general the attractiveness of an individualis assumed to be proportional to their brightness which inturn is associated with the encoded objective function

In the firefly algorithm there are three particular ideal-ized rules which are based on some of the major flashingcharacteristics of real fireflies [53] They are as follows

(1) All fireflies are unisex so that one firefly will beattracted to other fireflies regardless of their sex

(2) The degree of attractiveness of a firefly is proportionalto its brightness which decreases as the distance fromthe other firefly increases due to the fact that the airabsorbs light For any two flashing fireflies the lessbrighter one will move towards the brighter one Ifthere is not a brighter or more attractive firefly thana particular one it will then move randomly

(3) The brightness or light intensity of a firefly is deter-mined by the value of the objective function of a givenproblem For instance for maximization problemsthe light intensity can simply be proportional to thevalue of the objective function

The distance between any two fireflies 119894 and 119895 at positionsX119894and X

119895 respectively can be defined as a Cartesian or

Euclidean distance as follows

119903119894119895=

10038171003817100381710038171003817X119894minus X119895

10038171003817100381710038171003817= radic

119889

sum

119896=1

(119909119894119896

minus 119909119895119896)

2

(6)

where 119909119894119896

is the 119896th component of the spatial coordinate X119894

of the 119894th firefly and 119889 is the number of dimensionsIn the firefly algorithm as attractiveness function of a

firefly 119895 one should select any monotonically decreasingfunction of the distance to the chosen firefly for example theexponential function as follows

120573 = 1205730119890minus120574119903120583

119894119895 (120583 ge 1) (7)

4 Mathematical Problems in Engineering

where 119903119894119895is the distance defined in (6) 120573

0is the initial

attractiveness at 119903 = 0 and 120574 is an absorption coefficient atthe source which controls the decrease of the light intensity

The movement of a firefly 119894 which is attracted by a moreattractive (ie brighter) firefly 119895 is governed by the followingevolution equation

X119894= X119894+ 1205730119890minus120574119903120583

119894119895(X119895minus X119894) + 120572 (120590 minus

1

2

) (8)

where the first term on the right-hand side is the currentposition of the firefly the second term is used for consideringthe attractiveness of the firefly to light intensity seen byadjacent fireflies and the third term is used for the randommovement of a firefly in case there are not any brighter onesThe coefficient 120572 is a randomization parameter determinedby the problem of interest while 120590 is a random numbergenerator uniformly distributed in the space [0 1]

5 The Proposed Method

In this section the firefly algorithm described in previousparagraphs is applied to obtain the approximating explicitB-spline curve of a given set of noisy data points expressedaccording to (3)-(4) To this aim in this work we considerfour different fitness functions The first objective functioncorresponds to the evaluation of the least-squares functiongiven by (5) Since this error function does not consider thenumber of data points we also compute the RMSE (root-mean squared error) given by

RMSE =radic

sum119873

119894=1(119910119894minus sum119899

119895=0119887119895119873119895119896

(119905119894))

2

119873

(9)

Note however that the best error might be obtained ineither (5) or (9) at the expense of an unnecessarily large num-ber of variables To overcome this limitation we also computetwo other fitness functions Akaike Information Criterion(AIC) [55 56] and Bayesian Information Criterion (BIC) [57]Both are penalized information-theoretical criteria aimedat finding the best approximating model to the true datathrough an adequate trade-off between fidelity and simplicityThey are comprised of two terms the first one accounts forthe fidelity of the model function while the second one is apenalty term to minimize the number of free parameters ofthe model 120578 They are given respectively by

AIC = 119873log119890(119876) + 2120578

BIC = 119873log119890(119876) + 120578log

119890(119873)

(10)

A simple comparison between (10) shows that bothcriteria are quite similar but BIC applies a larger penaltythan AIC Thus as other factors are equal it tends to selectsimpler models than AIC (ie models with fewer parame-ters) Both methods provide very similar results for smoothunderlying functions Differences might arise however forfunctions exhibiting sharp features discontinuities or cuspsIn particular AIC tends to yield unnecessary redundant knots

and therefore BIC becomes more adequate for such modelsA great advantage of AIC and BIC criteria is that they avoidthe use of subjective parameters such as error bounds orsmoothing factors Furthermore they provide a simple andstraightforward procedure to determine the best model thesmaller their value the better fitness Because of that weuse them to select the best model for our examples and tocompare our results to those of other alternative approaches

Before searching a solution to the problem two sets ofcontrol parameters must be set up The first set correspondsto the curve parameters the number of control points andthe order of the B-spline curve In general they are freelychosen by the user according to the complexity of the shapeof the underlying function of data and the requirements ofthe particular problem under study with the only constraintthat 119899 ge 119896 The second set of parameters relates to the fireflyalgorithm itself As usual when working with nature-inspiredmetaheuristic techniques the choice of control parametersis very important as it strongly influences the performanceof the method Although some guidelines are given in theliterature to tackle this issue such a selection is problem-dependent and therefore it remains empirical to a largeextent In this paper our parameter tuning is based on acombination of both theoretical results found in the literatureof the field and a large collection of empirical results Fromthe former it is well known that the value of absorptioncoefficient 120574 is important in determining the speed ofconvergence and the behavior of the method In theory 120574 isin

[0infin) but in practice values in the extremes should beavoided When 120574 rarr 0 the attractiveness becomes constantwhich is equivalent to say that the light intensity does notdecrease with distance so the fireflies are visible anywherewhile that 120574 rarr infin corresponds to the case where theattractiveness function in (7) becomes a Dirac 120575-functionThis case is equivalent to the situation where the firefliesmove in a very foggy environment where they cannot see theother fireflies and hence theymove randomly In other wordsthis corresponds to the case of a completely random searchmethod Based on this analysis we carried out thousands ofsimulations to determine a suitable value for 120574 and foundthat the value 120574 = 05 provides a quick convergence ofthe algorithm to the optimal solution Regarding the initialattractiveness 120573

0 some theoretical results suggest that 120573

0= 1

is a good choice for many optimization problems We alsotake this value in this paper with very good results as it willbe discussed in next section For the potential coefficient 120583any positive value can be used But it is noticed that the lightintensity varies according to the inverse square law so weset up 120583 = 2 accordingly Finally a stochastic component isnecessary in the fireflymethod in order to allownew solutionsappear and avoid to getting stuck in a local minimumHowever larger values introduces large perturbations on theevolution of the firefly and therefore delay convergenceto the global optima In this work we carried out severalsimulations to determine the optimal value for this parameter120572 and finally we set up its value of 05 for this randomizationparameter The reader is referred to Section 64 for a moredetailed discussion about how the variation of this parameteraffects the behavior of our method

Mathematical Problems in Engineering 5

Once the parameters have been set up the firefly algo-rithm is executed for a given number of fireflies representingpotential solutions of the optimization problem Each fireflyin our method is a real-valued vector of length 119899 minus 119896 + 1initialized with uniformly distributed random numbers onthe parametric domain [0 1] and then sorted in increasingorder In this work an initial population 119899

119891 of fireflies is

considered Its value is set up to 119899119891

= 100 in all examplesof this paper We also tried larger populations of fireflies(up to 1000 individuals) but found that our results do notchange significantly Since larger populations mean largercomputation times with no remarkable improvement at allwe found this value to be appropriate in our simulations

This initial population is then subjected to the fireflymechanism and least-squares minimization yielding a col-lection of new solutions to the optimization problem (5)In our executions we compute independently all four fitnessfunctions indicated above meaning that our simulationsare to be repeated for each fitness function On the otherhand each simulation is repeated several times accordingto a parameter 120581 in order to remove the spurious effects ofrandomization typically arising in any stochastic process Inthis paper we consider a value of 120581 = 20 meaning that eachsimulation is independently carried out 80 times to obtainthe final results Each execution is performed for a givennumber of iterations 119899iter In general the firefly algorithmdoes not need a large number of iterations to reach the globaloptima This also happens in this case In all our computersimulations we found empirically that 119899iter = 10

3 is a suitablevalue and larger values for this parameter do not improveour simulation results Once the algorithm is executed forthe given number of iterations the firefly with the best (ieminimum) fitness value is selected as the best solution to theoptimization problem

6 Experimental Results

The method described in the previous section has beenapplied to several examples from different fields To keep thepaper in manageable size in this section we describe onlythree of them the response of an RC circuit a volumetricmoisture content example and the side profile section of acar body These examples have been carefully chosen for tworeasons firstly to show the diversity of situations to whichour algorithm can be applied and secondly because theycorrespond to interesting real-world engineering problemsrather than to academic examples As wewill show below ourmethod provides a very accurate solution to these problemsin terms of explicit B-spline curves We think we haveprovided enough examples to convince our readers about thewide range of applicability of our approach

61 Response of an RC Circuit The resistor-capacitor (RC)circuit is an electronic circuit comprised of resistors andcapacitors driven by a voltage or current source RC circuitsare very popular the most common being the high-passand low-pass filters The simplest version is the first-orderRC circuit where just one capacitor and one resistor are

Figure 1 Applying the firefly algorithm to fit a series of data pointsfrom an RC circuit original data points (red cross symbols) and bestexplicit B-spline fitting curve (blue solid line)

considered In this example we consider a signal of 301 datapoints of a series first-order RC circuit They are depicted asa collection of red cross symbols in Figure 1 We apply ourmethod to this sequence of data points by using a third-orderB-spline curve with 119899 = 42 The best fitting curve we obtainis displayed as a blue solid line in Figure 1 This example hasbeen primarily chosen because the underlying curve of datashows a qualitatively different behavior at both ends with ahighly oscillating region on the left and a steady-state behav-ior on the right All these features make this function a goodcandidate to check the performance of our approach Even inthis case our method yields a fitting of the curve to the datapointsThe corresponding fitting errors for the best executionand the average of 20 executions are reported in the lastcolumnof Table 3They are in good agreementwith the visualresults in the figure about the accurate fitting of data points

62 Volumetric Moisture Content This example uses a setof 16 measurements of a volumetric moisture content asdescribed in [41]This example has been traditionally used asa benchmark to test different curve approximation methods(see [41] for details) Figure 2 shows the collection of 16

data points along with their best fourth-order B-spline fittingcurve for 119899 = 7 obtained with our firefly-based method forthis data setThe figure clearly shows the good approximationof data points Note that the fitting curve does not generallypass through the data points (ie it is truly an approximatingcurve not an interpolating one) Note also that the fittingcurve captures the tendency of points verywell evenwith onlya few parameters thus encoding economically the primaryinformation of data The corresponding fitting errors for thebest execution and the average of 20 executions are againreported in the last column of Table 3

63 Side Profile Section of a Car Body This example consistsof the data fitting of a set of 243 noisy data points from the In(+119884 axis) side profile section of a clay model of a notchbackthree-box sedan car bodyThe data points were obtained by alayout machine by the Spanish car maker provider Candematyears ago Data points of the side profile section are sorted instandard order that is from forward (minus119883 axis) on the left to

6 Mathematical Problems in Engineering

Table 1 Best and average values of 119876 RMSE AIC and BIC fitting errors of the first example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 406737 119876(best) 413276 119876(best) 441259

119876(avg) 453278 119876(avg) 508751 119876(avg) 537882

RMSE(best) 011624 RMSE(best) 011717 RMSE(best) 012107

RMSE(avg) 012271 RMSE(avg) 013000 RMSE(avg) 013367

AIC(best) 5883019 AIC(best) 5931025 AIC(best) 6128230

AIC(avg) 6209119 AIC(avg) 6556633 AIC(avg) 6724231

BIC(best) 8959921 BIC(best) 9007927 BIC(best) 9205131

BIC(avg) 9286021 BIC(avg) 9633534 BIC(avg) 9801133

120572 = 04 120572 = 05 120572 = 06

119876(best) 375236 119876(best) 384178 119876(best) 433295119876(avg) 402171 119876(avg) 400119 119876(avg) 512274RMSE(best) 011165 RMSE(best) 011297 RMSE(best) 011997RMSE(avg) 011559 RMSE(avg) 011529 RMSE(avg) 013045AIC(best) 5640378 AIC(best) 5711274 AIC(best) 6073408AIC(avg) 5849038 AIC(avg) 5833645 AIC(avg) 6577405BIC(best) 8717280 BIC(best) 8788175 BIC(best) 9150309BIC(avg) 8925940 BIC(avg) 8910546 BIC(avg) 9654306

120572 = 07 120572 = 08 120572 = 09

119876(best) 631058 119876(best) 856754 119876(best) 879361

119876(avg) 697132 119876(avg) 971118 119876(avg) 1014490

RMSE(best) 014479 RMSE(best) 016871 RMSE(best) 017092

RMSE(avg) 015218 RMSE(avg) 017961 RMSE(avg) 018358

AIC(best) 7205105 AIC(best) 8125421 AIC(best) 8203816

AIC(avg) 7504831 AIC(avg) 8502566 AIC(avg) 8634083

BIC(best) 10282006 BIC(best) 11202323 BIC(best) 11280717

BIC(avg) 10581733 BIC(avg) 11579467 BIC(avg) 11710984

Figure 2 Applying the firefly algorithm to fit a series of data pointsfrom the volumetric moisture content example in [41] original datapoints (red cross symbols) and best explicit B-spline fitting curve(blue solid line)

backward (+119883 axis) on the right [58] This example has beenchosen because it includes areas of varying slope rangingfrom the strong slope at both ends (upwards on the leftdownwards on the right) to the soft slope inmiddle part witha horizontal area between pillars119860 and119862 and in the cargo boxarea and a soft upward area in the car hood Consequently it

Figure 3 Applying the firefly algorithm to fit a series of data pointsfrom a side profile section of a car body original data points (redcross symbols) and best explicit B-spline fitting curve (blue solidline)

is also a very good candidate to check the performance of ourapproach

We have applied our firefly-based fitting method by usinga fourth-order B-spline curve with 119899 = 30 The best fittingcurve alongwith the data points is displayed in Figure 3Onceagain note the excellent fitting of the curve to the data pointsThe corresponding fitting errors for the best execution andthe average of 20 executions are again reported in the lastcolumn of Table 3

64 Analysis of Variation of Parameter 120572 In this section wepresent a detailed discussion about the effects of the variationof the parameter 120572 on the performance of our method

Mathematical Problems in Engineering 7

Table 2 Best and average values of 119876 RMSE AIC and BIC fitting errors of the third example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 126931119864 minus 3 119876(best) 142578119864 minus 3 119876(best) 128343119864 minus 3

119876(avg) 148146119864 minus 3 119876(avg) 171288119864 minus 3 119876(avg) 161544119864 minus 3

RMSE(best) 228549119864 minus 3 RMSE(best) 242227119864 minus 3 RMSE(best) 229817119864 minus 3

RMSE(avg) 246911119864 minus 3 RMSE(avg) 265497119864 minus 3 RMSE(avg) 257835119864 minus 3

AIC(best) minus15046354 AIC(best) minus14763878 AIC(best) minus15019472

AIC(avg) minus14670787 AIC(avg) minus14318077 AIC(avg) minus14460399

BIC(best) minus13020379 BIC(best) minus12737902 BIC(best) minus12993496

BIC(avg) minus12644811 BIC(avg) minus12292101 BIC(avg) minus12434423

120572 = 04 120572 = 05 120572 = 06

119876(best) 133544119864 minus 3 119876(best) 124781E minus 3 119876(best) 126573119864 minus 3

119876(avg) 155296119864 minus 3 119876(avg) 144402E minus 3 119876(avg) 147353119864 minus 3

RMSE(best) 234427119864 minus 3 RMSE(best) 226606E minus 3 RMSE(best) 228227119864 minus 3

RMSE(avg) 252799119864 minus 3 RMSE(avg) 243771E minus 3 RMSE(avg) 246250119864 minus 3

AIC(best) minus14922941 AIC(best) minus15087864 AIC(best) minus15053218

AIC(avg) minus14556249 AIC(avg) minus14732995 AIC(avg) minus14683829

BIC(best) minus12896965 BIC(best) minus13061884 BIC(best) minus13027242

BIC(avg) minus12530274 BIC(avg) minus12707020 BIC(avg) minus12657853

120572 = 07 120572 = 08 120572 = 09

119876(best) 138751119864 minus 3 119876(best) 157325119864 minus 3 119876(best) 179923119864 minus 3

119876(avg) 162695119864 minus 3 119876(avg) 193681119864 minus 3 119876(avg) 247886119864 minus 3

RMSE(best) 238954119864 minus 3 RMSE(best) 254446119864 minus 3 RMSE(best) 272210119864 minus 3

RMSE(avg) 258752119864 minus 3 RMSE(avg) 282319119864 minus 3 RMSE(avg) 319391119864 minus 3

AIC(best) minus14829994 AIC(best) minus14524706 AIC(best) minus14198563

AIC(avg) minus14443147 AIC(avg) minus14019512 AIC(avg) minus13419894

BIC(best) minus12804018 BIC(best) minus12498730 BIC(best) minus12172587

BIC(avg) minus12417171 BIC(avg) minus11993536 BIC(avg) minus11393918

To this purpose we carried out several simulation trials andcomputed the fitting error for the eight error criteria used inthis work In this section we show the results obtained for thefirst and third examples of this paperResults for the secondexample are not reported here because the low number ofinput data points makes it particularly resilient to variationsof parameter 120572 As a result the fitting errors for differentvalues of120572 are very similar to each other and to those reportedin the second row of Table 2

Table 1 shows the variation of the eight fitting error crite-ria for the RC circuit example and parameter 120572 varying from01 to 09 with step-size 01 Once again we carried out 20independent simulations for each value of 120572 and obtained thebest and the average values of the 20 executions Best resultsfor each error criterion are highlighted in bold for the sake ofclarity We can see that the values 120572 = 04 and 120572 = 05 leadto the best results for the best and average fitting error valuesrespectively Figure 4 shows graphically from left to right andtop to bottom the best (in blue) and average (in red) valuesof the 119876 RMSE AIC and BIC fitting errors respectivelyFrom the figure we can conclude that both 120572 = 04 and120572 = 05 are good choices as they lead to the best resultsfor this example Note that values lower and larger than thisoptimal values yield worse fitting error results This effect isparticularly noticeable for values of 120572 approaching to 1

Table 2 and Figure 5 show the corresponding results forthe side profile section of a car body example As the readercan see the value 120572 = 05 is again a very good choicealthough 120572 = 01 and 120572 = 06 also yields good results Onceagain increasing the value of 120572 towards 1 leads to a strongincrease of the fitting errors

It is worthwhile to recall that the choice of parameters isproblem-dependent meaning that our choice of parametersmight not be adequate for other examples Therefore it isalways advisable to carry out a preliminary analysis and com-puter simulations to determine a proper parameter tuning forbetter performance as it has been done in this section

65 Computational Issues All computations in this paperhave been performed on a 29GHz Intel Core i7 processorwith 8GB of RAM The source code has been implementedby the authors in the native programming language of thepopular scientific programMatlab version 2010b Regardingthe computation times all exampleswe tested can be obtainedin less than a second (excluding rendering) Obviously theCPU time depends on several factors such as the number ofdata points and the values of the different parameters of themethod making it hard to determine how long does it takefor a given example to be reconstructed

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Research Article Firefly Algorithm for Explicit B-Spline ...

Mathematical Problems in Engineering 3

The 119894th B-spline basis function 119873119894119896(119905) of order 119896 (or equiv-

alently degree 119896 minus 1) can be defined by the Cox-de Boorrecursive relations [38] as

1198731198941

(119905) =

1 if 119906119894le 119905 lt 119906

119894+1

0 otherwise(119894 = 0 119903 minus 1) (1)

119873119894119896

(119905) =

119905 minus 119906119894

119906119894+119896minus1

minus 119906119894

119873119894119896minus1

(119905)

+

119906119894+119896

minus 119905

119906119894+119896

minus 119906119894+1

119873119894+1119896minus1

(119905)

(2)

for 119894 = 0 119903 minus 119896 with 119896 gt 1 Note that 119894th B-spline basisfunction of order 1 in (1) is a piecewise constant functionwith value 1 on the interval [119906

119894 119906119894+1

) called the support of1198731198941(119905) and zero elsewhere This support can be either an

interval or reduced to a point as knots 119906119894and 119906

119894+1must

not necessarily be different The number of times a knotappears in the knot vector is called themultiplicity of the knotand has an important effect on the shape and properties ofthe associated basis functions (see for instance [29 32] fordetails) If necessary the convention 00 = 0 in (2) is applied

A polynomial B-spline curve of order 119896 (or degree 119896 minus 1) isa piecewise polynomial curve given by

119862 (119905) =

119899

sum

119894=0

119887119894119873119894119896 (

119905) (3)

where 119887119894119894=0119899

are coefficients called control points as theyroughly determine the shape of the curve and 119873

119894119896(119905) are the

basis functions defined above For a proper definition of a B-spline curve in (3) the following relationship must hold 119903 =

119896 + 119899 (see [32] for further details)In many practical applications the first and last knots of

U are repeated as many times as the order as follows 1199060=

1199061= sdot sdot sdot = 119906

119896minus1= 0119906

119899+1= 119906119899+2

= sdot sdot sdot = 119906119899+119896

= 1 (such a knotvector is usually called a nonperiodic knot vector) In generala B-spline curve does not interpolate any of its control pointsinterpolation only occurs for nonperiodic knot vectors Insuch a case the B-spline curve does interpolate the first andlast control points [32] Since they are the most common incomputer design and manufacturing and many other fieldsin this work we will restrict ourselves to nonperiodic knotvectors Note however that ourmethod does not preclude anyother kind of knot vectors to be used instead

32 The Optimization Problem Similar to [49] let us assumethat the data to be fitted are given as

119910119894= 119865 (119905

119894) + 120598119894 (119894 = 1 119873) (4)

where 119865(119905) is the underlying (unknown) function of the dataand 120598119894is the measurement error and we assume that 119873 ≫

119899 In this regard a convenient model function 119891(119905) for (4)is given by (3) where both the vector B = (119887

0 1198871 119887

119899)119879

of coefficients and the vector U of knots are considered astuning parameters and (sdot)

119879 denotes the transpose of a vectoror matrix In the least-squares minimization of problem (4)

we determine the control points 119887119895(119895 = 0 119899) of the B-

spline curve 119891(119905) by minimizing the least-squares error 119876defined as the sum of squares of the residuals as follows

119876 =

119873

sum

119894=1

(119910119894minus 119891 (119905

119894))2=

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(5)

Note that the objective function to be optimized 119876 dependson the B-spline coefficients and the interior knots Thisproblem is well known to be a continuous multimodal andmultivariate nonlinear minimization problem [31] In orderto address this problem in this paper we apply a fireflyalgorithm and obtain an accurate choice of bothU andB

4 Firefly Algorithm

The firefly algorithm is a metaheuristic nature-inspired algo-rithm introduced in 2008 by Yang to solve optimization prob-lems [53 54] The algorithm is based on the social flashingbehavior of fireflies in nature The key ingredients of themethod are the variation of light intensity and formulation ofattractiveness In general the attractiveness of an individualis assumed to be proportional to their brightness which inturn is associated with the encoded objective function

In the firefly algorithm there are three particular ideal-ized rules which are based on some of the major flashingcharacteristics of real fireflies [53] They are as follows

(1) All fireflies are unisex so that one firefly will beattracted to other fireflies regardless of their sex

(2) The degree of attractiveness of a firefly is proportionalto its brightness which decreases as the distance fromthe other firefly increases due to the fact that the airabsorbs light For any two flashing fireflies the lessbrighter one will move towards the brighter one Ifthere is not a brighter or more attractive firefly thana particular one it will then move randomly

(3) The brightness or light intensity of a firefly is deter-mined by the value of the objective function of a givenproblem For instance for maximization problemsthe light intensity can simply be proportional to thevalue of the objective function

The distance between any two fireflies 119894 and 119895 at positionsX119894and X

119895 respectively can be defined as a Cartesian or

Euclidean distance as follows

119903119894119895=

10038171003817100381710038171003817X119894minus X119895

10038171003817100381710038171003817= radic

119889

sum

119896=1

(119909119894119896

minus 119909119895119896)

2

(6)

where 119909119894119896

is the 119896th component of the spatial coordinate X119894

of the 119894th firefly and 119889 is the number of dimensionsIn the firefly algorithm as attractiveness function of a

firefly 119895 one should select any monotonically decreasingfunction of the distance to the chosen firefly for example theexponential function as follows

120573 = 1205730119890minus120574119903120583

119894119895 (120583 ge 1) (7)

4 Mathematical Problems in Engineering

where 119903119894119895is the distance defined in (6) 120573

0is the initial

attractiveness at 119903 = 0 and 120574 is an absorption coefficient atthe source which controls the decrease of the light intensity

The movement of a firefly 119894 which is attracted by a moreattractive (ie brighter) firefly 119895 is governed by the followingevolution equation

X119894= X119894+ 1205730119890minus120574119903120583

119894119895(X119895minus X119894) + 120572 (120590 minus

1

2

) (8)

where the first term on the right-hand side is the currentposition of the firefly the second term is used for consideringthe attractiveness of the firefly to light intensity seen byadjacent fireflies and the third term is used for the randommovement of a firefly in case there are not any brighter onesThe coefficient 120572 is a randomization parameter determinedby the problem of interest while 120590 is a random numbergenerator uniformly distributed in the space [0 1]

5 The Proposed Method

In this section the firefly algorithm described in previousparagraphs is applied to obtain the approximating explicitB-spline curve of a given set of noisy data points expressedaccording to (3)-(4) To this aim in this work we considerfour different fitness functions The first objective functioncorresponds to the evaluation of the least-squares functiongiven by (5) Since this error function does not consider thenumber of data points we also compute the RMSE (root-mean squared error) given by

RMSE =radic

sum119873

119894=1(119910119894minus sum119899

119895=0119887119895119873119895119896

(119905119894))

2

119873

(9)

Note however that the best error might be obtained ineither (5) or (9) at the expense of an unnecessarily large num-ber of variables To overcome this limitation we also computetwo other fitness functions Akaike Information Criterion(AIC) [55 56] and Bayesian Information Criterion (BIC) [57]Both are penalized information-theoretical criteria aimedat finding the best approximating model to the true datathrough an adequate trade-off between fidelity and simplicityThey are comprised of two terms the first one accounts forthe fidelity of the model function while the second one is apenalty term to minimize the number of free parameters ofthe model 120578 They are given respectively by

AIC = 119873log119890(119876) + 2120578

BIC = 119873log119890(119876) + 120578log

119890(119873)

(10)

A simple comparison between (10) shows that bothcriteria are quite similar but BIC applies a larger penaltythan AIC Thus as other factors are equal it tends to selectsimpler models than AIC (ie models with fewer parame-ters) Both methods provide very similar results for smoothunderlying functions Differences might arise however forfunctions exhibiting sharp features discontinuities or cuspsIn particular AIC tends to yield unnecessary redundant knots

and therefore BIC becomes more adequate for such modelsA great advantage of AIC and BIC criteria is that they avoidthe use of subjective parameters such as error bounds orsmoothing factors Furthermore they provide a simple andstraightforward procedure to determine the best model thesmaller their value the better fitness Because of that weuse them to select the best model for our examples and tocompare our results to those of other alternative approaches

Before searching a solution to the problem two sets ofcontrol parameters must be set up The first set correspondsto the curve parameters the number of control points andthe order of the B-spline curve In general they are freelychosen by the user according to the complexity of the shapeof the underlying function of data and the requirements ofthe particular problem under study with the only constraintthat 119899 ge 119896 The second set of parameters relates to the fireflyalgorithm itself As usual when working with nature-inspiredmetaheuristic techniques the choice of control parametersis very important as it strongly influences the performanceof the method Although some guidelines are given in theliterature to tackle this issue such a selection is problem-dependent and therefore it remains empirical to a largeextent In this paper our parameter tuning is based on acombination of both theoretical results found in the literatureof the field and a large collection of empirical results Fromthe former it is well known that the value of absorptioncoefficient 120574 is important in determining the speed ofconvergence and the behavior of the method In theory 120574 isin

[0infin) but in practice values in the extremes should beavoided When 120574 rarr 0 the attractiveness becomes constantwhich is equivalent to say that the light intensity does notdecrease with distance so the fireflies are visible anywherewhile that 120574 rarr infin corresponds to the case where theattractiveness function in (7) becomes a Dirac 120575-functionThis case is equivalent to the situation where the firefliesmove in a very foggy environment where they cannot see theother fireflies and hence theymove randomly In other wordsthis corresponds to the case of a completely random searchmethod Based on this analysis we carried out thousands ofsimulations to determine a suitable value for 120574 and foundthat the value 120574 = 05 provides a quick convergence ofthe algorithm to the optimal solution Regarding the initialattractiveness 120573

0 some theoretical results suggest that 120573

0= 1

is a good choice for many optimization problems We alsotake this value in this paper with very good results as it willbe discussed in next section For the potential coefficient 120583any positive value can be used But it is noticed that the lightintensity varies according to the inverse square law so weset up 120583 = 2 accordingly Finally a stochastic component isnecessary in the fireflymethod in order to allownew solutionsappear and avoid to getting stuck in a local minimumHowever larger values introduces large perturbations on theevolution of the firefly and therefore delay convergenceto the global optima In this work we carried out severalsimulations to determine the optimal value for this parameter120572 and finally we set up its value of 05 for this randomizationparameter The reader is referred to Section 64 for a moredetailed discussion about how the variation of this parameteraffects the behavior of our method

Mathematical Problems in Engineering 5

Once the parameters have been set up the firefly algo-rithm is executed for a given number of fireflies representingpotential solutions of the optimization problem Each fireflyin our method is a real-valued vector of length 119899 minus 119896 + 1initialized with uniformly distributed random numbers onthe parametric domain [0 1] and then sorted in increasingorder In this work an initial population 119899

119891 of fireflies is

considered Its value is set up to 119899119891

= 100 in all examplesof this paper We also tried larger populations of fireflies(up to 1000 individuals) but found that our results do notchange significantly Since larger populations mean largercomputation times with no remarkable improvement at allwe found this value to be appropriate in our simulations

This initial population is then subjected to the fireflymechanism and least-squares minimization yielding a col-lection of new solutions to the optimization problem (5)In our executions we compute independently all four fitnessfunctions indicated above meaning that our simulationsare to be repeated for each fitness function On the otherhand each simulation is repeated several times accordingto a parameter 120581 in order to remove the spurious effects ofrandomization typically arising in any stochastic process Inthis paper we consider a value of 120581 = 20 meaning that eachsimulation is independently carried out 80 times to obtainthe final results Each execution is performed for a givennumber of iterations 119899iter In general the firefly algorithmdoes not need a large number of iterations to reach the globaloptima This also happens in this case In all our computersimulations we found empirically that 119899iter = 10

3 is a suitablevalue and larger values for this parameter do not improveour simulation results Once the algorithm is executed forthe given number of iterations the firefly with the best (ieminimum) fitness value is selected as the best solution to theoptimization problem

6 Experimental Results

The method described in the previous section has beenapplied to several examples from different fields To keep thepaper in manageable size in this section we describe onlythree of them the response of an RC circuit a volumetricmoisture content example and the side profile section of acar body These examples have been carefully chosen for tworeasons firstly to show the diversity of situations to whichour algorithm can be applied and secondly because theycorrespond to interesting real-world engineering problemsrather than to academic examples As wewill show below ourmethod provides a very accurate solution to these problemsin terms of explicit B-spline curves We think we haveprovided enough examples to convince our readers about thewide range of applicability of our approach

61 Response of an RC Circuit The resistor-capacitor (RC)circuit is an electronic circuit comprised of resistors andcapacitors driven by a voltage or current source RC circuitsare very popular the most common being the high-passand low-pass filters The simplest version is the first-orderRC circuit where just one capacitor and one resistor are

Figure 1 Applying the firefly algorithm to fit a series of data pointsfrom an RC circuit original data points (red cross symbols) and bestexplicit B-spline fitting curve (blue solid line)

considered In this example we consider a signal of 301 datapoints of a series first-order RC circuit They are depicted asa collection of red cross symbols in Figure 1 We apply ourmethod to this sequence of data points by using a third-orderB-spline curve with 119899 = 42 The best fitting curve we obtainis displayed as a blue solid line in Figure 1 This example hasbeen primarily chosen because the underlying curve of datashows a qualitatively different behavior at both ends with ahighly oscillating region on the left and a steady-state behav-ior on the right All these features make this function a goodcandidate to check the performance of our approach Even inthis case our method yields a fitting of the curve to the datapointsThe corresponding fitting errors for the best executionand the average of 20 executions are reported in the lastcolumnof Table 3They are in good agreementwith the visualresults in the figure about the accurate fitting of data points

62 Volumetric Moisture Content This example uses a setof 16 measurements of a volumetric moisture content asdescribed in [41]This example has been traditionally used asa benchmark to test different curve approximation methods(see [41] for details) Figure 2 shows the collection of 16

data points along with their best fourth-order B-spline fittingcurve for 119899 = 7 obtained with our firefly-based method forthis data setThe figure clearly shows the good approximationof data points Note that the fitting curve does not generallypass through the data points (ie it is truly an approximatingcurve not an interpolating one) Note also that the fittingcurve captures the tendency of points verywell evenwith onlya few parameters thus encoding economically the primaryinformation of data The corresponding fitting errors for thebest execution and the average of 20 executions are againreported in the last column of Table 3

63 Side Profile Section of a Car Body This example consistsof the data fitting of a set of 243 noisy data points from the In(+119884 axis) side profile section of a clay model of a notchbackthree-box sedan car bodyThe data points were obtained by alayout machine by the Spanish car maker provider Candematyears ago Data points of the side profile section are sorted instandard order that is from forward (minus119883 axis) on the left to

6 Mathematical Problems in Engineering

Table 1 Best and average values of 119876 RMSE AIC and BIC fitting errors of the first example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 406737 119876(best) 413276 119876(best) 441259

119876(avg) 453278 119876(avg) 508751 119876(avg) 537882

RMSE(best) 011624 RMSE(best) 011717 RMSE(best) 012107

RMSE(avg) 012271 RMSE(avg) 013000 RMSE(avg) 013367

AIC(best) 5883019 AIC(best) 5931025 AIC(best) 6128230

AIC(avg) 6209119 AIC(avg) 6556633 AIC(avg) 6724231

BIC(best) 8959921 BIC(best) 9007927 BIC(best) 9205131

BIC(avg) 9286021 BIC(avg) 9633534 BIC(avg) 9801133

120572 = 04 120572 = 05 120572 = 06

119876(best) 375236 119876(best) 384178 119876(best) 433295119876(avg) 402171 119876(avg) 400119 119876(avg) 512274RMSE(best) 011165 RMSE(best) 011297 RMSE(best) 011997RMSE(avg) 011559 RMSE(avg) 011529 RMSE(avg) 013045AIC(best) 5640378 AIC(best) 5711274 AIC(best) 6073408AIC(avg) 5849038 AIC(avg) 5833645 AIC(avg) 6577405BIC(best) 8717280 BIC(best) 8788175 BIC(best) 9150309BIC(avg) 8925940 BIC(avg) 8910546 BIC(avg) 9654306

120572 = 07 120572 = 08 120572 = 09

119876(best) 631058 119876(best) 856754 119876(best) 879361

119876(avg) 697132 119876(avg) 971118 119876(avg) 1014490

RMSE(best) 014479 RMSE(best) 016871 RMSE(best) 017092

RMSE(avg) 015218 RMSE(avg) 017961 RMSE(avg) 018358

AIC(best) 7205105 AIC(best) 8125421 AIC(best) 8203816

AIC(avg) 7504831 AIC(avg) 8502566 AIC(avg) 8634083

BIC(best) 10282006 BIC(best) 11202323 BIC(best) 11280717

BIC(avg) 10581733 BIC(avg) 11579467 BIC(avg) 11710984

Figure 2 Applying the firefly algorithm to fit a series of data pointsfrom the volumetric moisture content example in [41] original datapoints (red cross symbols) and best explicit B-spline fitting curve(blue solid line)

backward (+119883 axis) on the right [58] This example has beenchosen because it includes areas of varying slope rangingfrom the strong slope at both ends (upwards on the leftdownwards on the right) to the soft slope inmiddle part witha horizontal area between pillars119860 and119862 and in the cargo boxarea and a soft upward area in the car hood Consequently it

Figure 3 Applying the firefly algorithm to fit a series of data pointsfrom a side profile section of a car body original data points (redcross symbols) and best explicit B-spline fitting curve (blue solidline)

is also a very good candidate to check the performance of ourapproach

We have applied our firefly-based fitting method by usinga fourth-order B-spline curve with 119899 = 30 The best fittingcurve alongwith the data points is displayed in Figure 3Onceagain note the excellent fitting of the curve to the data pointsThe corresponding fitting errors for the best execution andthe average of 20 executions are again reported in the lastcolumn of Table 3

64 Analysis of Variation of Parameter 120572 In this section wepresent a detailed discussion about the effects of the variationof the parameter 120572 on the performance of our method

Mathematical Problems in Engineering 7

Table 2 Best and average values of 119876 RMSE AIC and BIC fitting errors of the third example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 126931119864 minus 3 119876(best) 142578119864 minus 3 119876(best) 128343119864 minus 3

119876(avg) 148146119864 minus 3 119876(avg) 171288119864 minus 3 119876(avg) 161544119864 minus 3

RMSE(best) 228549119864 minus 3 RMSE(best) 242227119864 minus 3 RMSE(best) 229817119864 minus 3

RMSE(avg) 246911119864 minus 3 RMSE(avg) 265497119864 minus 3 RMSE(avg) 257835119864 minus 3

AIC(best) minus15046354 AIC(best) minus14763878 AIC(best) minus15019472

AIC(avg) minus14670787 AIC(avg) minus14318077 AIC(avg) minus14460399

BIC(best) minus13020379 BIC(best) minus12737902 BIC(best) minus12993496

BIC(avg) minus12644811 BIC(avg) minus12292101 BIC(avg) minus12434423

120572 = 04 120572 = 05 120572 = 06

119876(best) 133544119864 minus 3 119876(best) 124781E minus 3 119876(best) 126573119864 minus 3

119876(avg) 155296119864 minus 3 119876(avg) 144402E minus 3 119876(avg) 147353119864 minus 3

RMSE(best) 234427119864 minus 3 RMSE(best) 226606E minus 3 RMSE(best) 228227119864 minus 3

RMSE(avg) 252799119864 minus 3 RMSE(avg) 243771E minus 3 RMSE(avg) 246250119864 minus 3

AIC(best) minus14922941 AIC(best) minus15087864 AIC(best) minus15053218

AIC(avg) minus14556249 AIC(avg) minus14732995 AIC(avg) minus14683829

BIC(best) minus12896965 BIC(best) minus13061884 BIC(best) minus13027242

BIC(avg) minus12530274 BIC(avg) minus12707020 BIC(avg) minus12657853

120572 = 07 120572 = 08 120572 = 09

119876(best) 138751119864 minus 3 119876(best) 157325119864 minus 3 119876(best) 179923119864 minus 3

119876(avg) 162695119864 minus 3 119876(avg) 193681119864 minus 3 119876(avg) 247886119864 minus 3

RMSE(best) 238954119864 minus 3 RMSE(best) 254446119864 minus 3 RMSE(best) 272210119864 minus 3

RMSE(avg) 258752119864 minus 3 RMSE(avg) 282319119864 minus 3 RMSE(avg) 319391119864 minus 3

AIC(best) minus14829994 AIC(best) minus14524706 AIC(best) minus14198563

AIC(avg) minus14443147 AIC(avg) minus14019512 AIC(avg) minus13419894

BIC(best) minus12804018 BIC(best) minus12498730 BIC(best) minus12172587

BIC(avg) minus12417171 BIC(avg) minus11993536 BIC(avg) minus11393918

To this purpose we carried out several simulation trials andcomputed the fitting error for the eight error criteria used inthis work In this section we show the results obtained for thefirst and third examples of this paperResults for the secondexample are not reported here because the low number ofinput data points makes it particularly resilient to variationsof parameter 120572 As a result the fitting errors for differentvalues of120572 are very similar to each other and to those reportedin the second row of Table 2

Table 1 shows the variation of the eight fitting error crite-ria for the RC circuit example and parameter 120572 varying from01 to 09 with step-size 01 Once again we carried out 20independent simulations for each value of 120572 and obtained thebest and the average values of the 20 executions Best resultsfor each error criterion are highlighted in bold for the sake ofclarity We can see that the values 120572 = 04 and 120572 = 05 leadto the best results for the best and average fitting error valuesrespectively Figure 4 shows graphically from left to right andtop to bottom the best (in blue) and average (in red) valuesof the 119876 RMSE AIC and BIC fitting errors respectivelyFrom the figure we can conclude that both 120572 = 04 and120572 = 05 are good choices as they lead to the best resultsfor this example Note that values lower and larger than thisoptimal values yield worse fitting error results This effect isparticularly noticeable for values of 120572 approaching to 1

Table 2 and Figure 5 show the corresponding results forthe side profile section of a car body example As the readercan see the value 120572 = 05 is again a very good choicealthough 120572 = 01 and 120572 = 06 also yields good results Onceagain increasing the value of 120572 towards 1 leads to a strongincrease of the fitting errors

It is worthwhile to recall that the choice of parameters isproblem-dependent meaning that our choice of parametersmight not be adequate for other examples Therefore it isalways advisable to carry out a preliminary analysis and com-puter simulations to determine a proper parameter tuning forbetter performance as it has been done in this section

65 Computational Issues All computations in this paperhave been performed on a 29GHz Intel Core i7 processorwith 8GB of RAM The source code has been implementedby the authors in the native programming language of thepopular scientific programMatlab version 2010b Regardingthe computation times all exampleswe tested can be obtainedin less than a second (excluding rendering) Obviously theCPU time depends on several factors such as the number ofdata points and the values of the different parameters of themethod making it hard to determine how long does it takefor a given example to be reconstructed

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Research Article Firefly Algorithm for Explicit B-Spline ...

4 Mathematical Problems in Engineering

where 119903119894119895is the distance defined in (6) 120573

0is the initial

attractiveness at 119903 = 0 and 120574 is an absorption coefficient atthe source which controls the decrease of the light intensity

The movement of a firefly 119894 which is attracted by a moreattractive (ie brighter) firefly 119895 is governed by the followingevolution equation

X119894= X119894+ 1205730119890minus120574119903120583

119894119895(X119895minus X119894) + 120572 (120590 minus

1

2

) (8)

where the first term on the right-hand side is the currentposition of the firefly the second term is used for consideringthe attractiveness of the firefly to light intensity seen byadjacent fireflies and the third term is used for the randommovement of a firefly in case there are not any brighter onesThe coefficient 120572 is a randomization parameter determinedby the problem of interest while 120590 is a random numbergenerator uniformly distributed in the space [0 1]

5 The Proposed Method

In this section the firefly algorithm described in previousparagraphs is applied to obtain the approximating explicitB-spline curve of a given set of noisy data points expressedaccording to (3)-(4) To this aim in this work we considerfour different fitness functions The first objective functioncorresponds to the evaluation of the least-squares functiongiven by (5) Since this error function does not consider thenumber of data points we also compute the RMSE (root-mean squared error) given by

RMSE =radic

sum119873

119894=1(119910119894minus sum119899

119895=0119887119895119873119895119896

(119905119894))

2

119873

(9)

Note however that the best error might be obtained ineither (5) or (9) at the expense of an unnecessarily large num-ber of variables To overcome this limitation we also computetwo other fitness functions Akaike Information Criterion(AIC) [55 56] and Bayesian Information Criterion (BIC) [57]Both are penalized information-theoretical criteria aimedat finding the best approximating model to the true datathrough an adequate trade-off between fidelity and simplicityThey are comprised of two terms the first one accounts forthe fidelity of the model function while the second one is apenalty term to minimize the number of free parameters ofthe model 120578 They are given respectively by

AIC = 119873log119890(119876) + 2120578

BIC = 119873log119890(119876) + 120578log

119890(119873)

(10)

A simple comparison between (10) shows that bothcriteria are quite similar but BIC applies a larger penaltythan AIC Thus as other factors are equal it tends to selectsimpler models than AIC (ie models with fewer parame-ters) Both methods provide very similar results for smoothunderlying functions Differences might arise however forfunctions exhibiting sharp features discontinuities or cuspsIn particular AIC tends to yield unnecessary redundant knots

and therefore BIC becomes more adequate for such modelsA great advantage of AIC and BIC criteria is that they avoidthe use of subjective parameters such as error bounds orsmoothing factors Furthermore they provide a simple andstraightforward procedure to determine the best model thesmaller their value the better fitness Because of that weuse them to select the best model for our examples and tocompare our results to those of other alternative approaches

Before searching a solution to the problem two sets ofcontrol parameters must be set up The first set correspondsto the curve parameters the number of control points andthe order of the B-spline curve In general they are freelychosen by the user according to the complexity of the shapeof the underlying function of data and the requirements ofthe particular problem under study with the only constraintthat 119899 ge 119896 The second set of parameters relates to the fireflyalgorithm itself As usual when working with nature-inspiredmetaheuristic techniques the choice of control parametersis very important as it strongly influences the performanceof the method Although some guidelines are given in theliterature to tackle this issue such a selection is problem-dependent and therefore it remains empirical to a largeextent In this paper our parameter tuning is based on acombination of both theoretical results found in the literatureof the field and a large collection of empirical results Fromthe former it is well known that the value of absorptioncoefficient 120574 is important in determining the speed ofconvergence and the behavior of the method In theory 120574 isin

[0infin) but in practice values in the extremes should beavoided When 120574 rarr 0 the attractiveness becomes constantwhich is equivalent to say that the light intensity does notdecrease with distance so the fireflies are visible anywherewhile that 120574 rarr infin corresponds to the case where theattractiveness function in (7) becomes a Dirac 120575-functionThis case is equivalent to the situation where the firefliesmove in a very foggy environment where they cannot see theother fireflies and hence theymove randomly In other wordsthis corresponds to the case of a completely random searchmethod Based on this analysis we carried out thousands ofsimulations to determine a suitable value for 120574 and foundthat the value 120574 = 05 provides a quick convergence ofthe algorithm to the optimal solution Regarding the initialattractiveness 120573

0 some theoretical results suggest that 120573

0= 1

is a good choice for many optimization problems We alsotake this value in this paper with very good results as it willbe discussed in next section For the potential coefficient 120583any positive value can be used But it is noticed that the lightintensity varies according to the inverse square law so weset up 120583 = 2 accordingly Finally a stochastic component isnecessary in the fireflymethod in order to allownew solutionsappear and avoid to getting stuck in a local minimumHowever larger values introduces large perturbations on theevolution of the firefly and therefore delay convergenceto the global optima In this work we carried out severalsimulations to determine the optimal value for this parameter120572 and finally we set up its value of 05 for this randomizationparameter The reader is referred to Section 64 for a moredetailed discussion about how the variation of this parameteraffects the behavior of our method

Mathematical Problems in Engineering 5

Once the parameters have been set up the firefly algo-rithm is executed for a given number of fireflies representingpotential solutions of the optimization problem Each fireflyin our method is a real-valued vector of length 119899 minus 119896 + 1initialized with uniformly distributed random numbers onthe parametric domain [0 1] and then sorted in increasingorder In this work an initial population 119899

119891 of fireflies is

considered Its value is set up to 119899119891

= 100 in all examplesof this paper We also tried larger populations of fireflies(up to 1000 individuals) but found that our results do notchange significantly Since larger populations mean largercomputation times with no remarkable improvement at allwe found this value to be appropriate in our simulations

This initial population is then subjected to the fireflymechanism and least-squares minimization yielding a col-lection of new solutions to the optimization problem (5)In our executions we compute independently all four fitnessfunctions indicated above meaning that our simulationsare to be repeated for each fitness function On the otherhand each simulation is repeated several times accordingto a parameter 120581 in order to remove the spurious effects ofrandomization typically arising in any stochastic process Inthis paper we consider a value of 120581 = 20 meaning that eachsimulation is independently carried out 80 times to obtainthe final results Each execution is performed for a givennumber of iterations 119899iter In general the firefly algorithmdoes not need a large number of iterations to reach the globaloptima This also happens in this case In all our computersimulations we found empirically that 119899iter = 10

3 is a suitablevalue and larger values for this parameter do not improveour simulation results Once the algorithm is executed forthe given number of iterations the firefly with the best (ieminimum) fitness value is selected as the best solution to theoptimization problem

6 Experimental Results

The method described in the previous section has beenapplied to several examples from different fields To keep thepaper in manageable size in this section we describe onlythree of them the response of an RC circuit a volumetricmoisture content example and the side profile section of acar body These examples have been carefully chosen for tworeasons firstly to show the diversity of situations to whichour algorithm can be applied and secondly because theycorrespond to interesting real-world engineering problemsrather than to academic examples As wewill show below ourmethod provides a very accurate solution to these problemsin terms of explicit B-spline curves We think we haveprovided enough examples to convince our readers about thewide range of applicability of our approach

61 Response of an RC Circuit The resistor-capacitor (RC)circuit is an electronic circuit comprised of resistors andcapacitors driven by a voltage or current source RC circuitsare very popular the most common being the high-passand low-pass filters The simplest version is the first-orderRC circuit where just one capacitor and one resistor are

Figure 1 Applying the firefly algorithm to fit a series of data pointsfrom an RC circuit original data points (red cross symbols) and bestexplicit B-spline fitting curve (blue solid line)

considered In this example we consider a signal of 301 datapoints of a series first-order RC circuit They are depicted asa collection of red cross symbols in Figure 1 We apply ourmethod to this sequence of data points by using a third-orderB-spline curve with 119899 = 42 The best fitting curve we obtainis displayed as a blue solid line in Figure 1 This example hasbeen primarily chosen because the underlying curve of datashows a qualitatively different behavior at both ends with ahighly oscillating region on the left and a steady-state behav-ior on the right All these features make this function a goodcandidate to check the performance of our approach Even inthis case our method yields a fitting of the curve to the datapointsThe corresponding fitting errors for the best executionand the average of 20 executions are reported in the lastcolumnof Table 3They are in good agreementwith the visualresults in the figure about the accurate fitting of data points

62 Volumetric Moisture Content This example uses a setof 16 measurements of a volumetric moisture content asdescribed in [41]This example has been traditionally used asa benchmark to test different curve approximation methods(see [41] for details) Figure 2 shows the collection of 16

data points along with their best fourth-order B-spline fittingcurve for 119899 = 7 obtained with our firefly-based method forthis data setThe figure clearly shows the good approximationof data points Note that the fitting curve does not generallypass through the data points (ie it is truly an approximatingcurve not an interpolating one) Note also that the fittingcurve captures the tendency of points verywell evenwith onlya few parameters thus encoding economically the primaryinformation of data The corresponding fitting errors for thebest execution and the average of 20 executions are againreported in the last column of Table 3

63 Side Profile Section of a Car Body This example consistsof the data fitting of a set of 243 noisy data points from the In(+119884 axis) side profile section of a clay model of a notchbackthree-box sedan car bodyThe data points were obtained by alayout machine by the Spanish car maker provider Candematyears ago Data points of the side profile section are sorted instandard order that is from forward (minus119883 axis) on the left to

6 Mathematical Problems in Engineering

Table 1 Best and average values of 119876 RMSE AIC and BIC fitting errors of the first example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 406737 119876(best) 413276 119876(best) 441259

119876(avg) 453278 119876(avg) 508751 119876(avg) 537882

RMSE(best) 011624 RMSE(best) 011717 RMSE(best) 012107

RMSE(avg) 012271 RMSE(avg) 013000 RMSE(avg) 013367

AIC(best) 5883019 AIC(best) 5931025 AIC(best) 6128230

AIC(avg) 6209119 AIC(avg) 6556633 AIC(avg) 6724231

BIC(best) 8959921 BIC(best) 9007927 BIC(best) 9205131

BIC(avg) 9286021 BIC(avg) 9633534 BIC(avg) 9801133

120572 = 04 120572 = 05 120572 = 06

119876(best) 375236 119876(best) 384178 119876(best) 433295119876(avg) 402171 119876(avg) 400119 119876(avg) 512274RMSE(best) 011165 RMSE(best) 011297 RMSE(best) 011997RMSE(avg) 011559 RMSE(avg) 011529 RMSE(avg) 013045AIC(best) 5640378 AIC(best) 5711274 AIC(best) 6073408AIC(avg) 5849038 AIC(avg) 5833645 AIC(avg) 6577405BIC(best) 8717280 BIC(best) 8788175 BIC(best) 9150309BIC(avg) 8925940 BIC(avg) 8910546 BIC(avg) 9654306

120572 = 07 120572 = 08 120572 = 09

119876(best) 631058 119876(best) 856754 119876(best) 879361

119876(avg) 697132 119876(avg) 971118 119876(avg) 1014490

RMSE(best) 014479 RMSE(best) 016871 RMSE(best) 017092

RMSE(avg) 015218 RMSE(avg) 017961 RMSE(avg) 018358

AIC(best) 7205105 AIC(best) 8125421 AIC(best) 8203816

AIC(avg) 7504831 AIC(avg) 8502566 AIC(avg) 8634083

BIC(best) 10282006 BIC(best) 11202323 BIC(best) 11280717

BIC(avg) 10581733 BIC(avg) 11579467 BIC(avg) 11710984

Figure 2 Applying the firefly algorithm to fit a series of data pointsfrom the volumetric moisture content example in [41] original datapoints (red cross symbols) and best explicit B-spline fitting curve(blue solid line)

backward (+119883 axis) on the right [58] This example has beenchosen because it includes areas of varying slope rangingfrom the strong slope at both ends (upwards on the leftdownwards on the right) to the soft slope inmiddle part witha horizontal area between pillars119860 and119862 and in the cargo boxarea and a soft upward area in the car hood Consequently it

Figure 3 Applying the firefly algorithm to fit a series of data pointsfrom a side profile section of a car body original data points (redcross symbols) and best explicit B-spline fitting curve (blue solidline)

is also a very good candidate to check the performance of ourapproach

We have applied our firefly-based fitting method by usinga fourth-order B-spline curve with 119899 = 30 The best fittingcurve alongwith the data points is displayed in Figure 3Onceagain note the excellent fitting of the curve to the data pointsThe corresponding fitting errors for the best execution andthe average of 20 executions are again reported in the lastcolumn of Table 3

64 Analysis of Variation of Parameter 120572 In this section wepresent a detailed discussion about the effects of the variationof the parameter 120572 on the performance of our method

Mathematical Problems in Engineering 7

Table 2 Best and average values of 119876 RMSE AIC and BIC fitting errors of the third example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 126931119864 minus 3 119876(best) 142578119864 minus 3 119876(best) 128343119864 minus 3

119876(avg) 148146119864 minus 3 119876(avg) 171288119864 minus 3 119876(avg) 161544119864 minus 3

RMSE(best) 228549119864 minus 3 RMSE(best) 242227119864 minus 3 RMSE(best) 229817119864 minus 3

RMSE(avg) 246911119864 minus 3 RMSE(avg) 265497119864 minus 3 RMSE(avg) 257835119864 minus 3

AIC(best) minus15046354 AIC(best) minus14763878 AIC(best) minus15019472

AIC(avg) minus14670787 AIC(avg) minus14318077 AIC(avg) minus14460399

BIC(best) minus13020379 BIC(best) minus12737902 BIC(best) minus12993496

BIC(avg) minus12644811 BIC(avg) minus12292101 BIC(avg) minus12434423

120572 = 04 120572 = 05 120572 = 06

119876(best) 133544119864 minus 3 119876(best) 124781E minus 3 119876(best) 126573119864 minus 3

119876(avg) 155296119864 minus 3 119876(avg) 144402E minus 3 119876(avg) 147353119864 minus 3

RMSE(best) 234427119864 minus 3 RMSE(best) 226606E minus 3 RMSE(best) 228227119864 minus 3

RMSE(avg) 252799119864 minus 3 RMSE(avg) 243771E minus 3 RMSE(avg) 246250119864 minus 3

AIC(best) minus14922941 AIC(best) minus15087864 AIC(best) minus15053218

AIC(avg) minus14556249 AIC(avg) minus14732995 AIC(avg) minus14683829

BIC(best) minus12896965 BIC(best) minus13061884 BIC(best) minus13027242

BIC(avg) minus12530274 BIC(avg) minus12707020 BIC(avg) minus12657853

120572 = 07 120572 = 08 120572 = 09

119876(best) 138751119864 minus 3 119876(best) 157325119864 minus 3 119876(best) 179923119864 minus 3

119876(avg) 162695119864 minus 3 119876(avg) 193681119864 minus 3 119876(avg) 247886119864 minus 3

RMSE(best) 238954119864 minus 3 RMSE(best) 254446119864 minus 3 RMSE(best) 272210119864 minus 3

RMSE(avg) 258752119864 minus 3 RMSE(avg) 282319119864 minus 3 RMSE(avg) 319391119864 minus 3

AIC(best) minus14829994 AIC(best) minus14524706 AIC(best) minus14198563

AIC(avg) minus14443147 AIC(avg) minus14019512 AIC(avg) minus13419894

BIC(best) minus12804018 BIC(best) minus12498730 BIC(best) minus12172587

BIC(avg) minus12417171 BIC(avg) minus11993536 BIC(avg) minus11393918

To this purpose we carried out several simulation trials andcomputed the fitting error for the eight error criteria used inthis work In this section we show the results obtained for thefirst and third examples of this paperResults for the secondexample are not reported here because the low number ofinput data points makes it particularly resilient to variationsof parameter 120572 As a result the fitting errors for differentvalues of120572 are very similar to each other and to those reportedin the second row of Table 2

Table 1 shows the variation of the eight fitting error crite-ria for the RC circuit example and parameter 120572 varying from01 to 09 with step-size 01 Once again we carried out 20independent simulations for each value of 120572 and obtained thebest and the average values of the 20 executions Best resultsfor each error criterion are highlighted in bold for the sake ofclarity We can see that the values 120572 = 04 and 120572 = 05 leadto the best results for the best and average fitting error valuesrespectively Figure 4 shows graphically from left to right andtop to bottom the best (in blue) and average (in red) valuesof the 119876 RMSE AIC and BIC fitting errors respectivelyFrom the figure we can conclude that both 120572 = 04 and120572 = 05 are good choices as they lead to the best resultsfor this example Note that values lower and larger than thisoptimal values yield worse fitting error results This effect isparticularly noticeable for values of 120572 approaching to 1

Table 2 and Figure 5 show the corresponding results forthe side profile section of a car body example As the readercan see the value 120572 = 05 is again a very good choicealthough 120572 = 01 and 120572 = 06 also yields good results Onceagain increasing the value of 120572 towards 1 leads to a strongincrease of the fitting errors

It is worthwhile to recall that the choice of parameters isproblem-dependent meaning that our choice of parametersmight not be adequate for other examples Therefore it isalways advisable to carry out a preliminary analysis and com-puter simulations to determine a proper parameter tuning forbetter performance as it has been done in this section

65 Computational Issues All computations in this paperhave been performed on a 29GHz Intel Core i7 processorwith 8GB of RAM The source code has been implementedby the authors in the native programming language of thepopular scientific programMatlab version 2010b Regardingthe computation times all exampleswe tested can be obtainedin less than a second (excluding rendering) Obviously theCPU time depends on several factors such as the number ofdata points and the values of the different parameters of themethod making it hard to determine how long does it takefor a given example to be reconstructed

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Research Article Firefly Algorithm for Explicit B-Spline ...

Mathematical Problems in Engineering 5

Once the parameters have been set up the firefly algo-rithm is executed for a given number of fireflies representingpotential solutions of the optimization problem Each fireflyin our method is a real-valued vector of length 119899 minus 119896 + 1initialized with uniformly distributed random numbers onthe parametric domain [0 1] and then sorted in increasingorder In this work an initial population 119899

119891 of fireflies is

considered Its value is set up to 119899119891

= 100 in all examplesof this paper We also tried larger populations of fireflies(up to 1000 individuals) but found that our results do notchange significantly Since larger populations mean largercomputation times with no remarkable improvement at allwe found this value to be appropriate in our simulations

This initial population is then subjected to the fireflymechanism and least-squares minimization yielding a col-lection of new solutions to the optimization problem (5)In our executions we compute independently all four fitnessfunctions indicated above meaning that our simulationsare to be repeated for each fitness function On the otherhand each simulation is repeated several times accordingto a parameter 120581 in order to remove the spurious effects ofrandomization typically arising in any stochastic process Inthis paper we consider a value of 120581 = 20 meaning that eachsimulation is independently carried out 80 times to obtainthe final results Each execution is performed for a givennumber of iterations 119899iter In general the firefly algorithmdoes not need a large number of iterations to reach the globaloptima This also happens in this case In all our computersimulations we found empirically that 119899iter = 10

3 is a suitablevalue and larger values for this parameter do not improveour simulation results Once the algorithm is executed forthe given number of iterations the firefly with the best (ieminimum) fitness value is selected as the best solution to theoptimization problem

6 Experimental Results

The method described in the previous section has beenapplied to several examples from different fields To keep thepaper in manageable size in this section we describe onlythree of them the response of an RC circuit a volumetricmoisture content example and the side profile section of acar body These examples have been carefully chosen for tworeasons firstly to show the diversity of situations to whichour algorithm can be applied and secondly because theycorrespond to interesting real-world engineering problemsrather than to academic examples As wewill show below ourmethod provides a very accurate solution to these problemsin terms of explicit B-spline curves We think we haveprovided enough examples to convince our readers about thewide range of applicability of our approach

61 Response of an RC Circuit The resistor-capacitor (RC)circuit is an electronic circuit comprised of resistors andcapacitors driven by a voltage or current source RC circuitsare very popular the most common being the high-passand low-pass filters The simplest version is the first-orderRC circuit where just one capacitor and one resistor are

Figure 1 Applying the firefly algorithm to fit a series of data pointsfrom an RC circuit original data points (red cross symbols) and bestexplicit B-spline fitting curve (blue solid line)

considered In this example we consider a signal of 301 datapoints of a series first-order RC circuit They are depicted asa collection of red cross symbols in Figure 1 We apply ourmethod to this sequence of data points by using a third-orderB-spline curve with 119899 = 42 The best fitting curve we obtainis displayed as a blue solid line in Figure 1 This example hasbeen primarily chosen because the underlying curve of datashows a qualitatively different behavior at both ends with ahighly oscillating region on the left and a steady-state behav-ior on the right All these features make this function a goodcandidate to check the performance of our approach Even inthis case our method yields a fitting of the curve to the datapointsThe corresponding fitting errors for the best executionand the average of 20 executions are reported in the lastcolumnof Table 3They are in good agreementwith the visualresults in the figure about the accurate fitting of data points

62 Volumetric Moisture Content This example uses a setof 16 measurements of a volumetric moisture content asdescribed in [41]This example has been traditionally used asa benchmark to test different curve approximation methods(see [41] for details) Figure 2 shows the collection of 16

data points along with their best fourth-order B-spline fittingcurve for 119899 = 7 obtained with our firefly-based method forthis data setThe figure clearly shows the good approximationof data points Note that the fitting curve does not generallypass through the data points (ie it is truly an approximatingcurve not an interpolating one) Note also that the fittingcurve captures the tendency of points verywell evenwith onlya few parameters thus encoding economically the primaryinformation of data The corresponding fitting errors for thebest execution and the average of 20 executions are againreported in the last column of Table 3

63 Side Profile Section of a Car Body This example consistsof the data fitting of a set of 243 noisy data points from the In(+119884 axis) side profile section of a clay model of a notchbackthree-box sedan car bodyThe data points were obtained by alayout machine by the Spanish car maker provider Candematyears ago Data points of the side profile section are sorted instandard order that is from forward (minus119883 axis) on the left to

6 Mathematical Problems in Engineering

Table 1 Best and average values of 119876 RMSE AIC and BIC fitting errors of the first example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 406737 119876(best) 413276 119876(best) 441259

119876(avg) 453278 119876(avg) 508751 119876(avg) 537882

RMSE(best) 011624 RMSE(best) 011717 RMSE(best) 012107

RMSE(avg) 012271 RMSE(avg) 013000 RMSE(avg) 013367

AIC(best) 5883019 AIC(best) 5931025 AIC(best) 6128230

AIC(avg) 6209119 AIC(avg) 6556633 AIC(avg) 6724231

BIC(best) 8959921 BIC(best) 9007927 BIC(best) 9205131

BIC(avg) 9286021 BIC(avg) 9633534 BIC(avg) 9801133

120572 = 04 120572 = 05 120572 = 06

119876(best) 375236 119876(best) 384178 119876(best) 433295119876(avg) 402171 119876(avg) 400119 119876(avg) 512274RMSE(best) 011165 RMSE(best) 011297 RMSE(best) 011997RMSE(avg) 011559 RMSE(avg) 011529 RMSE(avg) 013045AIC(best) 5640378 AIC(best) 5711274 AIC(best) 6073408AIC(avg) 5849038 AIC(avg) 5833645 AIC(avg) 6577405BIC(best) 8717280 BIC(best) 8788175 BIC(best) 9150309BIC(avg) 8925940 BIC(avg) 8910546 BIC(avg) 9654306

120572 = 07 120572 = 08 120572 = 09

119876(best) 631058 119876(best) 856754 119876(best) 879361

119876(avg) 697132 119876(avg) 971118 119876(avg) 1014490

RMSE(best) 014479 RMSE(best) 016871 RMSE(best) 017092

RMSE(avg) 015218 RMSE(avg) 017961 RMSE(avg) 018358

AIC(best) 7205105 AIC(best) 8125421 AIC(best) 8203816

AIC(avg) 7504831 AIC(avg) 8502566 AIC(avg) 8634083

BIC(best) 10282006 BIC(best) 11202323 BIC(best) 11280717

BIC(avg) 10581733 BIC(avg) 11579467 BIC(avg) 11710984

Figure 2 Applying the firefly algorithm to fit a series of data pointsfrom the volumetric moisture content example in [41] original datapoints (red cross symbols) and best explicit B-spline fitting curve(blue solid line)

backward (+119883 axis) on the right [58] This example has beenchosen because it includes areas of varying slope rangingfrom the strong slope at both ends (upwards on the leftdownwards on the right) to the soft slope inmiddle part witha horizontal area between pillars119860 and119862 and in the cargo boxarea and a soft upward area in the car hood Consequently it

Figure 3 Applying the firefly algorithm to fit a series of data pointsfrom a side profile section of a car body original data points (redcross symbols) and best explicit B-spline fitting curve (blue solidline)

is also a very good candidate to check the performance of ourapproach

We have applied our firefly-based fitting method by usinga fourth-order B-spline curve with 119899 = 30 The best fittingcurve alongwith the data points is displayed in Figure 3Onceagain note the excellent fitting of the curve to the data pointsThe corresponding fitting errors for the best execution andthe average of 20 executions are again reported in the lastcolumn of Table 3

64 Analysis of Variation of Parameter 120572 In this section wepresent a detailed discussion about the effects of the variationof the parameter 120572 on the performance of our method

Mathematical Problems in Engineering 7

Table 2 Best and average values of 119876 RMSE AIC and BIC fitting errors of the third example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 126931119864 minus 3 119876(best) 142578119864 minus 3 119876(best) 128343119864 minus 3

119876(avg) 148146119864 minus 3 119876(avg) 171288119864 minus 3 119876(avg) 161544119864 minus 3

RMSE(best) 228549119864 minus 3 RMSE(best) 242227119864 minus 3 RMSE(best) 229817119864 minus 3

RMSE(avg) 246911119864 minus 3 RMSE(avg) 265497119864 minus 3 RMSE(avg) 257835119864 minus 3

AIC(best) minus15046354 AIC(best) minus14763878 AIC(best) minus15019472

AIC(avg) minus14670787 AIC(avg) minus14318077 AIC(avg) minus14460399

BIC(best) minus13020379 BIC(best) minus12737902 BIC(best) minus12993496

BIC(avg) minus12644811 BIC(avg) minus12292101 BIC(avg) minus12434423

120572 = 04 120572 = 05 120572 = 06

119876(best) 133544119864 minus 3 119876(best) 124781E minus 3 119876(best) 126573119864 minus 3

119876(avg) 155296119864 minus 3 119876(avg) 144402E minus 3 119876(avg) 147353119864 minus 3

RMSE(best) 234427119864 minus 3 RMSE(best) 226606E minus 3 RMSE(best) 228227119864 minus 3

RMSE(avg) 252799119864 minus 3 RMSE(avg) 243771E minus 3 RMSE(avg) 246250119864 minus 3

AIC(best) minus14922941 AIC(best) minus15087864 AIC(best) minus15053218

AIC(avg) minus14556249 AIC(avg) minus14732995 AIC(avg) minus14683829

BIC(best) minus12896965 BIC(best) minus13061884 BIC(best) minus13027242

BIC(avg) minus12530274 BIC(avg) minus12707020 BIC(avg) minus12657853

120572 = 07 120572 = 08 120572 = 09

119876(best) 138751119864 minus 3 119876(best) 157325119864 minus 3 119876(best) 179923119864 minus 3

119876(avg) 162695119864 minus 3 119876(avg) 193681119864 minus 3 119876(avg) 247886119864 minus 3

RMSE(best) 238954119864 minus 3 RMSE(best) 254446119864 minus 3 RMSE(best) 272210119864 minus 3

RMSE(avg) 258752119864 minus 3 RMSE(avg) 282319119864 minus 3 RMSE(avg) 319391119864 minus 3

AIC(best) minus14829994 AIC(best) minus14524706 AIC(best) minus14198563

AIC(avg) minus14443147 AIC(avg) minus14019512 AIC(avg) minus13419894

BIC(best) minus12804018 BIC(best) minus12498730 BIC(best) minus12172587

BIC(avg) minus12417171 BIC(avg) minus11993536 BIC(avg) minus11393918

To this purpose we carried out several simulation trials andcomputed the fitting error for the eight error criteria used inthis work In this section we show the results obtained for thefirst and third examples of this paperResults for the secondexample are not reported here because the low number ofinput data points makes it particularly resilient to variationsof parameter 120572 As a result the fitting errors for differentvalues of120572 are very similar to each other and to those reportedin the second row of Table 2

Table 1 shows the variation of the eight fitting error crite-ria for the RC circuit example and parameter 120572 varying from01 to 09 with step-size 01 Once again we carried out 20independent simulations for each value of 120572 and obtained thebest and the average values of the 20 executions Best resultsfor each error criterion are highlighted in bold for the sake ofclarity We can see that the values 120572 = 04 and 120572 = 05 leadto the best results for the best and average fitting error valuesrespectively Figure 4 shows graphically from left to right andtop to bottom the best (in blue) and average (in red) valuesof the 119876 RMSE AIC and BIC fitting errors respectivelyFrom the figure we can conclude that both 120572 = 04 and120572 = 05 are good choices as they lead to the best resultsfor this example Note that values lower and larger than thisoptimal values yield worse fitting error results This effect isparticularly noticeable for values of 120572 approaching to 1

Table 2 and Figure 5 show the corresponding results forthe side profile section of a car body example As the readercan see the value 120572 = 05 is again a very good choicealthough 120572 = 01 and 120572 = 06 also yields good results Onceagain increasing the value of 120572 towards 1 leads to a strongincrease of the fitting errors

It is worthwhile to recall that the choice of parameters isproblem-dependent meaning that our choice of parametersmight not be adequate for other examples Therefore it isalways advisable to carry out a preliminary analysis and com-puter simulations to determine a proper parameter tuning forbetter performance as it has been done in this section

65 Computational Issues All computations in this paperhave been performed on a 29GHz Intel Core i7 processorwith 8GB of RAM The source code has been implementedby the authors in the native programming language of thepopular scientific programMatlab version 2010b Regardingthe computation times all exampleswe tested can be obtainedin less than a second (excluding rendering) Obviously theCPU time depends on several factors such as the number ofdata points and the values of the different parameters of themethod making it hard to determine how long does it takefor a given example to be reconstructed

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Research Article Firefly Algorithm for Explicit B-Spline ...

6 Mathematical Problems in Engineering

Table 1 Best and average values of 119876 RMSE AIC and BIC fitting errors of the first example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 406737 119876(best) 413276 119876(best) 441259

119876(avg) 453278 119876(avg) 508751 119876(avg) 537882

RMSE(best) 011624 RMSE(best) 011717 RMSE(best) 012107

RMSE(avg) 012271 RMSE(avg) 013000 RMSE(avg) 013367

AIC(best) 5883019 AIC(best) 5931025 AIC(best) 6128230

AIC(avg) 6209119 AIC(avg) 6556633 AIC(avg) 6724231

BIC(best) 8959921 BIC(best) 9007927 BIC(best) 9205131

BIC(avg) 9286021 BIC(avg) 9633534 BIC(avg) 9801133

120572 = 04 120572 = 05 120572 = 06

119876(best) 375236 119876(best) 384178 119876(best) 433295119876(avg) 402171 119876(avg) 400119 119876(avg) 512274RMSE(best) 011165 RMSE(best) 011297 RMSE(best) 011997RMSE(avg) 011559 RMSE(avg) 011529 RMSE(avg) 013045AIC(best) 5640378 AIC(best) 5711274 AIC(best) 6073408AIC(avg) 5849038 AIC(avg) 5833645 AIC(avg) 6577405BIC(best) 8717280 BIC(best) 8788175 BIC(best) 9150309BIC(avg) 8925940 BIC(avg) 8910546 BIC(avg) 9654306

120572 = 07 120572 = 08 120572 = 09

119876(best) 631058 119876(best) 856754 119876(best) 879361

119876(avg) 697132 119876(avg) 971118 119876(avg) 1014490

RMSE(best) 014479 RMSE(best) 016871 RMSE(best) 017092

RMSE(avg) 015218 RMSE(avg) 017961 RMSE(avg) 018358

AIC(best) 7205105 AIC(best) 8125421 AIC(best) 8203816

AIC(avg) 7504831 AIC(avg) 8502566 AIC(avg) 8634083

BIC(best) 10282006 BIC(best) 11202323 BIC(best) 11280717

BIC(avg) 10581733 BIC(avg) 11579467 BIC(avg) 11710984

Figure 2 Applying the firefly algorithm to fit a series of data pointsfrom the volumetric moisture content example in [41] original datapoints (red cross symbols) and best explicit B-spline fitting curve(blue solid line)

backward (+119883 axis) on the right [58] This example has beenchosen because it includes areas of varying slope rangingfrom the strong slope at both ends (upwards on the leftdownwards on the right) to the soft slope inmiddle part witha horizontal area between pillars119860 and119862 and in the cargo boxarea and a soft upward area in the car hood Consequently it

Figure 3 Applying the firefly algorithm to fit a series of data pointsfrom a side profile section of a car body original data points (redcross symbols) and best explicit B-spline fitting curve (blue solidline)

is also a very good candidate to check the performance of ourapproach

We have applied our firefly-based fitting method by usinga fourth-order B-spline curve with 119899 = 30 The best fittingcurve alongwith the data points is displayed in Figure 3Onceagain note the excellent fitting of the curve to the data pointsThe corresponding fitting errors for the best execution andthe average of 20 executions are again reported in the lastcolumn of Table 3

64 Analysis of Variation of Parameter 120572 In this section wepresent a detailed discussion about the effects of the variationof the parameter 120572 on the performance of our method

Mathematical Problems in Engineering 7

Table 2 Best and average values of 119876 RMSE AIC and BIC fitting errors of the third example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 126931119864 minus 3 119876(best) 142578119864 minus 3 119876(best) 128343119864 minus 3

119876(avg) 148146119864 minus 3 119876(avg) 171288119864 minus 3 119876(avg) 161544119864 minus 3

RMSE(best) 228549119864 minus 3 RMSE(best) 242227119864 minus 3 RMSE(best) 229817119864 minus 3

RMSE(avg) 246911119864 minus 3 RMSE(avg) 265497119864 minus 3 RMSE(avg) 257835119864 minus 3

AIC(best) minus15046354 AIC(best) minus14763878 AIC(best) minus15019472

AIC(avg) minus14670787 AIC(avg) minus14318077 AIC(avg) minus14460399

BIC(best) minus13020379 BIC(best) minus12737902 BIC(best) minus12993496

BIC(avg) minus12644811 BIC(avg) minus12292101 BIC(avg) minus12434423

120572 = 04 120572 = 05 120572 = 06

119876(best) 133544119864 minus 3 119876(best) 124781E minus 3 119876(best) 126573119864 minus 3

119876(avg) 155296119864 minus 3 119876(avg) 144402E minus 3 119876(avg) 147353119864 minus 3

RMSE(best) 234427119864 minus 3 RMSE(best) 226606E minus 3 RMSE(best) 228227119864 minus 3

RMSE(avg) 252799119864 minus 3 RMSE(avg) 243771E minus 3 RMSE(avg) 246250119864 minus 3

AIC(best) minus14922941 AIC(best) minus15087864 AIC(best) minus15053218

AIC(avg) minus14556249 AIC(avg) minus14732995 AIC(avg) minus14683829

BIC(best) minus12896965 BIC(best) minus13061884 BIC(best) minus13027242

BIC(avg) minus12530274 BIC(avg) minus12707020 BIC(avg) minus12657853

120572 = 07 120572 = 08 120572 = 09

119876(best) 138751119864 minus 3 119876(best) 157325119864 minus 3 119876(best) 179923119864 minus 3

119876(avg) 162695119864 minus 3 119876(avg) 193681119864 minus 3 119876(avg) 247886119864 minus 3

RMSE(best) 238954119864 minus 3 RMSE(best) 254446119864 minus 3 RMSE(best) 272210119864 minus 3

RMSE(avg) 258752119864 minus 3 RMSE(avg) 282319119864 minus 3 RMSE(avg) 319391119864 minus 3

AIC(best) minus14829994 AIC(best) minus14524706 AIC(best) minus14198563

AIC(avg) minus14443147 AIC(avg) minus14019512 AIC(avg) minus13419894

BIC(best) minus12804018 BIC(best) minus12498730 BIC(best) minus12172587

BIC(avg) minus12417171 BIC(avg) minus11993536 BIC(avg) minus11393918

To this purpose we carried out several simulation trials andcomputed the fitting error for the eight error criteria used inthis work In this section we show the results obtained for thefirst and third examples of this paperResults for the secondexample are not reported here because the low number ofinput data points makes it particularly resilient to variationsof parameter 120572 As a result the fitting errors for differentvalues of120572 are very similar to each other and to those reportedin the second row of Table 2

Table 1 shows the variation of the eight fitting error crite-ria for the RC circuit example and parameter 120572 varying from01 to 09 with step-size 01 Once again we carried out 20independent simulations for each value of 120572 and obtained thebest and the average values of the 20 executions Best resultsfor each error criterion are highlighted in bold for the sake ofclarity We can see that the values 120572 = 04 and 120572 = 05 leadto the best results for the best and average fitting error valuesrespectively Figure 4 shows graphically from left to right andtop to bottom the best (in blue) and average (in red) valuesof the 119876 RMSE AIC and BIC fitting errors respectivelyFrom the figure we can conclude that both 120572 = 04 and120572 = 05 are good choices as they lead to the best resultsfor this example Note that values lower and larger than thisoptimal values yield worse fitting error results This effect isparticularly noticeable for values of 120572 approaching to 1

Table 2 and Figure 5 show the corresponding results forthe side profile section of a car body example As the readercan see the value 120572 = 05 is again a very good choicealthough 120572 = 01 and 120572 = 06 also yields good results Onceagain increasing the value of 120572 towards 1 leads to a strongincrease of the fitting errors

It is worthwhile to recall that the choice of parameters isproblem-dependent meaning that our choice of parametersmight not be adequate for other examples Therefore it isalways advisable to carry out a preliminary analysis and com-puter simulations to determine a proper parameter tuning forbetter performance as it has been done in this section

65 Computational Issues All computations in this paperhave been performed on a 29GHz Intel Core i7 processorwith 8GB of RAM The source code has been implementedby the authors in the native programming language of thepopular scientific programMatlab version 2010b Regardingthe computation times all exampleswe tested can be obtainedin less than a second (excluding rendering) Obviously theCPU time depends on several factors such as the number ofdata points and the values of the different parameters of themethod making it hard to determine how long does it takefor a given example to be reconstructed

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Research Article Firefly Algorithm for Explicit B-Spline ...

Mathematical Problems in Engineering 7

Table 2 Best and average values of 119876 RMSE AIC and BIC fitting errors of the third example for different values of 120572 from 01 to 09 (bestresults are highlighted in bold)

120572 = 01 120572 = 02 120572 = 03

119876(best) 126931119864 minus 3 119876(best) 142578119864 minus 3 119876(best) 128343119864 minus 3

119876(avg) 148146119864 minus 3 119876(avg) 171288119864 minus 3 119876(avg) 161544119864 minus 3

RMSE(best) 228549119864 minus 3 RMSE(best) 242227119864 minus 3 RMSE(best) 229817119864 minus 3

RMSE(avg) 246911119864 minus 3 RMSE(avg) 265497119864 minus 3 RMSE(avg) 257835119864 minus 3

AIC(best) minus15046354 AIC(best) minus14763878 AIC(best) minus15019472

AIC(avg) minus14670787 AIC(avg) minus14318077 AIC(avg) minus14460399

BIC(best) minus13020379 BIC(best) minus12737902 BIC(best) minus12993496

BIC(avg) minus12644811 BIC(avg) minus12292101 BIC(avg) minus12434423

120572 = 04 120572 = 05 120572 = 06

119876(best) 133544119864 minus 3 119876(best) 124781E minus 3 119876(best) 126573119864 minus 3

119876(avg) 155296119864 minus 3 119876(avg) 144402E minus 3 119876(avg) 147353119864 minus 3

RMSE(best) 234427119864 minus 3 RMSE(best) 226606E minus 3 RMSE(best) 228227119864 minus 3

RMSE(avg) 252799119864 minus 3 RMSE(avg) 243771E minus 3 RMSE(avg) 246250119864 minus 3

AIC(best) minus14922941 AIC(best) minus15087864 AIC(best) minus15053218

AIC(avg) minus14556249 AIC(avg) minus14732995 AIC(avg) minus14683829

BIC(best) minus12896965 BIC(best) minus13061884 BIC(best) minus13027242

BIC(avg) minus12530274 BIC(avg) minus12707020 BIC(avg) minus12657853

120572 = 07 120572 = 08 120572 = 09

119876(best) 138751119864 minus 3 119876(best) 157325119864 minus 3 119876(best) 179923119864 minus 3

119876(avg) 162695119864 minus 3 119876(avg) 193681119864 minus 3 119876(avg) 247886119864 minus 3

RMSE(best) 238954119864 minus 3 RMSE(best) 254446119864 minus 3 RMSE(best) 272210119864 minus 3

RMSE(avg) 258752119864 minus 3 RMSE(avg) 282319119864 minus 3 RMSE(avg) 319391119864 minus 3

AIC(best) minus14829994 AIC(best) minus14524706 AIC(best) minus14198563

AIC(avg) minus14443147 AIC(avg) minus14019512 AIC(avg) minus13419894

BIC(best) minus12804018 BIC(best) minus12498730 BIC(best) minus12172587

BIC(avg) minus12417171 BIC(avg) minus11993536 BIC(avg) minus11393918

To this purpose we carried out several simulation trials andcomputed the fitting error for the eight error criteria used inthis work In this section we show the results obtained for thefirst and third examples of this paperResults for the secondexample are not reported here because the low number ofinput data points makes it particularly resilient to variationsof parameter 120572 As a result the fitting errors for differentvalues of120572 are very similar to each other and to those reportedin the second row of Table 2

Table 1 shows the variation of the eight fitting error crite-ria for the RC circuit example and parameter 120572 varying from01 to 09 with step-size 01 Once again we carried out 20independent simulations for each value of 120572 and obtained thebest and the average values of the 20 executions Best resultsfor each error criterion are highlighted in bold for the sake ofclarity We can see that the values 120572 = 04 and 120572 = 05 leadto the best results for the best and average fitting error valuesrespectively Figure 4 shows graphically from left to right andtop to bottom the best (in blue) and average (in red) valuesof the 119876 RMSE AIC and BIC fitting errors respectivelyFrom the figure we can conclude that both 120572 = 04 and120572 = 05 are good choices as they lead to the best resultsfor this example Note that values lower and larger than thisoptimal values yield worse fitting error results This effect isparticularly noticeable for values of 120572 approaching to 1

Table 2 and Figure 5 show the corresponding results forthe side profile section of a car body example As the readercan see the value 120572 = 05 is again a very good choicealthough 120572 = 01 and 120572 = 06 also yields good results Onceagain increasing the value of 120572 towards 1 leads to a strongincrease of the fitting errors

It is worthwhile to recall that the choice of parameters isproblem-dependent meaning that our choice of parametersmight not be adequate for other examples Therefore it isalways advisable to carry out a preliminary analysis and com-puter simulations to determine a proper parameter tuning forbetter performance as it has been done in this section

65 Computational Issues All computations in this paperhave been performed on a 29GHz Intel Core i7 processorwith 8GB of RAM The source code has been implementedby the authors in the native programming language of thepopular scientific programMatlab version 2010b Regardingthe computation times all exampleswe tested can be obtainedin less than a second (excluding rendering) Obviously theCPU time depends on several factors such as the number ofdata points and the values of the different parameters of themethod making it hard to determine how long does it takefor a given example to be reconstructed

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Research Article Firefly Algorithm for Explicit B-Spline ...

8 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 09

4

5

6

7

8

9

10Q

120572

(a)

01 02 03 04 05 06 07 08 09011

012

013

014

015

016

017

018

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09550

600

650

700

750

800

850

AIC

120572

(c)

01 02 03 04 05 06 07 08 09850

900

950

1000

1050

1100

1150

BIC

120572

(d)

Figure 4 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

7 Comparison with Other Approaches

In this section a careful comparison of ourmethodwith otheralternative methods is presented In particular we comparethe results of our method with the two most popular andwidely used methods the uniform and the de Boor methods[28 29 32] These methods differ in the way componentsof the knot vector are chosen The uniform method yieldsequally spaced internal knots as

119906119895=

119895 minus 119896 + 1

119899 minus 119896 + 2

119895 = 119896 119899 (11)

This knot vector is simple but does not reflect faithfully thedistribution of points To overcome this problem a verypopular choice is given by the de Boor method as

119906119895= (1 minus 120582

119895) 119905119894minus1

+ 120582119895119905119894 119895 = 119896 119899 (12)

where 119889 = 119873(119899 minus 119896 + 2) and 120582119895

= 119895119889 minus int(119895119889) Finallyin our method the knots are determined by the best solutionof the optimization problem described in Section 32 solvedwith the firefly-based approach described in Section 5 In thissection we have applied these three methods to the threeexamples of this paper

Table 3 summarizes our main results The three examplesanalyzed are arranged in rows with the results for each exam-ple in different columns for the compared methods uniformmethod de Boor method and our method respectively Foreach combination of example and method eight differentfitting errors are reported corresponding to the best andaverage value of the119876 RMSE AIC and BIC error criteria Asmentioned above the average value is computed from a totalof 20 executions for each simulation The best result for eacherror criterion is highlighted in bold for the sake of clarity

It is important to remark here that the error criteria usedin this paper for comparison must be carefully analyzedWhile the general rule for them is ldquothe lower and thebetterrdquo this is exclusively true to compare results obtained forexperiments carried out under the same conditions meaningthat we cannot compare the results for the three examplesglobally as they are not done under the same conditions (forinstance they have different number of data points controlpoints and even the order of the curve)Therefore we cannotconclude that the fitting curve for the third example (withthe lower global AICBIC) fits better than the other onesTheonly feasible comparison is among the different methods forthe same curve under the same simulation conditionsHavingsaid that some important conclusions can be derived fromthe numerical results reported in Table 3

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 9: Research Article Firefly Algorithm for Explicit B-Spline ...

Mathematical Problems in Engineering 9

Table 3 Best and average values of 119876 RMSE AIC and BIC fitting errors for the examples in this paper for the uniform method de Boormethod and our method (best results are highlighted in bold)

Uniform de Boor Our method

RC circuit

119876(best) 1093778001 119876(best) 1019525052 119876(best) 384178962119876(avg) 1173847555 119876(avg) 1105389142 119876(avg) 400119535

RMSE(best) 019062565 RMSE(best) 018404147 RMSE(best) 011297531RMSE(avg) 019747976 RMSE(avg) 019163478 RMSE(avg) 011529530AIC(best) 88605907876 AIC(best) 86489851523 AIC(best) 57112743013AIC(avg) 90732445861 AIC(avg) 88923754197 AIC(avg) 58336453972BIC(best) 119374923073 BIC(best) 117258866720 BIC(best) 87881758210BIC(avg) 121501461058 BIC(avg) 119692769387 BIC(avg) 89105469169

Volumetric moisture content

119876(best) 000235781 119876(best) 000012203 119876(best) 000008527119876(avg) 000476785 119876(avg) 000024751 119876(avg) 000013525

RMSE(best) 001213932 RMSE(best) 000276171 RMSE(best) 000230860RMSE(avg) 001726240 RMSE(avg) 000393317 RMSE(avg) 000290751AIC(best) minus7280034161 AIC(best) minus12017949976 AIC(best) minus12591417106AIC(avg) minus6153376508 AIC(avg) minus10886443657 AIC(avg) minus11853321768BIC(best) minus6352927694 BIC(best) minus11090843509 BIC(best) minus11664310640BIC(avg) minus5226270041 BIC(avg) minus9959337190 BIC(avg) minus10926215301

Side profile of car body

119876(best) 000647026 119876 000280562 119876(best) 000124781119876(avg) 000738719 119876(avg) 000310424 119876(avg) 000144402

RMSE(best) 000516009 RMSE(best) 000339791 RMSE(best) 000226606RMSE(avg) 000551361 RMSE(avg) 000357416 RMSE(avg) 000243771AIC(best) minus110885088744 AIC(best) minus131189939612 AIC(best) minus150878640537AIC(avg) minus107664583126 AIC(avg) minus128732145345 AIC(avg) minus147329956438BIC(best) minus90625332372 BIC(best) minus110930183241 BIC(best) minus130618841665BIC(avg) minus87404826754 BIC(avg) minus108472388973 BIC(avg) minus127070200066

(i) First and foremost they confirm the good results ofour method for the examples discussed in this paperThe fitting errors are very low in all cases meaningthat the fitting curve approximates the given data veryaccurately

(ii) On the other hand the numerical results clearly showthat our method outperforms the most popular alter-native methods in all cases The proposed approachprovides the best results for all error criteria and for allexamples both for the best and for the average values

(iii) Note also that the uniform approach is the worst inall examples as expected because of its inability toaccount for the distribution of data points of the givenproblem This problem is partially alleviated by thede Boor approach but the errors can still be furtherimproved This is what our method actually does

To summarize the numerical results from our exper-iments confirms the very accurate fitting to data pointsobtained with the proposed method as well as its superiorityover the most popular alternatives in the field This superiorperformance can be explained from a theoretical point ofview Firstly we notice that the uniform method does notreflect the real distribution of points in fact (11) shows thatthe knots depend exclusively on 119899 and 119896 and hence it isindependent of the input data Consequently it lacks theability to adapt to the shape of the underlying function of data

Regarding the de Boor method the choice of knots is basedon ensuring that the system of equations is well conditionedand has solution on optimizing the process Accordingly itfocuses on the numerical properties of the matrices involvedFrom (4) and (5) we can obtain the following vectorequation

Y = N sdotB (13)

where Y = (1199101 1199102 119910

119873)119879 and119873 = (119873

119895119896(119905119894)119895=0119899119894=1119873

)

is the matrix of basis functions sampled at data pointparameters Premultiplying at both sides by N119879 we obtain

N119879 sdot Y = N119879 sdot N sdotB (14)

where N119879 sdot N is a real symmetric matrix and thereforeHermitian so all its eigenvalues are real In fact up to achoice of an orthonormal basis it is a diagonal matrix whosediagonal entries are the eigenvalues It is also a positivesemidefinite matrix so the system has always solution It canbe proved that the knots in the de Boormethod are chosen sothat it is guaranteed that every knot span contains at least oneparametric value [59]This condition implies that theN119879 sdotN ispositive definite and well conditioned As a consequence thesystem (14) is nonsingular and can be solved by computingthe inverse of matrix N119879 sdot N As the reader can see thechoice of knots in this method is motivated by the numerical

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 10: Research Article Firefly Algorithm for Explicit B-Spline ...

10 Mathematical Problems in Engineering

01 02 03 04 05 06 07 08 0900012

00014

00016

00018

00020

00022

00024

Q

120572

(a)

01 02 03 04 05 06 07 08 09

00015

00020

00025

00030

RMSE

120572

(b)

01 02 03 04 05 06 07 08 09

AIC

minus1500

minus1450

minus1400

minus1350

120572

(c)

01 02 03 04 05 06 07 08 09

BIC

minus1300

minus1250

minus1200

minus1150

120572

(d)

Figure 5 (119897-119903 119905-119887) Variation with parameter 120572 of the best (in blue) and average (in red) 119876 RMSE AIC and BIC fitting error values for theRC circuit example

properties of matrixN and never attempted to formulate thefitting process as an optimization problem In clear contrastin our approach the problem is formulated as an optimizationproblem given by

minimize119906119897119897=119896119899

119887119895119895=0119899

119873

sum

119894=1

(119910119894minus

119899

sum

119895=0

119873119895119896

(119905119894) 119887119895)

2

(15)

In other words in our method the emphasis is on optimizingthe choice of knots rather than on the numerical propertiesof the system equation Note that our method allows con-secutive nodes to be as close as necessary they can evenbe equal A simple visual inspection of (11) and (12) showsthat this choice is not allowed in these alternative methodsHowever near knots are sometimes required for very steepupwardsdownwards areas or areas of sharp changes ofconcavity such as those in the figures of this paper Thesefacts justify why our method outperforms both the uniformand the de Boor methods for the computation of the knotvector

8 Conclusions and Future Work

This paper addresses the problem of curve fitting to noisydata points by using explicit B-spline curves Given a set ofnoisy data points the goal is to compute all parameters ofthe approximating explicit polynomial B-spline curve thatbest fits the set of data points in the least-squares sense Thisis a very difficult overdetermined continuous multimodaland multivariate nonlinear optimization problem Our pro-posed method solves it by applying the firefly algorithm apowerfulmetaheuristic nature-inspired algorithmwell suitedfor optimization The method has been applied to threeillustrative real-world engineering examples from differentfields Our experimental results show that the presentedmethod performs very well being able to fit the data pointswith a high degree of accuracy A comparison with themost popular previous approaches to this problem is alsocarried out It shows that our method outperforms previousapproaches for the examples discussed in this paper for eightdifferent fitting error criteria

Future work includes the extension of this method toother families of curves such as the parametric B-splinecurves and NURBSThe extension of these results to the caseof explicit surfaces is also part of our future work Finally we

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 11: Research Article Firefly Algorithm for Explicit B-Spline ...

Mathematical Problems in Engineering 11

are also interested to apply our methodology to other real-world problems of interest in industrial environments

Acknowledgments

This research has been kindly supported by the ComputerScience National Program of the Spanish Ministry of Econ-omy and Competitiveness Project Ref no TIN2012-30768Toho University (Funabashi Japan) and the University ofCantabria (Santander Spain) The authors are particularlygrateful to the Department of Information Science of TohoUniversity for all the facilities given to carry out this researchwork Special thanks are owed to the Editor and the anony-mous reviewers for their useful comments and suggestionsthat allowed us to improve the final version of this paper

References

[1] P Gu and X Yan ldquoNeural network approach to the reconstruc-tion of freeform surfaces for reverse engineeringrdquo ComputerAided Design vol 27 no 1 pp 59ndash64 1995

[2] W Ma and J Kruth ldquoParameterization of randomly measuredpoints for least squares fitting of B-spline curves and surfacesrdquoComputer Aided Design vol 27 no 9 pp 663ndash675 1995

[3] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 of Lectures Notes inArtificial Intelligence pp 200ndash213 2001

[4] A Iglesias and A Galvez ldquoApplying functional networks tofit data points from B-spline surfacesrdquo in Proceedings of theComputer Graphics International (CGI rsquo01) pp 329ndash332 IEEEComputer Society Press Hong Kong 2001

[5] G Echevarrıa A Iglesias andAGalvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalScience vol 2330 ofLecturesNotes inComputer Science pp 305ndash314 2002

[6] H Yang WWang and J Sun ldquoControl point adjustment for B-spline curve approximationrdquo Computer Aided Design vol 36no 7 pp 639ndash652 2004

[7] A Iglesias G Echevarrıa and A Galvez ldquoFunctional networksfor B-spline surface reconstructionrdquo Future Generation Com-puter Systems vol 20 no 8 pp 1337ndash1353 2004

[8] M Hoffmann ldquoNumerical control of Kohonen neural networkfor scattered data approximationrdquo Numerical Algorithms vol39 no 1ndash3 pp 175ndash186 2005

[9] W P Wang H Pottmann and Y Liu ldquoFitting B-spline curvesto point clouds by curvature-based squared distance minimiza-tionrdquoACMTransactions on Graphics vol 25 no 2 pp 214ndash2382006

[10] A Galvez A Cobo J Puig-Pey and A Iglesias ldquoParticle swarmoptimization for Bezier surface reconstructionrdquo in Computa-tional Science vol 5102 of Lectures Notes in Computer Sciencepp 116ndash125 2008

[11] X Zhao C Zhang B Yang and P Li ldquoAdaptive knot placementusing a GMM-based continuous optimization algorithm in B-spline curve approximationrdquo Computer Aided Design vol 43no 6 pp 598ndash604 2011

[12] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-stepgenetic-algorithm-based method for efficient polynomial B-spline surface reconstructionrdquo Information Sciences vol 182 no1 pp 56ndash76 2012

[13] A Galvez andA Iglesias ldquoParticle swarmoptimization for non-uniform rational B-spline surface reconstruction from clouds of3D data pointsrdquo Information Sciences vol 192 pp 174ndash192 2012

[14] A Galvez and A Iglesias ldquoFirefly algorithm for polynomialBezier surface parameterizationrdquo Journal of Applied Mathemat-ics Article ID 237984 9 pages 2013

[15] N M Patrikalakis and T Maekawa Shape Interrogation forComputer Aided Design and Manufacturing Springer BerlinGermany 2002

[16] H Pottmann S Leopoldseder M Hofer T Steiner and WWang ldquoIndustrial geometry recent advances and applicationsin CADrdquo Computer Aided Design vol 37 no 7 pp 751ndash7662005

[17] T C M Lee ldquoOn algorithms for ordinary least squares regres-sion spline fitting a comparative studyrdquo Journal of StatisticalComputation and Simulation vol 72 no 8 pp 647ndash663 2002

[18] H Park ldquoAn error-bounded approximate method for repre-senting planar curves in B-splinesrdquo Computer Aided GeometricDesign vol 21 no 5 pp 479ndash497 2004

[19] L Jing and L Sun ldquoFitting B-spline curves by least squares sup-port vector machinesrdquo in Proceedings of the 2nd InternationalConference onNeural Networks andBrain (ICNNB rsquo05) pp 905ndash909 IEEE Press October 2005

[20] W Li S Xu G Zhao and L P Goh ldquoAdaptive knot placementin B-spline curve approximationrdquo Computer Aided Design vol37 no 8 pp 791ndash797 2005

[21] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point clouds throughgenetic algorithms functional networks and least-squaresapproximationrdquo in Computational Science and Its Applicationsvol 4706 of Lectures Notes in Computer Science pp 680ndash6932007

[22] H Park and J-H Lee ldquoB-spline curve fitting based on adaptivecurve refinement using dominant pointsrdquo Computer AidedDesign vol 39 no 6 pp 439ndash451 2007

[23] A Iglesias and A Galvez ldquoCurve fitting with RBS functionalnetworksrdquo in Proceedings of the International Conference onConvergence Information Technology (ICCIT rsquo08) vol 1 pp299ndash306 IEEE Computer Society Press Busan Republic ofKorea 2008

[24] AGalvez andA Iglesias ldquoEfficient particle swarmoptimizationapproach for data fitting with free knot B-splinesrdquo ComputerAided Design vol 43 no 12 pp 1683ndash1692 2011

[25] A Galvez A Iglesias and A Andreina ldquoDiscrete Bezier curvefitting with artificial immune systemsrdquo Studies in Computa-tional Intelligence vol 441 pp 59ndash75 2013

[26] A Galvez and A Iglesias ldquoA new iterative mutually-coupledhybrid GA-PSO approach for curve fitting in manufacturingrdquoApplied Soft Computing vol 13 no 3 pp 1491ndash1504 2013

[27] R E Barnhill Geometry Processing for Design and Manufactur-ing Society for Industrial and Applied Mathematics (SIAM)Philadelphia Pa USA 1992

[28] J Hoschek and D Lasser Fundamentals of Computer AidedGeometric Design A K Peters Wellesley Mass USA 1993

[29] G Farin Curves and Surfaces for CAGD Morgan KaufmannSan Francisco Calif USA 5th edition 2002

[30] J R Rice The Approximation of Functions Vol 2 NonlinearandMultivariateTheory Addison-Wesley ReadingMass USA1969

[31] D L B Jupp ldquoApproximation to data by splines with free knotsrdquoSIAM Journal on Numerical Analysis vol 15 no 2 pp 328ndash3431978

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 12: Research Article Firefly Algorithm for Explicit B-Spline ...

12 Mathematical Problems in Engineering

[32] L Piegl and W Tiller The NURBS Book Springer BerlinGermany 1997

[33] T Varady R R Martin and J Cox ldquoReverse engineering ofgeometric models an introductionrdquo Computer Aided Designvol 29 no 4 pp 255ndash268 1997

[34] T Varady and R Martin ldquoReverse engineeringrdquo in Handbookof Computer Aided Geometric Design G Farin J Hoschek andM Kim Eds pp 651ndash681 Elsevier 2002

[35] C A de Boor and J R Rice Least Squares Cubic SplineApproximation I Fixed Knots CSD TR 20 Purdue UniversityLafayette Ind USA 1968

[36] C A de Boor and J R Rice Least Squares Cubic Spline Approx-imation II Variable Knots CSD TR 21 Purdue UniversityLafayette Ind USA 1968

[37] H G Burchard ldquoSplines (with optimal knots) are betterrdquoApplicable Analysis vol 3 pp 309ndash319 1974

[38] C A de BoorAPractical Guide to Splines vol 27 Springer NewYork NY USA 2001

[39] T Lyche andKMoslashrken ldquoKnot removal for parametric119861-splinecurves and surfacesrdquo Computer Aided Geometric Design vol 4no 3 pp 217ndash230 1987

[40] T Lyche and K Moslashrken ldquoA data-reduction strategy for splineswith applications to the approximation of functions and datardquoIMA Journal of Numerical Analysis vol 8 no 2 pp 185ndash2081988

[41] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford UK 1993

[42] M Alhanaty and M Bercovier ldquoCurve and surface fitting anddesign by optimal control methodsrdquo Computer Aided Designvol 33 no 2 pp 167ndash182 2001

[43] R Goldenthal and M Bercovier ldquoSpline curve approximationand design by optimal control over the knotsrdquo Computing vol72 no 1-2 pp 53ndash64 2004

[44] M J D Powell ldquoCurve fitting by splines in one variablerdquo inNumerical Approximation To Functions and Data J G HayesEd Athlone Press London UK 1970

[45] M Crampin R Guifo Guifo and G A Read ldquoLinear approxi-mation of curves with bounded curvature and a data reductionalgorithmrdquo Computer-Aided Design vol 17 no 6 pp 257ndash2611985

[46] G EHolzle ldquoKnot placement for piecewise polynomial approx-imation of curvesrdquo Computer Aided Design vol 15 no 5 pp295ndash296 1983

[47] L A Piegl andW Tiller ldquoLeast-squares B-spline curve approx-imation with arbitrary end derivativesrdquo Engineering with Com-puters vol 16 no 2 pp 109ndash116 2000

[48] E Castillo and A Iglesias ldquoSome characterizations of familiesof surfaces using functional equationsrdquo ACM Transactions onGraphics vol 16 no 3 pp 296ndash318 1997

[49] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoin Proceedings of the Shape Modeling International pp 162ndash169IEEE Computer Society Press 1999

[50] M Sarfraz and S A Raza ldquoCapturing outline of fonts usinggenetic algorithms and splinesrdquo in Proceedings of the 5thInternational Conference on Information Visualization (IV rsquo01)pp 738ndash743 IEEE Computer Society Press 2001

[51] F Yoshimoto T Harada and Y Yoshimoto ldquoData fitting witha spline using a real-coded genetic algorithmrdquo Computer AidedDesign vol 35 no 8 pp 751ndash760 2003

[52] E Ulker and A Arslan ldquoAutomatic knot adjustment using anartificial immune system for B-spline curve approximationrdquoInformation Sciences vol 179 no 10 pp 1483ndash1494 2009

[53] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Stochastic algorithms foundations and applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[54] X S Yang ldquoFirefly algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[55] H Akaike ldquoInformation theory and an extension of themaximum likelihood principlerdquo in Proceedings of the 2ndInternational Symposium on Information Theory B N Petrovand F Csaki Eds pp 267ndash281 Akademiai Kiado BudapestHungary 1973

[56] H Akaike ldquoA new look at the statistical model identificationrdquoIEEE Transactions on Automatic Control vol 19 no 6 pp 716ndash723 1974

[57] G Schwarz ldquoEstimating the dimension of a modelrdquoTheAnnalsof Statistics vol 6 no 2 pp 461ndash464 1978

[58] ldquoVolvo Car Coordinate Volvo Cars Reportrdquo 2009[59] C A de Boor Practical Guide to Splines Springer 2nd edition

2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 13: Research Article Firefly Algorithm for Explicit B-Spline ...

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of