Animation coming — full Sora 2 prompt below. Video will replace this placeholder.
Plain English first
Take a circle and lay a grid of unit squares over it. Count how many fit inside. For a circle of radius 1, about 3.14 unit squares fit. For radius 2, about 12.57. For radius 3, about 28.27.
Those numbers are π×r². The π (≈ 3.14159) is the count of unit squares that fit inside a radius-1 circle. As radius grows, you need r² times more squares — because area grows with the square of the radius, not linearly.
The formula A = πr² is not arbitrary. It's the answer to "how many unit squares fit inside a circle of radius r?" — with π being the conversion factor between the curved circle and the square grid.
Standard math notation
A = π × r²
Where:
A = area (unit squares inside the circle)
r = radius (distance from center to edge)
π ≈ 3.14159... (ratio of circumference to diameter — see Pi article)
Connection to circumference:
C = 2πr
A = πr² = (C/2) × r (area = half the circumference × radius)
Verbose Python with descriptive names
PI = 3.141592653589793
def compute_circle_area(radius_of_circle):
"""
The area is how many unit squares fit inside the circle.
For radius 1: exactly π squares fit.
For radius r: π × r² squares fit (because area scales with radius squared).
"""
radius_squared = radius_of_circle * radius_of_circle
area_in_unit_squares = PI * radius_squared
return area_in_unit_squares
# Verify the pattern: doubling radius quadruples area
print(compute_circle_area(radius_of_circle=1)) # 3.14159...
print(compute_circle_area(radius_of_circle=2)) # 12.56637... (4× bigger)
print(compute_circle_area(radius_of_circle=3)) # 28.27433... (9× bigger)
# Why π? Count unit squares empirically (Monte Carlo method)
import random
def estimate_area_by_counting_random_points(
radius_of_circle,
number_of_random_sample_points
):
"""
Throw random darts inside the bounding square.
Count what fraction land inside the circle.
Area of circle = fraction_inside × area_of_bounding_square.
"""
bounding_square_side = radius_of_circle
points_inside_circle = 0
for _ in range(number_of_random_sample_points):
random_x = random.uniform(-radius_of_circle, radius_of_circle)
random_y = random.uniform(-radius_of_circle, radius_of_circle)
distance_from_center = (random_x**2 + random_y**2) ** 0.5
if distance_from_center <= radius_of_circle:
points_inside_circle += 1
fraction_that_landed_inside = points_inside_circle / number_of_random_sample_points
area_of_bounding_square = (2 * radius_of_circle) ** 2
estimated_area = fraction_that_landed_inside * area_of_bounding_square
return estimated_area
print(estimate_area_by_counting_random_points(
radius_of_circle=1,
number_of_random_sample_points=100_000
)) # ≈ 3.14...
Sora 2 video prompt
8-second animation. A circle of radius r=3 on white background. A fine unit
grid overlays it. Whole squares inside the circle fill gold one by one from
center outward. Partial squares at the curved edge fill a lighter shade. A
counter shows total ≈ 28.27. Formula builds: A = π × r² = π × 9 ≈ 28.27.
The r² glows as the 9 full squares of radius, π as the curved correction
factor. Warm earth tones, clean educational style.
Commentaires
Aucun commentaire. Soyez le premier !