AI agents can use /llms.txt as a documentation index. Follow listed markdown links; .md URLs and Accept: text/markdown work only for supported source-backed pages.
A circle is the collection of all points on a plane that have the same distance from one fixed point. This fixed point is called the center of the circle, while the equal distance from the center to every point on the circle is called the radius.
Imagine you tie a string to a nail, then pull the string tight and draw a complete curve around the nail. The curve that forms is what we call a circle, the nail is its center, and the length of the string is its radius.
Circle with Center and Radius
All points on the circle have the same distance from the center.
In the visualization above, point P is the center of the circle, while points A, B, and C are some points that lie on the circle. Notice that the distance from P to A, P to B, and P to C are all equal to r. This is what makes them all lie on the same circle.
Now, let's create a more formal definition. Mathematically, a circle with center P(a,b) and radius r is the set of all points (x,y) that satisfy the condition:
d(P,(x,y))=r
Where d(P,(x,y)) is the distance from the center point P to the point (x,y) on the circle.
If we use the distance formula in the Cartesian coordinate system, we can write it like this:
From the mathematical definition above, we can derive the circle equation by squaring both sides:
(x−a)2+(y−b)2=r
(x−a)2+(y−b)2=r2
This is the general equation of a circle with center (a,b) and radius r. This formula is very useful for determining whether a point lies inside, outside, or exactly on the circle.
Circle in Coordinate System
Circle with center (2,1) and radius 2.
For the circle in the visualization above, its equation is:
There are several important terms you need to understand:
Center of circle is the fixed point that serves as a reference for all points on the circle. All points on the circle have the same distance to this center.
Radius is the distance from the center of the circle to any point on the circle. In one circle, all radii have the same length.
Diameter is a straight line that connects two points on the circle and passes through the center. The length of the diameter is always twice the length of the radius, or d=2r.
To make it easier to understand, we can see the visualization below: