liveBook · Manning

Radius

As explained in Math for Web Design

A radius is the distance from the center of a circle to any point on its circumference.

A radius is the distance from the center of a circle to any point on its circumference. A unit circle has radius 1 and is centered at (0, 0). section 9.1.1

For a circle centered at (centerX, centerY), the radius determines how far a point sits from the center. With angle measured in radians, calculate its position as x = centerX + r * cos(angle) and y = centerY + r * sin(angle). section 9.6

Changing the radius changes the path without changing the circle’s center:

  • Increase r to move the point farther from the center. section 9.1.1

Animating an element around a center

Update the angle on each animation frame, calculate x and y from the radius, and apply the result with a CSS translate transform. A larger radius produces a wider orbit. section 9.6

How Math for Web Design covers it

How deep it goes
Defines radius through the unit circle and applies it in coordinate formulas and animations, without developing circle geometry further.
Examples
Demonstrates unit-circle coordinates, inward spirals, circular animation, and elliptical motion using independent horizontal and vertical radii.
What it assumes
Assumes basic coordinates and angles while establishing the unit circle, sine, cosine, and degree-to-radian conversion.
What you can do after
Build it from scratch by calculating element positions for circular, spiral, or elliptical browser animations.
How it connects
Connects radius with circles, sine, cosine, angles, radians, coordinate systems, CSS, and JavaScript animation.

Also explained in

Compare how 4 books explain radius →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math for Web Design. The section links point to the parts of the book it draws on.