Least Squares Parameters

In general, the PC-DMIS Blade least squares bestfit algorithm aligns input points \(\vec{p}_i\) to a curve. The bestfit algorithm finds a transformation (consisting of an offset and a rotation) that minimizes a least-squares objective function. The algorithm works as follows:

  1. Set \(T\) to the identity transformation (no offset and no rotation)

  2. Find the points on the curve \(\vec{c}_i\) that are the nearest points on the curve to the transformed input points \(T(\vec{p}_i)\)

  3. Find a new transformation \(T\) that best aligns the transformed input points \(T(\vec{p}_i)\) to the curve points \(\vec{c}_i\), by minimizing an objective function described below

  4. Repeat MAXITERS times by going back to step 2, finding new points \(\vec{c}_i\), and so forth

The first iteration yields an approximate bestfit \(T\). On the second iteration, step 2 produces improved closest-on-the-curve points \(\vec{c}_i\) because \(T\) is better than the initial identity transformation. Therefore, step 3 of the second iteration can produce a further-improved estimate of \(T\), and so forth. By including enough iterations, the result will typically converge to a very high-accuracy alignment \(T\) between the input points and the curve.

Step 3 minimizes the following objective function:

$$ \mathcal{L} = \sum_i w_i r_i^2 $$

In the above:

In most cases, it is a simple Euclidean distance, but in the case of the Vector Fit, it is projected onto the surface normal of the curve at \(\vec{c}_i\). Using the Vector Fit typically promotes faster convergence and higher accuracy, since it more nearly approximates the distance from the point to the curve.

Additional Parameters

These parameters further define how PC-DMIS Blade performs the least squares bestfit: