Determines the best spherical fit on a cloud of points in 3D.


icon

Inputs/Outputs

  • c1ddbl.png X

    X is the x coordinates of the points of the cloud.

  • c1ddbl.png Y

    Y is the y coordinates of the points of the cloud.

  • c1ddbl.png Z

    Z is the z coordinates of the points of the cloud.

  • i1ddbl.png x0, y0, z0

    x0, y0, z0 are the calculated midpoints of the given cloud.

  • idbl.png r

    r is the calculated radius of the given cloud.

  • ii32.png error

    error returns any error or warning condition from the VI. Most error situations result from discrepancies between the sizes of X, Y, and Z. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • The min-functional is based on an uncommon idea: find x0, y0, z0, and r with

    This leads to a simple linear equation in x0, y0, z0 where (xi, yi, zi) are the given points, (x0, y0, z0) is the unknown midpoint, and r is the unknown radius.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Mathematics\Fitting\Sphere Fit.vi