Research Article Firefly Algorithm for Polynomial Bézier ...Journal of Applied Mathematics and a...

10
Hindawi Publishing Corporation Journal of Applied Mathematics Volume 2013, Article ID 237984, 9 pages http://dx.doi.org/10.1155/2013/237984 Research Article Firefly Algorithm for Polynomial Bézier Surface Parameterization 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 21 June 2013; Accepted 7 August 2013 Academic Editor: Xin-She Yang 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. A classical issue in many applied fields is to obtain an approximating surface to a given set of data points. is problem arises in Computer-Aided Design and Manufacturing (CAD/CAM), virtual reality, medical imaging, computer graphics, computer animation, and many others. Very oſten, the preferred approximating surface is polynomial, usually described in parametric form. is leads to the problem of determining suitable parametric values for the data points, the so-called surface parameterization. In real-world settings, data points are generally irregularly sampled and subjected to measurement noise, leading to a very difficult nonlinear continuous optimization problem, unsolvable with standard optimization techniques. is paper solves the parameterization problem for polynomial B´ ezier surfaces by applying the firefly algorithm, a powerful nature-inspired metaheuristic algorithm introduced recently to address difficult optimization problems. e method has been successfully applied to some illustrative examples of open and closed surfaces, including shapes with singularities. Our results show that the method performs very well, being able to yield the best approximating surface with a high degree of accuracy. 1. Introduction Obtaining a curve or surface that approximates a given cloud of data points is a classical problem in several scientific and technological domains such as computer-aided design and manufacturing (CAD/CAM), virtual reality, medical imaging, computer graphics, computer animation, and many others. In real-world settings, data points come from real measurements of an existing geometric entity, as it typically happens in the construction of car bodies, ship hulls, airplane fuselage, and other free-form objects [18]. is process is also applied in the shoes industry, in archeology (recon- struction of archeological assets), in medicine (computed tomography), and in many other fields. e primary goal is to convert the real data from a physical object into a fully usable digital model, a process called reverse engineering. Such digital models are usually easier and cheaper to modify than their real counterparts, leading to a significant reduction of the costs associated with the processing and manufacturing time of the real goods they represent. Furthermore, due to their inherent digital nature, they become available anytime and anywhere, a very valuable feature in our current digital- world era. Data points in reverse engineering are usually acquired through laser scanning and other digitizing methods (light digitizers, coordinate measuring machines, CT scanners, and tactile scanners) and are, therefore, subjected to measure- ment noise, irregular sampling, and other artifacts [7, 9]. Consequently, a good fitting of data is generally based on approximation schemes (where the curve/surface is expected to pass near the data points) rather than on interpolation (where the curve/surface is constrained to pass through all input data points). 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 irregularly sampled noisy data points. ere are two key components for a good approximation of data points: a proper choice of the approximating function

Transcript of Research Article Firefly Algorithm for Polynomial Bézier ...Journal of Applied Mathematics and a...

Page 1: Research Article Firefly Algorithm for Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

Hindawi Publishing CorporationJournal of Applied MathematicsVolume 2013 Article ID 237984 9 pageshttpdxdoiorg1011552013237984

Research ArticleFirefly Algorithm for Polynomial BeacutezierSurface Parameterization

Akemi Gaacutelvez1 and Andreacutes Iglesias12

1 Department of Applied Mathematics and Computational Sciences ETSI Caminos Canales y PuertosUniversity of Cantabria Avenida 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 21 June 2013 Accepted 7 August 2013

Academic Editor Xin-She Yang

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

A classical issue in many applied fields is to obtain an approximating surface to a given set of data points This problem arisesin Computer-Aided Design and Manufacturing (CADCAM) virtual reality medical imaging computer graphics computeranimation and many others Very often the preferred approximating surface is polynomial usually described in parametric formThis leads to the problem of determining suitable parametric values for the data points the so-called surface parameterizationIn real-world settings data points are generally irregularly sampled and subjected to measurement noise leading to a verydifficult nonlinear continuous optimization problem unsolvable with standard optimization techniques This paper solvesthe parameterization problem for polynomial Bezier surfaces by applying the firefly algorithm a powerful nature-inspiredmetaheuristic algorithm introduced recently to address difficult optimization problems The method has been successfully appliedto some illustrative examples of open and closed surfaces including shapes with singularities Our results show that the methodperforms very well being able to yield the best approximating surface with a high degree of accuracy

1 Introduction

Obtaining a curve or surface that approximates a given cloudof data points is a classical problem in several scientificand technological domains such as computer-aided designand manufacturing (CADCAM) virtual reality medicalimaging computer graphics computer animation and manyothers In real-world settings data points come from realmeasurements of an existing geometric entity as it typicallyhappens in the construction of car bodies ship hulls airplanefuselage and other free-form objects [1ndash8] This process isalso applied in the shoes industry in archeology (recon-struction of archeological assets) in medicine (computedtomography) and in many other fields The primary goal isto convert the real data from a physical object into a fullyusable digital model a process called reverse engineeringSuch digital models are usually easier and cheaper to modifythan their real counterparts leading to a significant reductionof the costs associatedwith the processing andmanufacturing

time of the real goods they represent Furthermore due totheir inherent digital nature they become available anytimeand anywhere a very valuable feature in our current digital-world era

Data points in reverse engineering are usually acquiredthrough laser scanning and other digitizing methods (lightdigitizers coordinate measuring machines CT scanners andtactile scanners) and are therefore subjected to measure-ment noise irregular sampling and other artifacts [7 9]Consequently a good fitting of data is generally based onapproximation schemes (where the curvesurface is expectedto pass near the data points) rather than on interpolation(where the curvesurface is constrained to pass through allinput data points) Because this is the typical case in manyreal-world industrial problems in this paper we focus on theapproximation scheme to a given set of irregularly samplednoisy data points

There are two key components for a good approximationof data points a proper choice of the approximating function

2 Journal of Applied Mathematics

and a suitable parameter tuning The usual models for datafitting in CADCAM and other industrial fields are free-formparametric entities such as Bezier B-spline and NURBS asthey have a great flexibility and can represent well any smoothshape with only a few parameters thus leading to substantialsavings in terms of computer memory and storage capacity[10ndash17]

In this paper we focus particularly on the case of polyno-mial Bezier surfaces a kind of free-form splines very popularin fields such as CADCAM and computer graphics Beziersplines were developed independently in the early 60s byPaul de Casteljau and Pierre Bezier for the CAD systemsof the French automotive companies Citroen and Renaultrespectively Mathematically they are based on the Bernsteinpolynomials (see Section 4 for details) developed as earlyas 1912 but whose applicability to engineering design wasunknownuntil the 60s ABezier curve is a linear combinationof the Bernstein polynomials and vector coefficients calledcontrol points The curve follows approximately the shape ofits control polygon (the collection of segments joining thecontrol points) and hence it reacts to the movement of itscontrol points by following a push-pull effect This powerfulfeature was fundamental for the popularization of free-formcurves and surfaces for interactive designThe generalizationof this idea to surfaces leads to the Bezier surfaces whichare linear combinations of the control points (now arrangedin a three-dimensional net) and the so-called tensor-productbasis functions (given by the products of all possible com-binations of univariate Bernstein polynomials in surfaceparameters 119906 and V resp)

Although nowadays Bezier splines have been overtakenby the B-splines (developed during the 70s and of which theBezier splines are a particular case) they played a key role inthe current development of computer design In addition totheir historical value they are still widely used today for dif-ferent purposes such as computer fonts (eg TrueType fontsPostScript) computer animation (for simple movements ofobjects in programs such as Adobe Flash) and computerdesign (Adobe Photoshop Corel Draw Adobe illustrator)The reader is referred to [18ndash20] for further details about thesubject See also [21] for a nice historical approach written bysome of the most prominent figures in the field

Best approximation methods make commonly use ofleast-squares techniques [1 8 10 13 14 22ndash28] where the goalis to obtain the relevant parameters of the polynomial approx-imating surface that fits the data points better in the least-squares sense This problem is far from being trivial becausethe surface is parametric we are confrontedwith the problemof obtaining a suitable parameterization of the data points[18 20] As remarked in [29] the selection of an appropriateparameterization is essential for a good fitting Unfortunatelyit also becomes a very hard problem specially for the cases ofirregularly sampled noisy data points In fact it is well knownthat it leads to a very difficult overdetermined continuousnonlinear optimization problem It is also multivariate as ittypically involves a large number of unknown variables for alarge number of data points a case that happens very oftenin real-world examples Finally it is usually a multimodal

problem as well because of the potential existence of several(global or local) optima of the objective function

In this context the present paper describes a newmethodto solve this challenging parameterization problem for free-form polynomial Bezier surfaces Our method applies a pow-erful nature-inspired metaheuristic algorithm called fireflyalgorithm introduced recently by Professor Yang (Cam-bridge University) to solve difficult optimization problemsThe trademark of the firefly algorithm is its search mecha-nism inspired by the social behavior of the swarms of firefliesand the phenomenon of bioluminescent communicationThepaper shows that this approach can be effectively applied toobtain an optimal approximating Bezier surface to a given setof noisy data points provided that an adequate representationof the problem and a proper selection of the parametersare carried out To check the performance of our approachit has been applied to some illustrative examples of openand closed surfaces including shapes with singularities Ourresults show that the method performs very well being ableto yield the best approximating surface with a high degree ofaccuracy

The structure of this paper is as follows in Section 2the previous work in the field is briefly reported Thenthe fundamentals and main ideas of the firefly algorithmthe method used in this paper are briefly explained inSection 3 Our proposed firefly-based method for data fittingwith Bezier surfaces is described in Section 4 The sectionbegins with the description of the problem to be solvedThenthe application of the firefly algorithm to solve it is explainedin detail Some illustrative examples of its application toopen and closed surfaces including shapes with singularitiesalong with some implementation details are reported inSection 5 The paper closes with the main conclusions of thiscontribution and our plans for future work in the field

2 Previous Work

The problem of data fitting through free-form parametricsurfaces has been the subject of research for many years[1 20 30ndash35] One of themost important problems regardingthis issue is the surface parameterization that is the com-putation of suitable parametric values for the fitting surfaceto data points In many practical situations it is advisableto obtain a parameterization as similar as possible to thearc-length parameterization The ultimate reason for this isthat a constant step on the parametric domain automaticallytranslates into a constant distance along an arc-length param-eterized curve on the surface In other words for constantparameter intervals the curve on the surface exhibits apoint spacing that is as uniform as possible Therefore thisparameterization is very convenient for surface interrogationissues such as surface intersections or measuring distanceson a surface [36 37] For instance it has been traditionallyapplied inmetrology for design andmanufacturing to collectmeasurement data from industrial parts of the designed andmanufactured products Many other industrial operationsalso require a uniform parameterization For example incomputer controlled milling operations the curve path fol-lowed by the milling machine must be parameterized such

Journal of Applied Mathematics 3

that the cutter neither speeds up nor slows down along thepath [9] This property is only guaranteed when the curvepath is parameterized with the arc-length parameterizationConsequently this has been the preferred and most classicalchoice for surface parameterization

Some recent papers have shown that the applicationof Artificial Intelligence techniques can achieve remarkableresults regarding this parameterization problem [2 5 6 38ndash40] Most of these methods rely on some kind of neuralnetworks either standard neural networks [38] KohonenrsquosSOM (Self-Organizing Maps) nets [29 39] or the BernsteinBasis Function (BBF) network [40] In the case of surfacesthe network is used exclusively to order the data and create agrid of control vertices with quadrilateral topology [39] Afterthis preprocessing step any standard surface reconstructionmethod (such as those referenced in the bibliography) has tobe applied In some other cases the neural network approachis combined with partial differential equations [29] or otherapproaches The generalization to functional networks (anextension of neural networks where the weights are replacedby functions) is also analyzed in [2 5 6 41]

Due to their good behavior for complex optimizationproblems involving ambiguous and noisy data there hasrecently been an increasing interest in applying nature-inspired optimization techniques (such asmetaheuristics andevolutionary methods) to this problem However there arestill few works reported in the literature A previous paperin [42] describes the application of genetic algorithms andfunctional networks yielding pretty good results for bothcurves and surfaces Other approaches are based on theapplication 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 are described in [4 10] forparticle swarm optimization (PSO) [3 27 28 43] for geneticalgorithms (GA) [44 45] for artificial immune systems [46]for estimation of distribution algorithms and [11] for hybridGA-PSO techniques The method used in this paper alsobelongs to this category as described in next section

3 The Firefly Algorithm

The firefly algorithm is a nature-inspired metaheuristic algo-rithm introduced in 2008 by Yang to solve optimization prob-lems [47 48] (see also [49] for a recent modified version ofthis algorithm) 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 Thereader is kindly referred to [50] for a comprehensive review ofthe firefly algorithm and other nature-inspired metaheuristicapproaches See also [51] for a gentle introduction to meta-heuristic applications in engineering optimization

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

(1) all fireflies are unisex so that one firefly will be att-racted 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

119863

sum

119896=1

(119909119894119896minus 119909119895119896)

2

(1)

where 119909119894119896

is the 119896-th component of the spatial coordinate X119894

of the 119894-th firefly and119863 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

120573 = 1205730119890minus120574119903120583

119894119895(120583 ge 1) (2)

where 119903119894119895is the distance defined as in (1) 120573

0is the initial att-

ractiveness at 119903 = 0 and 120574 is an absorption coefficient at thesource 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

) (3)

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]

The method described in previous paragraphs corre-sponds to the original version of the firefly algorithm (FFA)as originally developed by its inventor Since then manydifferent modifications and improvements on the originalversion have been developed including the discrete FFAmultiobjective FFA chaotic FFA parallel FFA elitist FFALagrangian FFA andmany others including its hybridizationwith other techniquesThe interested reader is referred to thenice paper in [52] for a comprehensive updated review andtaxonomic classification of the firefly algorithms and all itsvariants and applications

4 Journal of Applied Mathematics

4 The Proposed Method

A free-form polynomial parametric surface is defined as [1819]

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895120601119894 (119906) 120593119895 (

V) (4)

where P119894119895119894119895

are vector coefficients in R3 (usually referredto as the control points as they roughly control the shape ofthe surface) 120601

119894(119906)120593119895(V)119894119895are the tensor-product functions

obtained from two sets of basis functions (or blending func-tions) 120601

119894(119906)119894 and 120593

119895(V)119895 and (119906 V) are the surface param-

eters usually defined on a bounded rectangular domain[120572119906 120573119906] times [120572V 120573V] sub R2 Note that in this paper vectors are

denoted in boldIn this work we will focus on the particular case of free-

form polynomial Bezier surfaces In this case (4) becomes

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906)Ψ119899

119895(V) (5)

where the blending functions Ψ119889119896(120596) are the Bernstein poly-

nomials of index 119896 and degree 119889 given by

Ψ119889

119896(120596) = (

119889

119896)120596119896(1 minus 120596)

119889minus119896 (6)

where

(

119889

119896) =

119889

119896 (119889 minus 119896)

(7)

and the surface parameters 119906 V are defined on the unit square[0 1] times [0 1] Note that by convention 0 = 1

Let us suppose now that we are given a set of data pointsQ119896119897119896=1119901119897=1119902

in an 120585-dimensional space (usually 120585 = 2

or 120585 = 3) Our goal is to obtain the free-form polynomialBezier surface S(119906 V) that fits the data points better in thediscrete least-squares sense To do so we have to compute thecontrol points P

119894119895119894=0119898119895=0119899

of the approximating surfaceby minimizing the least-squares error 119864 defined as the sumof squares of the residuals

119864 =

119901

sum

119896=1

119902

sum

119897=1

