# PointToCircle

Computes the minimum distance from a point to the nearest point on a circle. The distance is reported as a positive number if the point is outside the circle, 0 if on it, and negative if inside.

Inputs

Parameter | Description
Point | Specifies the coordinates of the point, which are used as the origin.
X | The X coordinate of the point.
Y | The Y coordinate of the point.
Circle | Specifies the coordinates and size of the circle.
X | The X coordinate of the center of the circle.
Y | The Y coordinate of the center of the circle.
Radius | The radius of the circle.
Show | Specifies the display mode for the graphical overlays of the function on top of the image.
0 = hide all | All graphics are hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the point and the circle is displayed at all times.
2 = input and result graphics | The point and the circle, and the line segment between them, are displayed at all times.

Outputs

Returns | A Dist data structure containing the directed distance between the point and the nearest point on the circle.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

Vision Data Access functions

The following Dist Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

Label | Function | Description
--- | --- | ---
X0 | GetX(Dist, 0) | The X coordinate of the point.
Y0 | GetY(Dist, 0) | The Y coordinate of the point.
X1 | GetX(Dist, 1) | The X coordinate of the nearest point on the circle.
Y1 | GetY(Dist, 1) | The Y coordinate of the nearest point on the circle.
Angle | GetAngle(Dist) | The point-to-point angle.
Distance | GetDistance(Dist) | The point-to-point distance.