# CircleFromNPoints

Constructs a circle from a list of points.

## CircleFromNPoints Inputs

Parameter | Description
Point 0 | Specifies the coordinates of the first point.
Point X 0 | The x-coordinate of the first point.
Point Y 0 | The y-coordinate of the first point.
Point 1 | Specifies the coordinates of the second point.
Point X 1 | The x-coordinate of the second point.
Point Y 1 | The y-coordinate of the second point.
Point 2 | Specifies the coordinates of the third point.
Point X 2 | The x-coordinate of the third point.
Point Y 2 | The y-coordinate of the third point.
Point 3..N | Optionally specifies the coordinates of any additional points.
Point X N | The x-coordinate of the Nth point.
Point Y N | The y-coordinate of the Nth point.
Show | Specifies the graphics items to be displayed on a permanent basis.
0 = hide all | All graphics items will be hidden except when the cell containing the CircleFromNPoints function is the active cell in the spreadsheet.
1 = result graphics only | The fitted circle graphic will be displayed at all times. The input points will only be displayed when the cell containing the CircleFromNPoints function is the active cell in the spreadsheet.
2 = input and result graphics | The fitted circle and the input points will be displayed at all times.

## CircleFromNPoints Outputs

Returns | A CircleFit data structure containing the X, Y, radius and sigma of the fitted circle.
Results | When the function is initially inserted into a cell, the following CircleFit Vision Data Access functions are automatically inserted into the spreadsheet to create a result table:
Label | Function | Description
X | GetX(CircleFit) | The x-coordinate of the center of the circle.
Y | GetY(CircleFit) | The y-coordinate of the center of the circle.
Radius | GetRadius(CircleFit) | The radius of the circle.
Sigma | GetSigma(CircleFit) | The square root of the sum of the squares of the distances from the points to the circle divided by the number of points.
Additional data elements can be accessed using the following Vision Data Access functions :
Label | Function | Description
--- | --- | ---
Distance | GetDistance(CircleFit, Index) | The distance between the indexed point and the circle. If the value is negative, the point is within the circle. If the indexed point is invalid, an #ERR is returned.
MaxDist | GetMaxDist(CircleFit) | The distance between the circle and the point farthest from the circle. If the value is negative, the point is within the circle.
MaxDistIndex | GetMaxDistIndex(CircleFit) | The index of the point farthest from the circle.
NPointsUsed | GetNPointsUsed(CircleFit) | The number of points used to fit the circle.