(Q119896119897minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

(8)

In the case of irregularly sampled data points Q119903119903=1119877

ourmethodwill work in a similar way by simply replacing theprevious expression (8) by

119864 =

119877

sum

119903=1

(Q119903minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

(9)

The least-squares minimization of either (8) or (9) leadsto the system of equations

⟨Q⟩ = ⟨P⟩ sdot Ξ (10)

where ⟨Q⟩ corresponds to the vectorization of the set ofdata points Q

119896119897119896=1119901119897=1119902

(alternatively Q119903119903=1119877

) ⟨P⟩corresponds to the vectorization of the set of control pointsP119894119895119894=0119898119895=0119899

and Ξ is a matrix given by Ξ119894119895= Ψ119899(V119895) ⊙

Ψ119898

0(u) with Ψ119889(120596

119896) = (Ψ

119889

0(120596119896) Ψ

119889

119863(120596119896)) Ψ119889119896(Θ) =

(Ψ119889

119896(1205791) Ψ

119889

119896(120579119870)) for any Θ = (120579

1 120579

119870) and ⊙

represents the tensor product of vectors The indices in (10)vary in the ranges of values indicated throughout the section

The algebraic solution of (10) is given by P = Ξ+sdot Q

where Ξ+ denotes the Moore-Penrose pseudoinverse of ΞDue to the fact that the blending functions are nonlinearin 119906 and V the least-squares minimization of the errorsis a strongly nonlinear problem with a large number ofunknowns for large sets of data points Our strategy forsolving the problem consists of applying the firefly algorithmto determine suitable parameter values for the least-squaresminimization of functional 119864 according to either (8) or (9)However in order to do it some previous steps must becarefully carried out

(1) First of all we need an adequate representation ofthe unknowns of the problem Because of the tensor-product structure of the free-form Bezier surfacesthe fireflies in our method can be encoded as eitherstrings of two sorted real-coded vectors on the inter-val [0 1] of length 119901 and 119902 respectively for organizeddata points or as sorted real-coded vectors of length119877 for the case of irregularly sampled data pointsAll fireflies are initialized with sorted uniformlydistributed random numbers on the coordinate para-metric domain

(2) The objective function corresponds to the evaluationof the least-squares function given by either (8) or(9) Since this error function does not consider thenumber of data points we also compute the RMSE(root-mean squared error) given by

RMSE

=radicsum119901

119896=1sum119902

119897=1(Q119896119897minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

119901 sdot 119902

(11)

for (8) or alternatively by

RMSE = radicsum119877

119903=1(Q119903minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

119877

(12)

for (9) and report our results by using these errorcriteria

(3) We also need to choose the degree of the approximat-ing surface which in turn depends on the numberof control points This value is chosen accordingto the complexity of the shape of the underlyingfunction of data In general a small amount of controlpoints is needed for simple smooth shapes while

Journal of Applied Mathematics 5

a large number of control points must be selectedfor complicated twisted or irregular shapes Sincethis number is unknown a priori it is advisable tostart with a low number of control points for eachparametric coordinate and increase it until the errorreaches values below a prescribed threshold whichgenerally depends on both the underlying surface andthe application domain

(4) Regarding the firefly algorithm some control param-eters should be set up As usual when workingwith metaheuristic techniques the choice of suitablecontrol parameters is very important as it determinesthe performance of the method at large extent Itis also challenging because it is strongly problemdependent In this paper our choice is based on alarge collection of empirical results These controlparameters are

(a) the number of fireflies 119899119891 this value is set up to

119899119891= 100 fireflies in all examples of this paper

We also tried larger populations of fireflies (upto 1000 individuals) but found that our resultsdo not change significantly Since larger popu-lations mean larger computation times with noremarkable improvement at all we found thisvalue to be appropriate in our simulations

(b) the number of iterations 119899iter this number isanother parameter of the method that has to bedetermined in order to run the algorithm untilthe convergence of theminimization of the erroris achieved In general the firefly algorithmdoesnot need a large number of iterations to reachthe global optimaThis also happens in this caseIn all our simulations we found that 119899iter = 10 is asuitable value as larger values for this parameterdoes not improve our results

(c) the initial attractiveness 1205730 some theoretical

results suggest that 1205730= 1 is a good choice for

many optimization problems We also take thisvalue in this paper with very good results as itwill be discussed in next section

(d) the absorption coefficient 120574 it is set up to 120574 =05 in this paper as this value provides a quickconvergence of the algorithm to the optimalsolution

(e) the potential coefficient 120583 although any posi-tive value can be used for this parameter thelight intensity varies according to the inversesquare law Therefore we choose 120583 = 2 accord-ingly

(f) the randomization parameter 120572 This param-eter varies on the interval [0 1] and allowsus to determine the degree of randomizationintroduced in the algorithm This stochasticcomponent is necessary in order to allow newsolutions appear and avoid getting stuck in alocal minimum However larger values intro-duce large perturbations on the evolution of the

firefly and therefore delay convergence to theglobal optima Consequently it is advisable toselect values in between In this work we take120572 = 05

After the selection of those parameters the firefly algo-rithm is performed iteratively for the given number of itera-tions To remove the stochastic effects and avoid prematureconvergence 20 independent executions have been carriedout for each choice of the surface degreeThen the fireflywiththe best (ie minimum) fitness value is selected as the bestsolution to the problem

5 Experimental Results

To check the performance of our method described previ-ously it has been tested with a large collection of exampleswith excellent results in all cases To keep the paper atmanageable size in this section we consider only threeof them They have been primarily chosen to reflect thediversity of situations to which the method can be appliedThe examples correspond to both open and closed surfacesincluding shapes with singularities As the reader will seethey clearly show the good performance of our approach

Examples in this paper are shown in Figures 1 2 and 3For each example two different pictures are displayed onthe left we show the original cloud of input data pointsrepresented as small red points on the right the best approx-imating Bezier surface as obtained with our firefly-basedmethod is displayed Our input consists of sets of irregularlysampled data points (this fact can readily be seen from simplevisual inspection of the point clouds on the left) whichare also affected by measurement noise of low to mediumintensity (signal-to-noise ratio of 15 1 25 1 and 10 1 resp)In all examples no information about the data points param-eterization is available at all In fact no information about thestructure and properties of the underlying surface of data iseither assumed or known beyond the data points

Table 1 summarizes the main results of our computersimulationsThe different examples are arranged in rows Foreach example the following data are arranged in columnsnumber of data points 119864 error value (according to (8) and(9)) the maximum of the 119864 error (denoted by Max119864 andthat provides a useful upper bound for that error) and RMSEerror value (according to (11) and (12)) The error values arereported for each coordinate in all cases

First observation is that although our data points areirregularly sampled and affected by noise the method yieldsvery good fitting results in all cases The RMSE is of order10minus3 in all cases while the order of the least-squares 119864

error is within the range 10minus3ndash10minus2 and so is its maximumFurthermore these very small fitting errors are obtainedfor surfaces that are more complicated than it may seemat first sight For instance the surfaces of the first andthird examples are apparently simple flat and height-mapsurfaces However a careful observation reveals that theyoscillate several times and hence they exhibit a rich varietyof hills and valleys which have been highlighted by using anillumination model for the sake of clarity On the other hand

6 Journal of Applied Mathematics

Table 1 Number of data points and error values (for each coordinate) of the three examples discussed in this paper

Example Number of data points Error (E) Error (MaxE) Error (RMSE)

Example 1 6572

119909 73652 times 10minus2 119909 95144 times 10minus2 119909 33476 times 10minus3

119910 74303 times 10minus2 119910 98452 times 10minus2 119910 33624 times 10minus3

119911 75126 times 10minus2 119911 99673 times 10minus2 119911 33811 times 10minus3

Example 2 3378

119909 52958 times 10minus3 119909 72446 times 10minus3 119909 12521 times 10minus3

119910 51216 times 10minus3 119910 70237 times 10minus3 119910 12313 times 10minus3

119911 52909 times 10minus3 119911 74532 times 10minus3 119911 12515 times 10minus3

Example 3 7312119909 64191 times 10minus2 119909 84377 times 10minus2 119909 29629 times 10minus3

119910 63774 times 10minus2 119910 83875 times 10minus2 119910 29532 times 10minus3

119911 64746 times 10minus2 119911 93271 times 10minus2 119911 29756 times 10minus3

(a) (b)

Figure 1 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

(a) (b)

Figure 2 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

Journal of Applied Mathematics 7

(a) (b)

Figure 3 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

the second surface is a closed surface with a strong singularityat its uppermost part where many data points concentrate ina very small volumeThis is usually a very challenging featurefor free-form parametric surfaces which typically tend todistribute the control points by following a rectangulartopology Clearly such a distribution is not adequate for thissurface To our delight the proposed method identifies thissituation automatically and rearranges the control points byitself to adapt to the underlying structure of data points Inopinion of the authors this is a striking and very remarkablefeature of this method and shows its ability to capture the realbehavior of data points even under unfavorable conditions

To summarize a visual inspection of the three figuresclearly shows that ourmethod yields a very good approximat-ing surface to data points in all cases This fact is validatedby the numerical results reported in Table 1 which confirmthe good behavior of the method From these examples andmany other not reported here for the sake of brevity weconclude that the presented method performs very wellwith remarkable capability to provide a satisfactory accuratesolution to our parameterization problem with polynomialBezier surfaces

Regarding the implementation issues all computationsin this paper have been performed on a 29GHz Intel Corei7 processor with 8GB of RAM The source code has beenimplemented by the authors in the native programminglanguage of the popular scientific program Matlab version2010b for Windows 8 operating system

6 Conclusions and Future Work

This paper introduces a new method to address the surfaceparameterization problem that is to compute a suitableparameterization of a set of data points in order to constructthe free-form parametric surface approximating such datapoints better in the least-squares sense This is a challengingproblem that appears recurrently in reverse engineering forcomputer design and manufacturing and in many otherindustrial fields Very often data points in real-world settingsare irregularly sampled and subjected to measurement noise

leading to a very difficult nonlinear continuous optimizationproblem which cannot be solved by using standard opti-mization techniques To overcome this limitation this paperproposes a new method based on a powerful nature-inspiredmetaheuristic algorithm called firefly algorithm introducedrecently to solve difficult optimization problemsThemethodhas been successfully applied to solve the parameterizationproblem for polynomial Bezier surfaces The paper discussesthe main issues in this problem such as the solution repre-sentation and the selection of suitable control parameters Tocheck the performance of our approach it has been appliedto some illustrative examples of open and closed surfacesincluding shapes with singularities Our results show thatthe method performs very well being able to yield the bestapproximating surface with a high degree of accuracy

As mentioned in Section 3 the original firefly algorithmhas been improved and modified in many different waysSome of its variants have shown to be more efficient thanthe original version meaning that the presented approachcan arguably be improved with new optimized features forbetter performance An illustrative example is given by a veryrecent version called memetic self-adaptive firefly algorithm[53] whose new capabilities (the use of self-adaptationstrategies on the control parameters a new populationmodelbased on elitism and the hybridization with a local searchheuristics) improve the original firefly algorithm significantlyThe application of many of these variants to our parameter-ization problem along with a comparative analysis of theirperformance is part of our future workWe are also interestedto extend this method to other families of surfaces such asthe B-splines and NURBS where the existence of additionalparameters (such as knots and weights) can modify ourprocedure significantly The application of this method tosome interesting real-world problems in industrial settings isalso part of our plans for future work

Conflict of Interests

The authors of this paper have no current or past direct orindirect financial relationship with any commercial identity

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

2 Journal of Applied Mathematics

and a suitable parameter tuning The usual models for datafitting in CADCAM and other industrial fields are free-formparametric entities such as Bezier B-spline and NURBS asthey have a great flexibility and can represent well any smoothshape with only a few parameters thus leading to substantialsavings in terms of computer memory and storage capacity[10ndash17]

In this paper we focus particularly on the case of polyno-mial Bezier surfaces a kind of free-form splines very popularin fields such as CADCAM and computer graphics Beziersplines were developed independently in the early 60s byPaul de Casteljau and Pierre Bezier for the CAD systemsof the French automotive companies Citroen and Renaultrespectively Mathematically they are based on the Bernsteinpolynomials (see Section 4 for details) developed as earlyas 1912 but whose applicability to engineering design wasunknownuntil the 60s ABezier curve is a linear combinationof the Bernstein polynomials and vector coefficients calledcontrol points The curve follows approximately the shape ofits control polygon (the collection of segments joining thecontrol points) and hence it reacts to the movement of itscontrol points by following a push-pull effect This powerfulfeature was fundamental for the popularization of free-formcurves and surfaces for interactive designThe generalizationof this idea to surfaces leads to the Bezier surfaces whichare linear combinations of the control points (now arrangedin a three-dimensional net) and the so-called tensor-productbasis functions (given by the products of all possible com-binations of univariate Bernstein polynomials in surfaceparameters 119906 and V resp)

Although nowadays Bezier splines have been overtakenby the B-splines (developed during the 70s and of which theBezier splines are a particular case) they played a key role inthe current development of computer design In addition totheir historical value they are still widely used today for dif-ferent purposes such as computer fonts (eg TrueType fontsPostScript) computer animation (for simple movements ofobjects in programs such as Adobe Flash) and computerdesign (Adobe Photoshop Corel Draw Adobe illustrator)The reader is referred to [18ndash20] for further details about thesubject See also [21] for a nice historical approach written bysome of the most prominent figures in the field

Best approximation methods make commonly use ofleast-squares techniques [1 8 10 13 14 22ndash28] where the goalis to obtain the relevant parameters of the polynomial approx-imating surface that fits the data points better in the least-squares sense This problem is far from being trivial becausethe surface is parametric we are confrontedwith the problemof obtaining a suitable parameterization of the data points[18 20] As remarked in [29] the selection of an appropriateparameterization is essential for a good fitting Unfortunatelyit also becomes a very hard problem specially for the cases ofirregularly sampled noisy data points In fact it is well knownthat it leads to a very difficult overdetermined continuousnonlinear optimization problem It is also multivariate as ittypically involves a large number of unknown variables for alarge number of data points a case that happens very oftenin real-world examples Finally it is usually a multimodal

problem as well because of the potential existence of several(global or local) optima of the objective function

In this context the present paper describes a newmethodto solve this challenging parameterization problem for free-form polynomial Bezier surfaces Our method applies a pow-erful nature-inspired metaheuristic algorithm called fireflyalgorithm introduced recently by Professor Yang (Cam-bridge University) to solve difficult optimization problemsThe trademark of the firefly algorithm is its search mecha-nism inspired by the social behavior of the swarms of firefliesand the phenomenon of bioluminescent communicationThepaper shows that this approach can be effectively applied toobtain an optimal approximating Bezier surface to a given setof noisy data points provided that an adequate representationof the problem and a proper selection of the parametersare carried out To check the performance of our approachit has been applied to some illustrative examples of openand closed surfaces including shapes with singularities Ourresults show that the method performs very well being ableto yield the best approximating surface with a high degree ofaccuracy

The structure of this paper is as follows in Section 2the previous work in the field is briefly reported Thenthe fundamentals and main ideas of the firefly algorithmthe method used in this paper are briefly explained inSection 3 Our proposed firefly-based method for data fittingwith Bezier surfaces is described in Section 4 The sectionbegins with the description of the problem to be solvedThenthe application of the firefly algorithm to solve it is explainedin detail Some illustrative examples of its application toopen and closed surfaces including shapes with singularitiesalong with some implementation details are reported inSection 5 The paper closes with the main conclusions of thiscontribution and our plans for future work in the field

2 Previous Work

The problem of data fitting through free-form parametricsurfaces has been the subject of research for many years[1 20 30ndash35] One of themost important problems regardingthis issue is the surface parameterization that is the com-putation of suitable parametric values for the fitting surfaceto data points In many practical situations it is advisableto obtain a parameterization as similar as possible to thearc-length parameterization The ultimate reason for this isthat a constant step on the parametric domain automaticallytranslates into a constant distance along an arc-length param-eterized curve on the surface In other words for constantparameter intervals the curve on the surface exhibits apoint spacing that is as uniform as possible Therefore thisparameterization is very convenient for surface interrogationissues such as surface intersections or measuring distanceson a surface [36 37] For instance it has been traditionallyapplied inmetrology for design andmanufacturing to collectmeasurement data from industrial parts of the designed andmanufactured products Many other industrial operationsalso require a uniform parameterization For example incomputer controlled milling operations the curve path fol-lowed by the milling machine must be parameterized such

Journal of Applied Mathematics 3

that the cutter neither speeds up nor slows down along thepath [9] This property is only guaranteed when the curvepath is parameterized with the arc-length parameterizationConsequently this has been the preferred and most classicalchoice for surface parameterization

Some recent papers have shown that the applicationof Artificial Intelligence techniques can achieve remarkableresults regarding this parameterization problem [2 5 6 38ndash40] Most of these methods rely on some kind of neuralnetworks either standard neural networks [38] KohonenrsquosSOM (Self-Organizing Maps) nets [29 39] or the BernsteinBasis Function (BBF) network [40] In the case of surfacesthe network is used exclusively to order the data and create agrid of control vertices with quadrilateral topology [39] Afterthis preprocessing step any standard surface reconstructionmethod (such as those referenced in the bibliography) has tobe applied In some other cases the neural network approachis combined with partial differential equations [29] or otherapproaches The generalization to functional networks (anextension of neural networks where the weights are replacedby functions) is also analyzed in [2 5 6 41]

Due to their good behavior for complex optimizationproblems involving ambiguous and noisy data there hasrecently been an increasing interest in applying nature-inspired optimization techniques (such asmetaheuristics andevolutionary methods) to this problem However there arestill few works reported in the literature A previous paperin [42] describes the application of genetic algorithms andfunctional networks yielding pretty good results for bothcurves and surfaces Other approaches are based on theapplication 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 are described in [4 10] forparticle swarm optimization (PSO) [3 27 28 43] for geneticalgorithms (GA) [44 45] for artificial immune systems [46]for estimation of distribution algorithms and [11] for hybridGA-PSO techniques The method used in this paper alsobelongs to this category as described in next section

3 The Firefly Algorithm

The firefly algorithm is a nature-inspired metaheuristic algo-rithm introduced in 2008 by Yang to solve optimization prob-lems [47 48] (see also [49] for a recent modified version ofthis algorithm) 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 Thereader is kindly referred to [50] for a comprehensive review ofthe firefly algorithm and other nature-inspired metaheuristicapproaches See also [51] for a gentle introduction to meta-heuristic applications in engineering optimization

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

(1) all fireflies are unisex so that one firefly will be att-racted 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

119863

sum

119896=1

(119909119894119896minus 119909119895119896)

2

(1)

where 119909119894119896

is the 119896-th component of the spatial coordinate X119894

of the 119894-th firefly and119863 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

120573 = 1205730119890minus120574119903120583

119894119895(120583 ge 1) (2)

where 119903119894119895is the distance defined as in (1) 120573

0is the initial att-

ractiveness at 119903 = 0 and 120574 is an absorption coefficient at thesource 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

) (3)

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]

The method described in previous paragraphs corre-sponds to the original version of the firefly algorithm (FFA)as originally developed by its inventor Since then manydifferent modifications and improvements on the originalversion have been developed including the discrete FFAmultiobjective FFA chaotic FFA parallel FFA elitist FFALagrangian FFA andmany others including its hybridizationwith other techniquesThe interested reader is referred to thenice paper in [52] for a comprehensive updated review andtaxonomic classification of the firefly algorithms and all itsvariants and applications

4 Journal of Applied Mathematics

4 The Proposed Method

A free-form polynomial parametric surface is defined as [1819]

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895120601119894 (119906) 120593119895 (

V) (4)

where P119894119895119894119895

are vector coefficients in R3 (usually referredto as the control points as they roughly control the shape ofthe surface) 120601

119894(119906)120593119895(V)119894119895are the tensor-product functions

obtained from two sets of basis functions (or blending func-tions) 120601

119894(119906)119894 and 120593

119895(V)119895 and (119906 V) are the surface param-

eters usually defined on a bounded rectangular domain[120572119906 120573119906] times [120572V 120573V] sub R2 Note that in this paper vectors are

denoted in boldIn this work we will focus on the particular case of free-

form polynomial Bezier surfaces In this case (4) becomes

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906)Ψ119899

119895(V) (5)

where the blending functions Ψ119889119896(120596) are the Bernstein poly-

nomials of index 119896 and degree 119889 given by

Ψ119889

119896(120596) = (

119889

119896)120596119896(1 minus 120596)

119889minus119896 (6)

where

(

119889

119896) =

119889

119896 (119889 minus 119896)

(7)

and the surface parameters 119906 V are defined on the unit square[0 1] times [0 1] Note that by convention 0 = 1

Let us suppose now that we are given a set of data pointsQ119896119897119896=1119901119897=1119902

in an 120585-dimensional space (usually 120585 = 2

or 120585 = 3) Our goal is to obtain the free-form polynomialBezier surface S(119906 V) that fits the data points better in thediscrete least-squares sense To do so we have to compute thecontrol points P

119894119895119894=0119898119895=0119899

of the approximating surfaceby minimizing the least-squares error 119864 defined as the sumof squares of the residuals

119864 =

119901

sum

119896=1

119902

sum

119897=1

(Q119896119897minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

(8)

In the case of irregularly sampled data points Q119903119903=1119877

ourmethodwill work in a similar way by simply replacing theprevious expression (8) by

119864 =

119877

sum

119903=1

(Q119903minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

(9)

The least-squares minimization of either (8) or (9) leadsto the system of equations

⟨Q⟩ = ⟨P⟩ sdot Ξ (10)

where ⟨Q⟩ corresponds to the vectorization of the set ofdata points Q

119896119897119896=1119901119897=1119902

(alternatively Q119903119903=1119877

) ⟨P⟩corresponds to the vectorization of the set of control pointsP119894119895119894=0119898119895=0119899

and Ξ is a matrix given by Ξ119894119895= Ψ119899(V119895) ⊙

Ψ119898

0(u) with Ψ119889(120596

119896) = (Ψ

119889

0(120596119896) Ψ

119889

119863(120596119896)) Ψ119889119896(Θ) =

(Ψ119889

119896(1205791) Ψ

119889

119896(120579119870)) for any Θ = (120579

1 120579

119870) and ⊙

represents the tensor product of vectors The indices in (10)vary in the ranges of values indicated throughout the section

The algebraic solution of (10) is given by P = Ξ+sdot Q

where Ξ+ denotes the Moore-Penrose pseudoinverse of ΞDue to the fact that the blending functions are nonlinearin 119906 and V the least-squares minimization of the errorsis a strongly nonlinear problem with a large number ofunknowns for large sets of data points Our strategy forsolving the problem consists of applying the firefly algorithmto determine suitable parameter values for the least-squaresminimization of functional 119864 according to either (8) or (9)However in order to do it some previous steps must becarefully carried out

(1) First of all we need an adequate representation ofthe unknowns of the problem Because of the tensor-product structure of the free-form Bezier surfacesthe fireflies in our method can be encoded as eitherstrings of two sorted real-coded vectors on the inter-val [0 1] of length 119901 and 119902 respectively for organizeddata points or as sorted real-coded vectors of length119877 for the case of irregularly sampled data pointsAll fireflies are initialized with sorted uniformlydistributed random numbers on the coordinate para-metric domain

(2) The objective function corresponds to the evaluationof the least-squares function given by either (8) or(9) Since this error function does not consider thenumber of data points we also compute the RMSE(root-mean squared error) given by

RMSE

=radicsum119901

119896=1sum119902

119897=1(Q119896119897minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

119901 sdot 119902

(11)

for (8) or alternatively by

RMSE = radicsum119877

119903=1(Q119903minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

119877

(12)

for (9) and report our results by using these errorcriteria

(3) We also need to choose the degree of the approximat-ing surface which in turn depends on the numberof control points This value is chosen accordingto the complexity of the shape of the underlyingfunction of data In general a small amount of controlpoints is needed for simple smooth shapes while

Journal of Applied Mathematics 5

a large number of control points must be selectedfor complicated twisted or irregular shapes Sincethis number is unknown a priori it is advisable tostart with a low number of control points for eachparametric coordinate and increase it until the errorreaches values below a prescribed threshold whichgenerally depends on both the underlying surface andthe application domain

(4) Regarding the firefly algorithm some control param-eters should be set up As usual when workingwith metaheuristic techniques the choice of suitablecontrol parameters is very important as it determinesthe performance of the method at large extent Itis also challenging because it is strongly problemdependent In this paper our choice is based on alarge collection of empirical results These controlparameters are

(a) the number of fireflies 119899119891 this value is set up to

119899119891= 100 fireflies in all examples of this paper

We also tried larger populations of fireflies (upto 1000 individuals) but found that our resultsdo not change significantly Since larger popu-lations mean larger computation times with noremarkable improvement at all we found thisvalue to be appropriate in our simulations

(b) the number of iterations 119899iter this number isanother parameter of the method that has to bedetermined in order to run the algorithm untilthe convergence of theminimization of the erroris achieved In general the firefly algorithmdoesnot need a large number of iterations to reachthe global optimaThis also happens in this caseIn all our simulations we found that 119899iter = 10 is asuitable value as larger values for this parameterdoes not improve our results

(c) the initial attractiveness 1205730 some theoretical

results suggest that 1205730= 1 is a good choice for

many optimization problems We also take thisvalue in this paper with very good results as itwill be discussed in next section

(d) the absorption coefficient 120574 it is set up to 120574 =05 in this paper as this value provides a quickconvergence of the algorithm to the optimalsolution

(e) the potential coefficient 120583 although any posi-tive value can be used for this parameter thelight intensity varies according to the inversesquare law Therefore we choose 120583 = 2 accord-ingly

(f) the randomization parameter 120572 This param-eter varies on the interval [0 1] and allowsus to determine the degree of randomizationintroduced in the algorithm This stochasticcomponent is necessary in order to allow newsolutions appear and avoid getting stuck in alocal minimum However larger values intro-duce large perturbations on the evolution of the

firefly and therefore delay convergence to theglobal optima Consequently it is advisable toselect values in between In this work we take120572 = 05

After the selection of those parameters the firefly algo-rithm is performed iteratively for the given number of itera-tions To remove the stochastic effects and avoid prematureconvergence 20 independent executions have been carriedout for each choice of the surface degreeThen the fireflywiththe best (ie minimum) fitness value is selected as the bestsolution to the problem

5 Experimental Results

To check the performance of our method described previ-ously it has been tested with a large collection of exampleswith excellent results in all cases To keep the paper atmanageable size in this section we consider only threeof them They have been primarily chosen to reflect thediversity of situations to which the method can be appliedThe examples correspond to both open and closed surfacesincluding shapes with singularities As the reader will seethey clearly show the good performance of our approach

Examples in this paper are shown in Figures 1 2 and 3For each example two different pictures are displayed onthe left we show the original cloud of input data pointsrepresented as small red points on the right the best approx-imating Bezier surface as obtained with our firefly-basedmethod is displayed Our input consists of sets of irregularlysampled data points (this fact can readily be seen from simplevisual inspection of the point clouds on the left) whichare also affected by measurement noise of low to mediumintensity (signal-to-noise ratio of 15 1 25 1 and 10 1 resp)In all examples no information about the data points param-eterization is available at all In fact no information about thestructure and properties of the underlying surface of data iseither assumed or known beyond the data points

Table 1 summarizes the main results of our computersimulationsThe different examples are arranged in rows Foreach example the following data are arranged in columnsnumber of data points 119864 error value (according to (8) and(9)) the maximum of the 119864 error (denoted by Max119864 andthat provides a useful upper bound for that error) and RMSEerror value (according to (11) and (12)) The error values arereported for each coordinate in all cases

First observation is that although our data points areirregularly sampled and affected by noise the method yieldsvery good fitting results in all cases The RMSE is of order10minus3 in all cases while the order of the least-squares 119864

error is within the range 10minus3ndash10minus2 and so is its maximumFurthermore these very small fitting errors are obtainedfor surfaces that are more complicated than it may seemat first sight For instance the surfaces of the first andthird examples are apparently simple flat and height-mapsurfaces However a careful observation reveals that theyoscillate several times and hence they exhibit a rich varietyof hills and valleys which have been highlighted by using anillumination model for the sake of clarity On the other hand

6 Journal of Applied Mathematics

Table 1 Number of data points and error values (for each coordinate) of the three examples discussed in this paper

Example Number of data points Error (E) Error (MaxE) Error (RMSE)

Example 1 6572

119909 73652 times 10minus2 119909 95144 times 10minus2 119909 33476 times 10minus3

119910 74303 times 10minus2 119910 98452 times 10minus2 119910 33624 times 10minus3

119911 75126 times 10minus2 119911 99673 times 10minus2 119911 33811 times 10minus3

Example 2 3378

119909 52958 times 10minus3 119909 72446 times 10minus3 119909 12521 times 10minus3

119910 51216 times 10minus3 119910 70237 times 10minus3 119910 12313 times 10minus3

119911 52909 times 10minus3 119911 74532 times 10minus3 119911 12515 times 10minus3

Example 3 7312119909 64191 times 10minus2 119909 84377 times 10minus2 119909 29629 times 10minus3

119910 63774 times 10minus2 119910 83875 times 10minus2 119910 29532 times 10minus3

119911 64746 times 10minus2 119911 93271 times 10minus2 119911 29756 times 10minus3

(a) (b)

Figure 1 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

(a) (b)

Figure 2 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

Journal of Applied Mathematics 7

(a) (b)

Figure 3 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

the second surface is a closed surface with a strong singularityat its uppermost part where many data points concentrate ina very small volumeThis is usually a very challenging featurefor free-form parametric surfaces which typically tend todistribute the control points by following a rectangulartopology Clearly such a distribution is not adequate for thissurface To our delight the proposed method identifies thissituation automatically and rearranges the control points byitself to adapt to the underlying structure of data points Inopinion of the authors this is a striking and very remarkablefeature of this method and shows its ability to capture the realbehavior of data points even under unfavorable conditions

To summarize a visual inspection of the three figuresclearly shows that ourmethod yields a very good approximat-ing surface to data points in all cases This fact is validatedby the numerical results reported in Table 1 which confirmthe good behavior of the method From these examples andmany other not reported here for the sake of brevity weconclude that the presented method performs very wellwith remarkable capability to provide a satisfactory accuratesolution to our parameterization problem with polynomialBezier surfaces

Regarding the implementation issues all computationsin this paper have been performed on a 29GHz Intel Corei7 processor with 8GB of RAM The source code has beenimplemented by the authors in the native programminglanguage of the popular scientific program Matlab version2010b for Windows 8 operating system

6 Conclusions and Future Work

This paper introduces a new method to address the surfaceparameterization problem that is to compute a suitableparameterization of a set of data points in order to constructthe free-form parametric surface approximating such datapoints better in the least-squares sense This is a challengingproblem that appears recurrently in reverse engineering forcomputer design and manufacturing and in many otherindustrial fields Very often data points in real-world settingsare irregularly sampled and subjected to measurement noise

leading to a very difficult nonlinear continuous optimizationproblem which cannot be solved by using standard opti-mization techniques To overcome this limitation this paperproposes a new method based on a powerful nature-inspiredmetaheuristic algorithm called firefly algorithm introducedrecently to solve difficult optimization problemsThemethodhas been successfully applied to solve the parameterizationproblem for polynomial Bezier surfaces The paper discussesthe main issues in this problem such as the solution repre-sentation and the selection of suitable control parameters Tocheck the performance of our approach it has been appliedto some illustrative examples of open and closed surfacesincluding shapes with singularities Our results show thatthe method performs very well being able to yield the bestapproximating surface with a high degree of accuracy

As mentioned in Section 3 the original firefly algorithmhas been improved and modified in many different waysSome of its variants have shown to be more efficient thanthe original version meaning that the presented approachcan arguably be improved with new optimized features forbetter performance An illustrative example is given by a veryrecent version called memetic self-adaptive firefly algorithm[53] whose new capabilities (the use of self-adaptationstrategies on the control parameters a new populationmodelbased on elitism and the hybridization with a local searchheuristics) improve the original firefly algorithm significantlyThe application of many of these variants to our parameter-ization problem along with a comparative analysis of theirperformance is part of our future workWe are also interestedto extend this method to other families of surfaces such asthe B-splines and NURBS where the existence of additionalparameters (such as knots and weights) can modify ourprocedure significantly The application of this method tosome interesting real-world problems in industrial settings isalso part of our plans for future work

Conflict of Interests

The authors of this paper have no current or past direct orindirect financial relationship with any commercial identity

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

Journal of Applied Mathematics 3

that the cutter neither speeds up nor slows down along thepath [9] This property is only guaranteed when the curvepath is parameterized with the arc-length parameterizationConsequently this has been the preferred and most classicalchoice for surface parameterization

Some recent papers have shown that the applicationof Artificial Intelligence techniques can achieve remarkableresults regarding this parameterization problem [2 5 6 38ndash40] Most of these methods rely on some kind of neuralnetworks either standard neural networks [38] KohonenrsquosSOM (Self-Organizing Maps) nets [29 39] or the BernsteinBasis Function (BBF) network [40] In the case of surfacesthe network is used exclusively to order the data and create agrid of control vertices with quadrilateral topology [39] Afterthis preprocessing step any standard surface reconstructionmethod (such as those referenced in the bibliography) has tobe applied In some other cases the neural network approachis combined with partial differential equations [29] or otherapproaches The generalization to functional networks (anextension of neural networks where the weights are replacedby functions) is also analyzed in [2 5 6 41]

Due to their good behavior for complex optimizationproblems involving ambiguous and noisy data there hasrecently been an increasing interest in applying nature-inspired optimization techniques (such asmetaheuristics andevolutionary methods) to this problem However there arestill few works reported in the literature A previous paperin [42] describes the application of genetic algorithms andfunctional networks yielding pretty good results for bothcurves and surfaces Other approaches are based on theapplication 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 are described in [4 10] forparticle swarm optimization (PSO) [3 27 28 43] for geneticalgorithms (GA) [44 45] for artificial immune systems [46]for estimation of distribution algorithms and [11] for hybridGA-PSO techniques The method used in this paper alsobelongs to this category as described in next section

3 The Firefly Algorithm

The firefly algorithm is a nature-inspired metaheuristic algo-rithm introduced in 2008 by Yang to solve optimization prob-lems [47 48] (see also [49] for a recent modified version ofthis algorithm) 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 Thereader is kindly referred to [50] for a comprehensive review ofthe firefly algorithm and other nature-inspired metaheuristicapproaches See also [51] for a gentle introduction to meta-heuristic applications in engineering optimization

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

(1) all fireflies are unisex so that one firefly will be att-racted 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

119863

sum

119896=1

(119909119894119896minus 119909119895119896)

2

(1)

where 119909119894119896

is the 119896-th component of the spatial coordinate X119894

of the 119894-th firefly and119863 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

120573 = 1205730119890minus120574119903120583

119894119895(120583 ge 1) (2)

where 119903119894119895is the distance defined as in (1) 120573

0is the initial att-

ractiveness at 119903 = 0 and 120574 is an absorption coefficient at thesource 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

) (3)

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]

The method described in previous paragraphs corre-sponds to the original version of the firefly algorithm (FFA)as originally developed by its inventor Since then manydifferent modifications and improvements on the originalversion have been developed including the discrete FFAmultiobjective FFA chaotic FFA parallel FFA elitist FFALagrangian FFA andmany others including its hybridizationwith other techniquesThe interested reader is referred to thenice paper in [52] for a comprehensive updated review andtaxonomic classification of the firefly algorithms and all itsvariants and applications

4 Journal of Applied Mathematics

4 The Proposed Method

A free-form polynomial parametric surface is defined as [1819]

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895120601119894 (119906) 120593119895 (

V) (4)

where P119894119895119894119895

are vector coefficients in R3 (usually referredto as the control points as they roughly control the shape ofthe surface) 120601

119894(119906)120593119895(V)119894119895are the tensor-product functions

obtained from two sets of basis functions (or blending func-tions) 120601

119894(119906)119894 and 120593

119895(V)119895 and (119906 V) are the surface param-

eters usually defined on a bounded rectangular domain[120572119906 120573119906] times [120572V 120573V] sub R2 Note that in this paper vectors are

denoted in boldIn this work we will focus on the particular case of free-

form polynomial Bezier surfaces In this case (4) becomes

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906)Ψ119899

119895(V) (5)

where the blending functions Ψ119889119896(120596) are the Bernstein poly-

nomials of index 119896 and degree 119889 given by

Ψ119889

119896(120596) = (

119889

119896)120596119896(1 minus 120596)

119889minus119896 (6)

where

(

119889

119896) =

119889

119896 (119889 minus 119896)

(7)

and the surface parameters 119906 V are defined on the unit square[0 1] times [0 1] Note that by convention 0 = 1

Let us suppose now that we are given a set of data pointsQ119896119897119896=1119901119897=1119902

in an 120585-dimensional space (usually 120585 = 2

or 120585 = 3) Our goal is to obtain the free-form polynomialBezier surface S(119906 V) that fits the data points better in thediscrete least-squares sense To do so we have to compute thecontrol points P

119894119895119894=0119898119895=0119899

of the approximating surfaceby minimizing the least-squares error 119864 defined as the sumof squares of the residuals

119864 =

119901

sum

119896=1

119902

sum

119897=1

(Q119896119897minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

(8)

In the case of irregularly sampled data points Q119903119903=1119877

ourmethodwill work in a similar way by simply replacing theprevious expression (8) by

119864 =

119877

sum

119903=1

(Q119903minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

(9)

The least-squares minimization of either (8) or (9) leadsto the system of equations

⟨Q⟩ = ⟨P⟩ sdot Ξ (10)

where ⟨Q⟩ corresponds to the vectorization of the set ofdata points Q

119896119897119896=1119901119897=1119902

(alternatively Q119903119903=1119877

) ⟨P⟩corresponds to the vectorization of the set of control pointsP119894119895119894=0119898119895=0119899

and Ξ is a matrix given by Ξ119894119895= Ψ119899(V119895) ⊙

Ψ119898

0(u) with Ψ119889(120596

119896) = (Ψ

119889

0(120596119896) Ψ

119889

119863(120596119896)) Ψ119889119896(Θ) =

(Ψ119889

119896(1205791) Ψ

119889

119896(120579119870)) for any Θ = (120579

1 120579

119870) and ⊙

represents the tensor product of vectors The indices in (10)vary in the ranges of values indicated throughout the section

The algebraic solution of (10) is given by P = Ξ+sdot Q

where Ξ+ denotes the Moore-Penrose pseudoinverse of ΞDue to the fact that the blending functions are nonlinearin 119906 and V the least-squares minimization of the errorsis a strongly nonlinear problem with a large number ofunknowns for large sets of data points Our strategy forsolving the problem consists of applying the firefly algorithmto determine suitable parameter values for the least-squaresminimization of functional 119864 according to either (8) or (9)However in order to do it some previous steps must becarefully carried out

(1) First of all we need an adequate representation ofthe unknowns of the problem Because of the tensor-product structure of the free-form Bezier surfacesthe fireflies in our method can be encoded as eitherstrings of two sorted real-coded vectors on the inter-val [0 1] of length 119901 and 119902 respectively for organizeddata points or as sorted real-coded vectors of length119877 for the case of irregularly sampled data pointsAll fireflies are initialized with sorted uniformlydistributed random numbers on the coordinate para-metric domain

(2) The objective function corresponds to the evaluationof the least-squares function given by either (8) or(9) Since this error function does not consider thenumber of data points we also compute the RMSE(root-mean squared error) given by

RMSE

=radicsum119901

119896=1sum119902

119897=1(Q119896119897minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

119901 sdot 119902

(11)

for (8) or alternatively by

RMSE = radicsum119877

119903=1(Q119903minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

119877

(12)

for (9) and report our results by using these errorcriteria

(3) We also need to choose the degree of the approximat-ing surface which in turn depends on the numberof control points This value is chosen accordingto the complexity of the shape of the underlyingfunction of data In general a small amount of controlpoints is needed for simple smooth shapes while

Journal of Applied Mathematics 5

a large number of control points must be selectedfor complicated twisted or irregular shapes Sincethis number is unknown a priori it is advisable tostart with a low number of control points for eachparametric coordinate and increase it until the errorreaches values below a prescribed threshold whichgenerally depends on both the underlying surface andthe application domain

(4) Regarding the firefly algorithm some control param-eters should be set up As usual when workingwith metaheuristic techniques the choice of suitablecontrol parameters is very important as it determinesthe performance of the method at large extent Itis also challenging because it is strongly problemdependent In this paper our choice is based on alarge collection of empirical results These controlparameters are

(a) the number of fireflies 119899119891 this value is set up to

119899119891= 100 fireflies in all examples of this paper

We also tried larger populations of fireflies (upto 1000 individuals) but found that our resultsdo not change significantly Since larger popu-lations mean larger computation times with noremarkable improvement at all we found thisvalue to be appropriate in our simulations

(b) the number of iterations 119899iter this number isanother parameter of the method that has to bedetermined in order to run the algorithm untilthe convergence of theminimization of the erroris achieved In general the firefly algorithmdoesnot need a large number of iterations to reachthe global optimaThis also happens in this caseIn all our simulations we found that 119899iter = 10 is asuitable value as larger values for this parameterdoes not improve our results

(c) the initial attractiveness 1205730 some theoretical

results suggest that 1205730= 1 is a good choice for

many optimization problems We also take thisvalue in this paper with very good results as itwill be discussed in next section

(d) the absorption coefficient 120574 it is set up to 120574 =05 in this paper as this value provides a quickconvergence of the algorithm to the optimalsolution

(e) the potential coefficient 120583 although any posi-tive value can be used for this parameter thelight intensity varies according to the inversesquare law Therefore we choose 120583 = 2 accord-ingly

(f) the randomization parameter 120572 This param-eter varies on the interval [0 1] and allowsus to determine the degree of randomizationintroduced in the algorithm This stochasticcomponent is necessary in order to allow newsolutions appear and avoid getting stuck in alocal minimum However larger values intro-duce large perturbations on the evolution of the

firefly and therefore delay convergence to theglobal optima Consequently it is advisable toselect values in between In this work we take120572 = 05

After the selection of those parameters the firefly algo-rithm is performed iteratively for the given number of itera-tions To remove the stochastic effects and avoid prematureconvergence 20 independent executions have been carriedout for each choice of the surface degreeThen the fireflywiththe best (ie minimum) fitness value is selected as the bestsolution to the problem

5 Experimental Results

To check the performance of our method described previ-ously it has been tested with a large collection of exampleswith excellent results in all cases To keep the paper atmanageable size in this section we consider only threeof them They have been primarily chosen to reflect thediversity of situations to which the method can be appliedThe examples correspond to both open and closed surfacesincluding shapes with singularities As the reader will seethey clearly show the good performance of our approach

Examples in this paper are shown in Figures 1 2 and 3For each example two different pictures are displayed onthe left we show the original cloud of input data pointsrepresented as small red points on the right the best approx-imating Bezier surface as obtained with our firefly-basedmethod is displayed Our input consists of sets of irregularlysampled data points (this fact can readily be seen from simplevisual inspection of the point clouds on the left) whichare also affected by measurement noise of low to mediumintensity (signal-to-noise ratio of 15 1 25 1 and 10 1 resp)In all examples no information about the data points param-eterization is available at all In fact no information about thestructure and properties of the underlying surface of data iseither assumed or known beyond the data points

Table 1 summarizes the main results of our computersimulationsThe different examples are arranged in rows Foreach example the following data are arranged in columnsnumber of data points 119864 error value (according to (8) and(9)) the maximum of the 119864 error (denoted by Max119864 andthat provides a useful upper bound for that error) and RMSEerror value (according to (11) and (12)) The error values arereported for each coordinate in all cases

First observation is that although our data points areirregularly sampled and affected by noise the method yieldsvery good fitting results in all cases The RMSE is of order10minus3 in all cases while the order of the least-squares 119864

error is within the range 10minus3ndash10minus2 and so is its maximumFurthermore these very small fitting errors are obtainedfor surfaces that are more complicated than it may seemat first sight For instance the surfaces of the first andthird examples are apparently simple flat and height-mapsurfaces However a careful observation reveals that theyoscillate several times and hence they exhibit a rich varietyof hills and valleys which have been highlighted by using anillumination model for the sake of clarity On the other hand

6 Journal of Applied Mathematics

Table 1 Number of data points and error values (for each coordinate) of the three examples discussed in this paper

Example Number of data points Error (E) Error (MaxE) Error (RMSE)

Example 1 6572

119909 73652 times 10minus2 119909 95144 times 10minus2 119909 33476 times 10minus3

119910 74303 times 10minus2 119910 98452 times 10minus2 119910 33624 times 10minus3

119911 75126 times 10minus2 119911 99673 times 10minus2 119911 33811 times 10minus3

Example 2 3378

119909 52958 times 10minus3 119909 72446 times 10minus3 119909 12521 times 10minus3

119910 51216 times 10minus3 119910 70237 times 10minus3 119910 12313 times 10minus3

119911 52909 times 10minus3 119911 74532 times 10minus3 119911 12515 times 10minus3

Example 3 7312119909 64191 times 10minus2 119909 84377 times 10minus2 119909 29629 times 10minus3

119910 63774 times 10minus2 119910 83875 times 10minus2 119910 29532 times 10minus3

119911 64746 times 10minus2 119911 93271 times 10minus2 119911 29756 times 10minus3

(a) (b)

Figure 1 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

(a) (b)

Figure 2 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

Journal of Applied Mathematics 7

(a) (b)

Figure 3 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

the second surface is a closed surface with a strong singularityat its uppermost part where many data points concentrate ina very small volumeThis is usually a very challenging featurefor free-form parametric surfaces which typically tend todistribute the control points by following a rectangulartopology Clearly such a distribution is not adequate for thissurface To our delight the proposed method identifies thissituation automatically and rearranges the control points byitself to adapt to the underlying structure of data points Inopinion of the authors this is a striking and very remarkablefeature of this method and shows its ability to capture the realbehavior of data points even under unfavorable conditions

To summarize a visual inspection of the three figuresclearly shows that ourmethod yields a very good approximat-ing surface to data points in all cases This fact is validatedby the numerical results reported in Table 1 which confirmthe good behavior of the method From these examples andmany other not reported here for the sake of brevity weconclude that the presented method performs very wellwith remarkable capability to provide a satisfactory accuratesolution to our parameterization problem with polynomialBezier surfaces

Regarding the implementation issues all computationsin this paper have been performed on a 29GHz Intel Corei7 processor with 8GB of RAM The source code has beenimplemented by the authors in the native programminglanguage of the popular scientific program Matlab version2010b for Windows 8 operating system

6 Conclusions and Future Work

This paper introduces a new method to address the surfaceparameterization problem that is to compute a suitableparameterization of a set of data points in order to constructthe free-form parametric surface approximating such datapoints better in the least-squares sense This is a challengingproblem that appears recurrently in reverse engineering forcomputer design and manufacturing and in many otherindustrial fields Very often data points in real-world settingsare irregularly sampled and subjected to measurement noise

leading to a very difficult nonlinear continuous optimizationproblem which cannot be solved by using standard opti-mization techniques To overcome this limitation this paperproposes a new method based on a powerful nature-inspiredmetaheuristic algorithm called firefly algorithm introducedrecently to solve difficult optimization problemsThemethodhas been successfully applied to solve the parameterizationproblem for polynomial Bezier surfaces The paper discussesthe main issues in this problem such as the solution repre-sentation and the selection of suitable control parameters Tocheck the performance of our approach it has been appliedto some illustrative examples of open and closed surfacesincluding shapes with singularities Our results show thatthe method performs very well being able to yield the bestapproximating surface with a high degree of accuracy

As mentioned in Section 3 the original firefly algorithmhas been improved and modified in many different waysSome of its variants have shown to be more efficient thanthe original version meaning that the presented approachcan arguably be improved with new optimized features forbetter performance An illustrative example is given by a veryrecent version called memetic self-adaptive firefly algorithm[53] whose new capabilities (the use of self-adaptationstrategies on the control parameters a new populationmodelbased on elitism and the hybridization with a local searchheuristics) improve the original firefly algorithm significantlyThe application of many of these variants to our parameter-ization problem along with a comparative analysis of theirperformance is part of our future workWe are also interestedto extend this method to other families of surfaces such asthe B-splines and NURBS where the existence of additionalparameters (such as knots and weights) can modify ourprocedure significantly The application of this method tosome interesting real-world problems in industrial settings isalso part of our plans for future work

Conflict of Interests

The authors of this paper have no current or past direct orindirect financial relationship with any commercial identity

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

4 Journal of Applied Mathematics

4 The Proposed Method

A free-form polynomial parametric surface is defined as [1819]

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895120601119894 (119906) 120593119895 (

V) (4)

where P119894119895119894119895

are vector coefficients in R3 (usually referredto as the control points as they roughly control the shape ofthe surface) 120601

119894(119906)120593119895(V)119894119895are the tensor-product functions

obtained from two sets of basis functions (or blending func-tions) 120601

119894(119906)119894 and 120593

119895(V)119895 and (119906 V) are the surface param-

eters usually defined on a bounded rectangular domain[120572119906 120573119906] times [120572V 120573V] sub R2 Note that in this paper vectors are

denoted in boldIn this work we will focus on the particular case of free-

form polynomial Bezier surfaces In this case (4) becomes

S (119906 V) =119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906)Ψ119899

119895(V) (5)

where the blending functions Ψ119889119896(120596) are the Bernstein poly-

nomials of index 119896 and degree 119889 given by

Ψ119889

119896(120596) = (

119889

119896)120596119896(1 minus 120596)

119889minus119896 (6)

where

(

119889

119896) =

119889

119896 (119889 minus 119896)

(7)

and the surface parameters 119906 V are defined on the unit square[0 1] times [0 1] Note that by convention 0 = 1

Let us suppose now that we are given a set of data pointsQ119896119897119896=1119901119897=1119902

in an 120585-dimensional space (usually 120585 = 2

or 120585 = 3) Our goal is to obtain the free-form polynomialBezier surface S(119906 V) that fits the data points better in thediscrete least-squares sense To do so we have to compute thecontrol points P

119894119895119894=0119898119895=0119899

of the approximating surfaceby minimizing the least-squares error 119864 defined as the sumof squares of the residuals

119864 =

119901

sum

119896=1

119902

sum

119897=1

(Q119896119897minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

(8)

In the case of irregularly sampled data points Q119903119903=1119877

ourmethodwill work in a similar way by simply replacing theprevious expression (8) by

119864 =

119877

sum

119903=1

(Q119903minus

119898

sum

119894=0

119899

sum

119895=0

P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

(9)

The least-squares minimization of either (8) or (9) leadsto the system of equations

⟨Q⟩ = ⟨P⟩ sdot Ξ (10)

where ⟨Q⟩ corresponds to the vectorization of the set ofdata points Q

119896119897119896=1119901119897=1119902

(alternatively Q119903119903=1119877

) ⟨P⟩corresponds to the vectorization of the set of control pointsP119894119895119894=0119898119895=0119899

and Ξ is a matrix given by Ξ119894119895= Ψ119899(V119895) ⊙

Ψ119898

0(u) with Ψ119889(120596

119896) = (Ψ

119889

0(120596119896) Ψ

119889

119863(120596119896)) Ψ119889119896(Θ) =

(Ψ119889

119896(1205791) Ψ

119889

119896(120579119870)) for any Θ = (120579

1 120579

119870) and ⊙

represents the tensor product of vectors The indices in (10)vary in the ranges of values indicated throughout the section

The algebraic solution of (10) is given by P = Ξ+sdot Q

where Ξ+ denotes the Moore-Penrose pseudoinverse of ΞDue to the fact that the blending functions are nonlinearin 119906 and V the least-squares minimization of the errorsis a strongly nonlinear problem with a large number ofunknowns for large sets of data points Our strategy forsolving the problem consists of applying the firefly algorithmto determine suitable parameter values for the least-squaresminimization of functional 119864 according to either (8) or (9)However in order to do it some previous steps must becarefully carried out

(1) First of all we need an adequate representation ofthe unknowns of the problem Because of the tensor-product structure of the free-form Bezier surfacesthe fireflies in our method can be encoded as eitherstrings of two sorted real-coded vectors on the inter-val [0 1] of length 119901 and 119902 respectively for organizeddata points or as sorted real-coded vectors of length119877 for the case of irregularly sampled data pointsAll fireflies are initialized with sorted uniformlydistributed random numbers on the coordinate para-metric domain

(2) The objective function corresponds to the evaluationof the least-squares function given by either (8) or(9) Since this error function does not consider thenumber of data points we also compute the RMSE(root-mean squared error) given by

RMSE

=radicsum119901

119896=1sum119902

119897=1(Q119896119897minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119896) Ψ119899

119895(V119897))

2

119901 sdot 119902

(11)

for (8) or alternatively by

RMSE = radicsum119877

119903=1(Q119903minus sum119898

119894=0sum119899

119895=0P119894119895Ψ119898

119894(119906119903) Ψ119899

119895(V119903))

2

119877

(12)

for (9) and report our results by using these errorcriteria

(3) We also need to choose the degree of the approximat-ing surface which in turn depends on the numberof control points This value is chosen accordingto the complexity of the shape of the underlyingfunction of data In general a small amount of controlpoints is needed for simple smooth shapes while

Journal of Applied Mathematics 5

a large number of control points must be selectedfor complicated twisted or irregular shapes Sincethis number is unknown a priori it is advisable tostart with a low number of control points for eachparametric coordinate and increase it until the errorreaches values below a prescribed threshold whichgenerally depends on both the underlying surface andthe application domain

(4) Regarding the firefly algorithm some control param-eters should be set up As usual when workingwith metaheuristic techniques the choice of suitablecontrol parameters is very important as it determinesthe performance of the method at large extent Itis also challenging because it is strongly problemdependent In this paper our choice is based on alarge collection of empirical results These controlparameters are

(a) the number of fireflies 119899119891 this value is set up to

119899119891= 100 fireflies in all examples of this paper

We also tried larger populations of fireflies (upto 1000 individuals) but found that our resultsdo not change significantly Since larger popu-lations mean larger computation times with noremarkable improvement at all we found thisvalue to be appropriate in our simulations

(b) the number of iterations 119899iter this number isanother parameter of the method that has to bedetermined in order to run the algorithm untilthe convergence of theminimization of the erroris achieved In general the firefly algorithmdoesnot need a large number of iterations to reachthe global optimaThis also happens in this caseIn all our simulations we found that 119899iter = 10 is asuitable value as larger values for this parameterdoes not improve our results

(c) the initial attractiveness 1205730 some theoretical

results suggest that 1205730= 1 is a good choice for

many optimization problems We also take thisvalue in this paper with very good results as itwill be discussed in next section

(d) the absorption coefficient 120574 it is set up to 120574 =05 in this paper as this value provides a quickconvergence of the algorithm to the optimalsolution

(e) the potential coefficient 120583 although any posi-tive value can be used for this parameter thelight intensity varies according to the inversesquare law Therefore we choose 120583 = 2 accord-ingly

(f) the randomization parameter 120572 This param-eter varies on the interval [0 1] and allowsus to determine the degree of randomizationintroduced in the algorithm This stochasticcomponent is necessary in order to allow newsolutions appear and avoid getting stuck in alocal minimum However larger values intro-duce large perturbations on the evolution of the

firefly and therefore delay convergence to theglobal optima Consequently it is advisable toselect values in between In this work we take120572 = 05

After the selection of those parameters the firefly algo-rithm is performed iteratively for the given number of itera-tions To remove the stochastic effects and avoid prematureconvergence 20 independent executions have been carriedout for each choice of the surface degreeThen the fireflywiththe best (ie minimum) fitness value is selected as the bestsolution to the problem

5 Experimental Results

To check the performance of our method described previ-ously it has been tested with a large collection of exampleswith excellent results in all cases To keep the paper atmanageable size in this section we consider only threeof them They have been primarily chosen to reflect thediversity of situations to which the method can be appliedThe examples correspond to both open and closed surfacesincluding shapes with singularities As the reader will seethey clearly show the good performance of our approach

Examples in this paper are shown in Figures 1 2 and 3For each example two different pictures are displayed onthe left we show the original cloud of input data pointsrepresented as small red points on the right the best approx-imating Bezier surface as obtained with our firefly-basedmethod is displayed Our input consists of sets of irregularlysampled data points (this fact can readily be seen from simplevisual inspection of the point clouds on the left) whichare also affected by measurement noise of low to mediumintensity (signal-to-noise ratio of 15 1 25 1 and 10 1 resp)In all examples no information about the data points param-eterization is available at all In fact no information about thestructure and properties of the underlying surface of data iseither assumed or known beyond the data points

Table 1 summarizes the main results of our computersimulationsThe different examples are arranged in rows Foreach example the following data are arranged in columnsnumber of data points 119864 error value (according to (8) and(9)) the maximum of the 119864 error (denoted by Max119864 andthat provides a useful upper bound for that error) and RMSEerror value (according to (11) and (12)) The error values arereported for each coordinate in all cases

First observation is that although our data points areirregularly sampled and affected by noise the method yieldsvery good fitting results in all cases The RMSE is of order10minus3 in all cases while the order of the least-squares 119864

error is within the range 10minus3ndash10minus2 and so is its maximumFurthermore these very small fitting errors are obtainedfor surfaces that are more complicated than it may seemat first sight For instance the surfaces of the first andthird examples are apparently simple flat and height-mapsurfaces However a careful observation reveals that theyoscillate several times and hence they exhibit a rich varietyof hills and valleys which have been highlighted by using anillumination model for the sake of clarity On the other hand

6 Journal of Applied Mathematics

Table 1 Number of data points and error values (for each coordinate) of the three examples discussed in this paper

Example Number of data points Error (E) Error (MaxE) Error (RMSE)

Example 1 6572

119909 73652 times 10minus2 119909 95144 times 10minus2 119909 33476 times 10minus3

119910 74303 times 10minus2 119910 98452 times 10minus2 119910 33624 times 10minus3

119911 75126 times 10minus2 119911 99673 times 10minus2 119911 33811 times 10minus3

Example 2 3378

119909 52958 times 10minus3 119909 72446 times 10minus3 119909 12521 times 10minus3

119910 51216 times 10minus3 119910 70237 times 10minus3 119910 12313 times 10minus3

119911 52909 times 10minus3 119911 74532 times 10minus3 119911 12515 times 10minus3

Example 3 7312119909 64191 times 10minus2 119909 84377 times 10minus2 119909 29629 times 10minus3

119910 63774 times 10minus2 119910 83875 times 10minus2 119910 29532 times 10minus3

119911 64746 times 10minus2 119911 93271 times 10minus2 119911 29756 times 10minus3

(a) (b)

Figure 1 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

(a) (b)

Figure 2 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

Journal of Applied Mathematics 7

(a) (b)

Figure 3 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

the second surface is a closed surface with a strong singularityat its uppermost part where many data points concentrate ina very small volumeThis is usually a very challenging featurefor free-form parametric surfaces which typically tend todistribute the control points by following a rectangulartopology Clearly such a distribution is not adequate for thissurface To our delight the proposed method identifies thissituation automatically and rearranges the control points byitself to adapt to the underlying structure of data points Inopinion of the authors this is a striking and very remarkablefeature of this method and shows its ability to capture the realbehavior of data points even under unfavorable conditions

To summarize a visual inspection of the three figuresclearly shows that ourmethod yields a very good approximat-ing surface to data points in all cases This fact is validatedby the numerical results reported in Table 1 which confirmthe good behavior of the method From these examples andmany other not reported here for the sake of brevity weconclude that the presented method performs very wellwith remarkable capability to provide a satisfactory accuratesolution to our parameterization problem with polynomialBezier surfaces

Regarding the implementation issues all computationsin this paper have been performed on a 29GHz Intel Corei7 processor with 8GB of RAM The source code has beenimplemented by the authors in the native programminglanguage of the popular scientific program Matlab version2010b for Windows 8 operating system

6 Conclusions and Future Work

This paper introduces a new method to address the surfaceparameterization problem that is to compute a suitableparameterization of a set of data points in order to constructthe free-form parametric surface approximating such datapoints better in the least-squares sense This is a challengingproblem that appears recurrently in reverse engineering forcomputer design and manufacturing and in many otherindustrial fields Very often data points in real-world settingsare irregularly sampled and subjected to measurement noise

leading to a very difficult nonlinear continuous optimizationproblem which cannot be solved by using standard opti-mization techniques To overcome this limitation this paperproposes a new method based on a powerful nature-inspiredmetaheuristic algorithm called firefly algorithm introducedrecently to solve difficult optimization problemsThemethodhas been successfully applied to solve the parameterizationproblem for polynomial Bezier surfaces The paper discussesthe main issues in this problem such as the solution repre-sentation and the selection of suitable control parameters Tocheck the performance of our approach it has been appliedto some illustrative examples of open and closed surfacesincluding shapes with singularities Our results show thatthe method performs very well being able to yield the bestapproximating surface with a high degree of accuracy

As mentioned in Section 3 the original firefly algorithmhas been improved and modified in many different waysSome of its variants have shown to be more efficient thanthe original version meaning that the presented approachcan arguably be improved with new optimized features forbetter performance An illustrative example is given by a veryrecent version called memetic self-adaptive firefly algorithm[53] whose new capabilities (the use of self-adaptationstrategies on the control parameters a new populationmodelbased on elitism and the hybridization with a local searchheuristics) improve the original firefly algorithm significantlyThe application of many of these variants to our parameter-ization problem along with a comparative analysis of theirperformance is part of our future workWe are also interestedto extend this method to other families of surfaces such asthe B-splines and NURBS where the existence of additionalparameters (such as knots and weights) can modify ourprocedure significantly The application of this method tosome interesting real-world problems in industrial settings isalso part of our plans for future work

Conflict of Interests

The authors of this paper have no current or past direct orindirect financial relationship with any commercial identity

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

Journal of Applied Mathematics 5

a large number of control points must be selectedfor complicated twisted or irregular shapes Sincethis number is unknown a priori it is advisable tostart with a low number of control points for eachparametric coordinate and increase it until the errorreaches values below a prescribed threshold whichgenerally depends on both the underlying surface andthe application domain

(4) Regarding the firefly algorithm some control param-eters should be set up As usual when workingwith metaheuristic techniques the choice of suitablecontrol parameters is very important as it determinesthe performance of the method at large extent Itis also challenging because it is strongly problemdependent In this paper our choice is based on alarge collection of empirical results These controlparameters are

(a) the number of fireflies 119899119891 this value is set up to

119899119891= 100 fireflies in all examples of this paper

We also tried larger populations of fireflies (upto 1000 individuals) but found that our resultsdo not change significantly Since larger popu-lations mean larger computation times with noremarkable improvement at all we found thisvalue to be appropriate in our simulations

(b) the number of iterations 119899iter this number isanother parameter of the method that has to bedetermined in order to run the algorithm untilthe convergence of theminimization of the erroris achieved In general the firefly algorithmdoesnot need a large number of iterations to reachthe global optimaThis also happens in this caseIn all our simulations we found that 119899iter = 10 is asuitable value as larger values for this parameterdoes not improve our results

(c) the initial attractiveness 1205730 some theoretical

results suggest that 1205730= 1 is a good choice for

many optimization problems We also take thisvalue in this paper with very good results as itwill be discussed in next section

(d) the absorption coefficient 120574 it is set up to 120574 =05 in this paper as this value provides a quickconvergence of the algorithm to the optimalsolution

(e) the potential coefficient 120583 although any posi-tive value can be used for this parameter thelight intensity varies according to the inversesquare law Therefore we choose 120583 = 2 accord-ingly

(f) the randomization parameter 120572 This param-eter varies on the interval [0 1] and allowsus to determine the degree of randomizationintroduced in the algorithm This stochasticcomponent is necessary in order to allow newsolutions appear and avoid getting stuck in alocal minimum However larger values intro-duce large perturbations on the evolution of the

firefly and therefore delay convergence to theglobal optima Consequently it is advisable toselect values in between In this work we take120572 = 05

After the selection of those parameters the firefly algo-rithm is performed iteratively for the given number of itera-tions To remove the stochastic effects and avoid prematureconvergence 20 independent executions have been carriedout for each choice of the surface degreeThen the fireflywiththe best (ie minimum) fitness value is selected as the bestsolution to the problem

5 Experimental Results

To check the performance of our method described previ-ously it has been tested with a large collection of exampleswith excellent results in all cases To keep the paper atmanageable size in this section we consider only threeof them They have been primarily chosen to reflect thediversity of situations to which the method can be appliedThe examples correspond to both open and closed surfacesincluding shapes with singularities As the reader will seethey clearly show the good performance of our approach

Examples in this paper are shown in Figures 1 2 and 3For each example two different pictures are displayed onthe left we show the original cloud of input data pointsrepresented as small red points on the right the best approx-imating Bezier surface as obtained with our firefly-basedmethod is displayed Our input consists of sets of irregularlysampled data points (this fact can readily be seen from simplevisual inspection of the point clouds on the left) whichare also affected by measurement noise of low to mediumintensity (signal-to-noise ratio of 15 1 25 1 and 10 1 resp)In all examples no information about the data points param-eterization is available at all In fact no information about thestructure and properties of the underlying surface of data iseither assumed or known beyond the data points

Table 1 summarizes the main results of our computersimulationsThe different examples are arranged in rows Foreach example the following data are arranged in columnsnumber of data points 119864 error value (according to (8) and(9)) the maximum of the 119864 error (denoted by Max119864 andthat provides a useful upper bound for that error) and RMSEerror value (according to (11) and (12)) The error values arereported for each coordinate in all cases

First observation is that although our data points areirregularly sampled and affected by noise the method yieldsvery good fitting results in all cases The RMSE is of order10minus3 in all cases while the order of the least-squares 119864

error is within the range 10minus3ndash10minus2 and so is its maximumFurthermore these very small fitting errors are obtainedfor surfaces that are more complicated than it may seemat first sight For instance the surfaces of the first andthird examples are apparently simple flat and height-mapsurfaces However a careful observation reveals that theyoscillate several times and hence they exhibit a rich varietyof hills and valleys which have been highlighted by using anillumination model for the sake of clarity On the other hand

6 Journal of Applied Mathematics

Table 1 Number of data points and error values (for each coordinate) of the three examples discussed in this paper

Example Number of data points Error (E) Error (MaxE) Error (RMSE)

Example 1 6572

119909 73652 times 10minus2 119909 95144 times 10minus2 119909 33476 times 10minus3

119910 74303 times 10minus2 119910 98452 times 10minus2 119910 33624 times 10minus3

119911 75126 times 10minus2 119911 99673 times 10minus2 119911 33811 times 10minus3

Example 2 3378

119909 52958 times 10minus3 119909 72446 times 10minus3 119909 12521 times 10minus3

119910 51216 times 10minus3 119910 70237 times 10minus3 119910 12313 times 10minus3

119911 52909 times 10minus3 119911 74532 times 10minus3 119911 12515 times 10minus3

Example 3 7312119909 64191 times 10minus2 119909 84377 times 10minus2 119909 29629 times 10minus3

119910 63774 times 10minus2 119910 83875 times 10minus2 119910 29532 times 10minus3

119911 64746 times 10minus2 119911 93271 times 10minus2 119911 29756 times 10minus3

(a) (b)

Figure 1 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

(a) (b)

Figure 2 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

Journal of Applied Mathematics 7

(a) (b)

Figure 3 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

the second surface is a closed surface with a strong singularityat its uppermost part where many data points concentrate ina very small volumeThis is usually a very challenging featurefor free-form parametric surfaces which typically tend todistribute the control points by following a rectangulartopology Clearly such a distribution is not adequate for thissurface To our delight the proposed method identifies thissituation automatically and rearranges the control points byitself to adapt to the underlying structure of data points Inopinion of the authors this is a striking and very remarkablefeature of this method and shows its ability to capture the realbehavior of data points even under unfavorable conditions

To summarize a visual inspection of the three figuresclearly shows that ourmethod yields a very good approximat-ing surface to data points in all cases This fact is validatedby the numerical results reported in Table 1 which confirmthe good behavior of the method From these examples andmany other not reported here for the sake of brevity weconclude that the presented method performs very wellwith remarkable capability to provide a satisfactory accuratesolution to our parameterization problem with polynomialBezier surfaces

Regarding the implementation issues all computationsin this paper have been performed on a 29GHz Intel Corei7 processor with 8GB of RAM The source code has beenimplemented by the authors in the native programminglanguage of the popular scientific program Matlab version2010b for Windows 8 operating system

6 Conclusions and Future Work

This paper introduces a new method to address the surfaceparameterization problem that is to compute a suitableparameterization of a set of data points in order to constructthe free-form parametric surface approximating such datapoints better in the least-squares sense This is a challengingproblem that appears recurrently in reverse engineering forcomputer design and manufacturing and in many otherindustrial fields Very often data points in real-world settingsare irregularly sampled and subjected to measurement noise

leading to a very difficult nonlinear continuous optimizationproblem which cannot be solved by using standard opti-mization techniques To overcome this limitation this paperproposes a new method based on a powerful nature-inspiredmetaheuristic algorithm called firefly algorithm introducedrecently to solve difficult optimization problemsThemethodhas been successfully applied to solve the parameterizationproblem for polynomial Bezier surfaces The paper discussesthe main issues in this problem such as the solution repre-sentation and the selection of suitable control parameters Tocheck the performance of our approach it has been appliedto some illustrative examples of open and closed surfacesincluding shapes with singularities Our results show thatthe method performs very well being able to yield the bestapproximating surface with a high degree of accuracy

As mentioned in Section 3 the original firefly algorithmhas been improved and modified in many different waysSome of its variants have shown to be more efficient thanthe original version meaning that the presented approachcan arguably be improved with new optimized features forbetter performance An illustrative example is given by a veryrecent version called memetic self-adaptive firefly algorithm[53] whose new capabilities (the use of self-adaptationstrategies on the control parameters a new populationmodelbased on elitism and the hybridization with a local searchheuristics) improve the original firefly algorithm significantlyThe application of many of these variants to our parameter-ization problem along with a comparative analysis of theirperformance is part of our future workWe are also interestedto extend this method to other families of surfaces such asthe B-splines and NURBS where the existence of additionalparameters (such as knots and weights) can modify ourprocedure significantly The application of this method tosome interesting real-world problems in industrial settings isalso part of our plans for future work

Conflict of Interests

The authors of this paper have no current or past direct orindirect financial relationship with any commercial identity

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

6 Journal of Applied Mathematics

Table 1 Number of data points and error values (for each coordinate) of the three examples discussed in this paper

Example Number of data points Error (E) Error (MaxE) Error (RMSE)

Example 1 6572

119909 73652 times 10minus2 119909 95144 times 10minus2 119909 33476 times 10minus3

119910 74303 times 10minus2 119910 98452 times 10minus2 119910 33624 times 10minus3

119911 75126 times 10minus2 119911 99673 times 10minus2 119911 33811 times 10minus3

Example 2 3378

119909 52958 times 10minus3 119909 72446 times 10minus3 119909 12521 times 10minus3

119910 51216 times 10minus3 119910 70237 times 10minus3 119910 12313 times 10minus3

119911 52909 times 10minus3 119911 74532 times 10minus3 119911 12515 times 10minus3

Example 3 7312119909 64191 times 10minus2 119909 84377 times 10minus2 119909 29629 times 10minus3

119910 63774 times 10minus2 119910 83875 times 10minus2 119910 29532 times 10minus3

119911 64746 times 10minus2 119911 93271 times 10minus2 119911 29756 times 10minus3

(a) (b)

Figure 1 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

(a) (b)

Figure 2 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

Journal of Applied Mathematics 7

(a) (b)

Figure 3 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

the second surface is a closed surface with a strong singularityat its uppermost part where many data points concentrate ina very small volumeThis is usually a very challenging featurefor free-form parametric surfaces which typically tend todistribute the control points by following a rectangulartopology Clearly such a distribution is not adequate for thissurface To our delight the proposed method identifies thissituation automatically and rearranges the control points byitself to adapt to the underlying structure of data points Inopinion of the authors this is a striking and very remarkablefeature of this method and shows its ability to capture the realbehavior of data points even under unfavorable conditions

To summarize a visual inspection of the three figuresclearly shows that ourmethod yields a very good approximat-ing surface to data points in all cases This fact is validatedby the numerical results reported in Table 1 which confirmthe good behavior of the method From these examples andmany other not reported here for the sake of brevity weconclude that the presented method performs very wellwith remarkable capability to provide a satisfactory accuratesolution to our parameterization problem with polynomialBezier surfaces

Regarding the implementation issues all computationsin this paper have been performed on a 29GHz Intel Corei7 processor with 8GB of RAM The source code has beenimplemented by the authors in the native programminglanguage of the popular scientific program Matlab version2010b for Windows 8 operating system

6 Conclusions and Future Work

This paper introduces a new method to address the surfaceparameterization problem that is to compute a suitableparameterization of a set of data points in order to constructthe free-form parametric surface approximating such datapoints better in the least-squares sense This is a challengingproblem that appears recurrently in reverse engineering forcomputer design and manufacturing and in many otherindustrial fields Very often data points in real-world settingsare irregularly sampled and subjected to measurement noise

leading to a very difficult nonlinear continuous optimizationproblem which cannot be solved by using standard opti-mization techniques To overcome this limitation this paperproposes a new method based on a powerful nature-inspiredmetaheuristic algorithm called firefly algorithm introducedrecently to solve difficult optimization problemsThemethodhas been successfully applied to solve the parameterizationproblem for polynomial Bezier surfaces The paper discussesthe main issues in this problem such as the solution repre-sentation and the selection of suitable control parameters Tocheck the performance of our approach it has been appliedto some illustrative examples of open and closed surfacesincluding shapes with singularities Our results show thatthe method performs very well being able to yield the bestapproximating surface with a high degree of accuracy

As mentioned in Section 3 the original firefly algorithmhas been improved and modified in many different waysSome of its variants have shown to be more efficient thanthe original version meaning that the presented approachcan arguably be improved with new optimized features forbetter performance An illustrative example is given by a veryrecent version called memetic self-adaptive firefly algorithm[53] whose new capabilities (the use of self-adaptationstrategies on the control parameters a new populationmodelbased on elitism and the hybridization with a local searchheuristics) improve the original firefly algorithm significantlyThe application of many of these variants to our parameter-ization problem along with a comparative analysis of theirperformance is part of our future workWe are also interestedto extend this method to other families of surfaces such asthe B-splines and NURBS where the existence of additionalparameters (such as knots and weights) can modify ourprocedure significantly The application of this method tosome interesting real-world problems in industrial settings isalso part of our plans for future work

Conflict of Interests

The authors of this paper have no current or past direct orindirect financial relationship with any commercial identity

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

Journal of Applied Mathematics 7

(a) (b)

Figure 3 Applying the firefly algorithm to Bezier surface approximation of data points (a) original data points (b) best approximating Beziersurface

the second surface is a closed surface with a strong singularityat its uppermost part where many data points concentrate ina very small volumeThis is usually a very challenging featurefor free-form parametric surfaces which typically tend todistribute the control points by following a rectangulartopology Clearly such a distribution is not adequate for thissurface To our delight the proposed method identifies thissituation automatically and rearranges the control points byitself to adapt to the underlying structure of data points Inopinion of the authors this is a striking and very remarkablefeature of this method and shows its ability to capture the realbehavior of data points even under unfavorable conditions

To summarize a visual inspection of the three figuresclearly shows that ourmethod yields a very good approximat-ing surface to data points in all cases This fact is validatedby the numerical results reported in Table 1 which confirmthe good behavior of the method From these examples andmany other not reported here for the sake of brevity weconclude that the presented method performs very wellwith remarkable capability to provide a satisfactory accuratesolution to our parameterization problem with polynomialBezier surfaces

Regarding the implementation issues all computationsin this paper have been performed on a 29GHz Intel Corei7 processor with 8GB of RAM The source code has beenimplemented by the authors in the native programminglanguage of the popular scientific program Matlab version2010b for Windows 8 operating system

6 Conclusions and Future Work

This paper introduces a new method to address the surfaceparameterization problem that is to compute a suitableparameterization of a set of data points in order to constructthe free-form parametric surface approximating such datapoints better in the least-squares sense This is a challengingproblem that appears recurrently in reverse engineering forcomputer design and manufacturing and in many otherindustrial fields Very often data points in real-world settingsare irregularly sampled and subjected to measurement noise

leading to a very difficult nonlinear continuous optimizationproblem which cannot be solved by using standard opti-mization techniques To overcome this limitation this paperproposes a new method based on a powerful nature-inspiredmetaheuristic algorithm called firefly algorithm introducedrecently to solve difficult optimization problemsThemethodhas been successfully applied to solve the parameterizationproblem for polynomial Bezier surfaces The paper discussesthe main issues in this problem such as the solution repre-sentation and the selection of suitable control parameters Tocheck the performance of our approach it has been appliedto some illustrative examples of open and closed surfacesincluding shapes with singularities Our results show thatthe method performs very well being able to yield the bestapproximating surface with a high degree of accuracy

As mentioned in Section 3 the original firefly algorithmhas been improved and modified in many different waysSome of its variants have shown to be more efficient thanthe original version meaning that the presented approachcan arguably be improved with new optimized features forbetter performance An illustrative example is given by a veryrecent version called memetic self-adaptive firefly algorithm[53] whose new capabilities (the use of self-adaptationstrategies on the control parameters a new populationmodelbased on elitism and the hybridization with a local searchheuristics) improve the original firefly algorithm significantlyThe application of many of these variants to our parameter-ization problem along with a comparative analysis of theirperformance is part of our future workWe are also interestedto extend this method to other families of surfaces such asthe B-splines and NURBS where the existence of additionalparameters (such as knots and weights) can modify ourprocedure significantly The application of this method tosome interesting real-world problems in industrial settings isalso part of our plans for future work

Conflict of Interests

The authors of this paper have no current or past direct orindirect financial relationship with any commercial identity

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

8 Journal of Applied Mathematics

mentioned in this paper that might lead to any conflict ofinterests They are solely mentioned here for scientific pur-poses

Acknowledgments

This research has been kindly supported by the Com-puter Science National Program of the Spanish Ministryof Economy and Competitiveness Project Reference noTIN2012-30768 Toho University (Funabashi Japan) andthe University of Cantabria (Santander Spain) The authorsare particularly grateful to the Department of InformationScience of Toho University for all the facilities given to carryout this research work Special thanks are due to the Editorand the anonymous reviewers for their useful comments andsuggestions that allowed us to improve the final version of thispaper

References

[1] R E Barnhill Geometry Processing for Design and Manu-facturing Society for Industrial and Applied MathematicsPhiladelphia Pa USA 1992

[2] G Echevarra A Iglesias and A Galvez ldquoExtending neural net-works for B-spline surface reconstructionrdquo in ComputationalSciencemdashICCS 2002 vol 2330 of Lecture Notes in ComputerScience pp 305ndash314 2002

[3] A Galvez A Iglesias and J Puig-Pey ldquoIterative two-step gen-etic-algorithm-based method for efficient polynomial B-splinesurface reconstructionrdquo Information Sciences vol 182 pp 56ndash76 2012

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

[5] A Iglesias andAGalvez ldquoA new artificial intelligence paradigmfor computer aided geometric designrdquo in Artificial Intelligenceand Symbolic Computation vol 1930 pp 200ndash213 LectureNotes in Computer Science 2001

[6] 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

[7] 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

[8] T Varady and RMartin ldquoReverse engineeringrdquo inHandbook ofComputer Aided Geometric Design pp 651ndash681 North-HollandAmsterdam The Netherlands 2002

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

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

[11] 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

[12] J Ling and S Li ldquoFitting B-spline curves by least squaressupport vector machinesrdquo in Proceedings of the InternationalConference on Neural Networks and Brain Proceedings (ICNNBrsquo05) pp 905ndash909 Beijing China October 2005

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

[14] 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

[15] 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

[16] 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

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

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

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

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

[21] D F Rogers An Introduction to NURBS With His HistoricalPerspective Morgan Kaufmann 2000

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

[23] 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

[24] 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

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

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

[27] F Yoshimoto M Moriyama and T Harada ldquoAutomatic knotadjustment by a genetic algorithm for data fitting with a splinerdquoinProceedings of the International Conference on ShapeModelingInternational and Applications pp 162ndash169 IEEE ComputerSociety Press 1999

[28] 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

[29] J Barhak and A Fischer ldquoParameterization and reconstructionfrom 3D scattered points based on neural network and PDEtechniquesrdquo IEEE Transactions on Visualization and ComputerGraphics vol 7 no 1 pp 1ndash16 2001

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

[31] P Dierckx Curve and Surface Fitting with Splines OxfordUniversity Press Oxford Miss USA 1993

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

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

Journal of Applied Mathematics 9

[33] 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

[34] J R RiceNumerical Methods Software and Analysis AcademicPress New York NY USA 2nd edition 1993

[35] H Yang W Wang and J Sun ldquoControl point adjustment forB-spline curve approximationrdquoComputer Aided Design vol 36no 7 pp 639ndash652 2004

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

[37] A Galvez J Puig-Pey and A Iglesias ldquoA differential methodfor parametric surface intersectionrdquo in Computational scienceand its applicationsmdashICCSA 2004 vol 3044 of Lecture Notesin Computer Science pp 651ndash660 Springer Berlin Germany2004

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

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

[40] G K Knopf and J Kofman ldquoFree-form surface reconstructionusing Bernstein basis function networksrdquo in Proceedings of theArtificial Neural Networks in Engineering Conference (ANNIErsquo99) vol 9 pp 797ndash802 ASME Press November 1999

[41] 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 China 2001

[42] A Galvez A Iglesias A Cobo J Puig-Pey and J EspinolaldquoBezier curve and surface fitting of 3D point cloudsthrough genetic algorithms functional networks and least-squares approximationrdquo in Computational Science and ItsApplicationsmdashICCSA 2007 vol 4706 of Lecture Notes inComputer Science pp 680ndash693 2007

[43] 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

[44] A Galvez A Iglesias and A Avila ldquoImmunological-basedapproach for accurate fitting of 3D noisy data points withBezier surfacesrdquo in Proceedings of the International ConferenceonComputational Science (ICCS rsquo13) vol 18 pp 50ndash59 ProcediaComputer Science 2013

[45] 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

[46] 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

[47] X-S Yang ldquoFirefly algorithms formultimodal optimizationrdquo inStochastic Algorithms Foundations and Applications vol 5792of Lectures Notes in Computer Science pp 169ndash178 SpringerBerlin Germany 2009

[48] X S Yang ldquoFirey algorithm stochastic test functions anddesignoptimisationrdquo International Journal of Bio-Inspired Computa-tion vol 2 no 2 pp 78ndash84 2010

[49] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 46763112 pages 2012

[50] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress Frome UK 2nd edition 2010

[51] X-S Yang Engineering Optimization An Introduction withMetaheuristic Applications Wiley amp Sons New Jersey NJ USA2010

[52] I Fister I Fister Jr X S Yang and J Brest ldquoA comprehensivereview of firefly algorithmsrdquo Swarm and Evolutionary Compu-tation In press

[53] I Fister X S Yang J Brest and I Fister Jr ldquoMemetic self-adaptive firefly algorithmrdquo in Swarm Intelligence and Bio-Inspired Computation Theory and Applications X S Yang ZCui R Xiao A H Gandomi and M Karamanoglu Eds pp73ndash102 Elsevier 2013

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 Polynomial Bézier ...Journal of Applied Mathematics and a suitable parameter tuning. e usual models for data ttinginCAD/CAMandotherindustrial

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