**5.2 SA for the approximation curve determination**

Using a piece-wise Bézier curve has a advantage in two aspects. First, the curve is divided in several pieces, in which each curve segment approximates only part of the sequence. Second, it is known that a Bézier curve always interpolates its end points. The used cost function is

$$F(\{\mathbf{p}\_i\}) = W \cdot \sum\_{k=1}^{m-1} \left\| \mathbf{d}\_k - \mathbf{P}\_v(\mathbf{d}\_k) \right\|^2 + (1 - W) \cdot L(\mathbf{P}(u)). \tag{8}$$

with **p***<sup>i</sup>* are the control points defining the curve, **d** is the sequence of points, **P***v*ð Þ **d***<sup>k</sup>* is the projection of point **d***<sup>k</sup>* in the curve **P**, *L*ð Þ **P**ð Þ *u* is the length of the curve, **P** is a piece-wise Bézier curve and *W* is a weight factor. This object function consists of two parts. P*<sup>m</sup>*�<sup>1</sup> *<sup>k</sup>*¼<sup>1</sup> k k **<sup>d</sup>***<sup>k</sup>* � **<sup>P</sup>***v*ð Þ **<sup>d</sup>***<sup>k</sup>* <sup>2</sup> is the first part and it represents the discrepancy between the piece-wise curve and the sequence of points. The first and last points in the sequence are not considered as they already are on the determined piece-wise Bézier curves. For every point in the sequence **d***<sup>k</sup>* it is determined its projection in the piece-wise Bézier curve **P***v*ð Þ **d***<sup>k</sup>* [50]. *L*ð Þ **P**ð Þ *u* is the second part, representing a regularization. It is used to avoid the over-fitting problem, the algorithm will search for short and smooth curves (and avoid long and sinuous curves).

SA needs to adjust the parameters defining a piece-wise Bézier curve that minimizes (8). Each piece-wise Bézier curve has two internal control points (as shown in **Figure 9**). The coordinates for each of these control points are continuous parameters and they are controlled using the crystallization heuristic. The connection point between two piece-wise Bézier curves (as point **p**<sup>3</sup> shown in **Figure 9**) is represented as an integer parameter. It is an index representing a point from the given sequence.

Consider the example from **Figure 10**, the continuous parameters are the coordinate of control points **p**1, **p**<sup>2</sup> and **p**5. Control point **p**<sup>4</sup> is determined by modifying *β* from (7). Control points **p**<sup>0</sup> and **p**<sup>6</sup> are the first and last point of the sequence of points; and control point **p**<sup>3</sup> is a connecting point. The definition of this point is the discrete parameter adjusted by the SA.

The continuous parameters are controlled by the crystallization heuristic. The discrete parameters have specific operator, a random value is picked from a

**Figure 10.** *Each Bézier curve segment approximates just one part of the sequence of points.*

#### **Figure 11.**

*Two artificial created examples tested by the proposed algorithm. Black points are the noisy sampled points, each curve segment is in a different color with its respective control points represented as squares.*


#### **Table 3.**

*The results for the SA based curve interpolation solution. Npts: total number of points. NSegm: number of curve segments. Niter: number of iterations. Cost: objective function.*

uniform distribution between 0, 1 ½ �, if this value is greater than 0*:*5 the discrete parameter is increased by 1, otherwise it is decreased by 1.

#### **5.3 Results and discussion**

A curve is defined and sampled, and a random noise is added to each sampled point creating an artificial example to be tested by the proposed algorithm. Two example were tested, shown in **Figure 11**. **Figure 11(a)** is sampled with 101 points and **Figure 11(b)** is sampled with 300 points. The initial temperature is set as 100 and for each temperature there are 1000 iteration or 500 accepted solutions, and an adaptive cooling schedule [50] was adopted with a variable *α*. A minimum of 5 accepted solutions is used as stop criteria.

**Table 3** show the result of these two test examples. The objective function is higher in the second example, once *Npts* is higher as well the curve is longer. *Niter* is close in both example, there are less than 7% of difference between both tests.

The proposed interpolation algorithm was applied in different applications showing its versatility and robustness. Ueda et al. [51] proposed an algorithm to determine the curves which interpolates the boundary of a point cloud in space. Ueda et al. [52] proposed an algorithm to determine the defect zone from a 3D scanned turbine blade. Ueda et al. [53] also proposed an algorithm to determine open boundaries in point clouds with symmetry (like injuries in a skull).
