geometry25 min

Circles

Circles, circumference, area, and arc length -- the geometry of curves

0/9Not Started

Why This Matters

A circle is the set of all points at a fixed distance (the radius) from a center point. It is the most fundamental curved shape, and it appears everywhere: wheels, clocks, orbits, radar scans, pie charts, and database ring buffers. Understanding circles means understanding curvature.

Circumference is the distance around a circle, and it introduces the constant pi (approximately 3.14159). The relationship C = 2 times pi times r is one of the most elegant formulas in mathematics. Meanwhile, arc length lets you measure a portion of the circumference corresponding to a given angle, which is essential for anything involving rotation: gears, animations, trigonometric functions, and polar coordinates.

Circles also connect geometry to algebra through the equation of a circle: (x - h) squared plus (y - k) squared equals r squared. This equation is just the Pythagorean theorem in disguise, linking back to everything you learned about triangles and distance.

Define Terms

Visual Model

Center (h, k)Fixed point
Radius rCenter to edge
Diameter dd = 2r
CircumferenceC = 2 pi r
AreaA = pi r^2
Arc Lengths = r * theta
Sector AreaA = (theta/2) * r^2
Circle Equation(x-h)^2 + (y-k)^2 = r^2

The full process at a glance. Click Start tour to walk through each step.

A circle is defined by center and radius. From these, we derive circumference, area, arc length, and the algebraic equation.

Code Example

Code
// Circle calculations
const PI = Math.PI;

function circumference(radius) {
  return 2 * PI * radius;
}

function circleArea(radius) {
  return PI * radius ** 2;
}

// Arc length: angle in degrees
function arcLength(radius, angleDeg) {
  const angleRad = angleDeg * (PI / 180);
  return radius * angleRad;
}

// Sector area: angle in degrees
function sectorArea(radius, angleDeg) {
  const angleRad = angleDeg * (PI / 180);
  return 0.5 * radius ** 2 * angleRad;
}

console.log("Circumference (r=5):", circumference(5).toFixed(2));  // 31.42
console.log("Area (r=5):", circleArea(5).toFixed(2));              // 78.54
console.log("Arc length (r=10, 90 deg):", arcLength(10, 90).toFixed(2)); // 15.71
console.log("Sector area (r=10, 90 deg):", sectorArea(10, 90).toFixed(2)); // 78.54

// Check if a point is inside a circle
function isInsideCircle(px, py, cx, cy, r) {
  const dist = Math.sqrt((px - cx) ** 2 + (py - cy) ** 2);
  return dist <= r;
}
console.log("(3,4) in circle at origin r=5:", isInsideCircle(3, 4, 0, 0, 5)); // true
console.log("(4,4) in circle at origin r=5:", isInsideCircle(4, 4, 0, 0, 5)); // false

Interactive Experiment

Try these exercises:

  • Compute the circumference and area of a circle with radius 7. How do the values compare?
  • What arc length does a 60-degree angle cut from a circle of radius 12?
  • If you double the radius, how does the circumference change? How does the area change?
  • Check whether the point (6, 8) lies inside, on, or outside a circle centered at the origin with radius 10.
  • A full revolution is 360 degrees or 2 times pi radians. Verify that the arc length of a full revolution equals the circumference.

Quick Quiz

Coding Challenge

Circle Calculator

Write a function called `circleCalc` that takes a radius and an angle in degrees, and returns an object (or dictionary) with three properties: `area` (area of the full circle), `circumference` (circumference of the full circle), and `arcLength` (arc length for the given angle). Round all values to 2 decimal places.

Loading editor...

Real-World Usage

Circles and their properties appear across many domains:

  • Computer graphics: Drawing circles, arcs, and ellipses on screen uses the circle equation. Anti-aliased circle rendering is a core graphics primitive.
  • Physics simulations: Circular motion, orbital mechanics, and wave propagation all rely on circle geometry and radians.
  • Data visualization: Pie charts, donut charts, and radar plots use sector areas and arc lengths to represent proportions.
  • Robotics and CNC: Robot arms and CNC machines follow arc paths. Computing arc length determines travel time and material usage.
  • Networking: Circular buffers (ring buffers) use modular arithmetic, which is the arithmetic of wrapping around a circle.

Connections