Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.
﻿

>  Docs Center  >  IDL Reference  >  Math - Miscellaneous  >  CIR_3PNT

### CIR_3PNT

CIR_3PNT

The CIR_3PNT procedure returns the radius and center of a circle, given 3 points on the circle. This is analogous to finding the circumradius and circumcircle of a triangle; the center of the circumcircle is the point at which the three perpendicular bisectors of the triangle formed by the points meet.

This routine is written in the IDL language. Its source code can be found in the file cir_3pnt.pro in the lib subdirectory of the IDL distribution.

## Examples

`X = [1.0, 2.0, 3.0]Y = [1.0, 2.0, 1.0]CIR_3PNT, X, Y, R, X0, Y0PRINT, 'The radius is: ', RPRINT, 'The center of the circle is at: ', X0, Y0`

## Syntax

CIR_3PNT, X, Y, R, X0, Y0

## Arguments

### X

A three-element vector containing the X-coordinates of the points.

### Y

A three-element vector containing the Y-coordinates of the points.

### R

A named variable that will contain the radius of the circle. The procedure returns 0.0 if the points are co-linear.

### X0

A named variable that will contain the X-coordinate of the center of the circle. The procedure returns 0.0 if the points are co-linear.

### Y0

A named variable that will contain the Y-coordinate of the center of the circle. The procedure returns 0.0 if the points are co-linear.

None.

## Version History

 Pre 4.0 Introduced