Research Article
Iterative Least Square Optimization for the Weights of NURBS Curve
Algorithm 1
Pseudocode version of fitting data points with proposed method.
| {Initialization} | Generate the initial fitting curve in traditional method. | for i = 1 to m do | Calculate the minimum distance location on fitting curve to data point Qi. | end for | {Main Loop} | while (prescribe fitting error < max fitting error) do | Insert a knot at the location where has the maximum error on fitting curve. | for i = 1 to m do | Renew the data point parameter on fitting curve. | end for | Build the equation and get the alterations of the weights using proposed method. | Get the new fitting curve using the least square method. | for i = 1 to m do | Calculate the minimum distance location on fitting curve to data point Qi. | end for | end while |
|