Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#1: Initial revision by user avatar leovt‭ · 2021-08-11T23:21:07Z (over 3 years ago)
A main idea mathematicians use to define lengths of curves, areas of flat shapes, volumes of solids etc is to divide them into smaller and smaller parts such that 

1. The finer and finer subdivisions approximate the shape better and better.
2. The measure of the small parts is already defined.

However, one needs to be careful that this approach creates a definition that is unique and that the resulting definition agrees with what we expect in cases where we can define the measure in a different way or measure them on physical objects.

Your example of computer graphics using a grid of pixels to approximate shapes is both an illustration of this method and also an illustration of some of the difficulties.

Example 1: Measuring the area of a disc
---------
Subdividing a circular disc into squares and adding up the areas of the squares will give a good approximation of the area of the circle, when the squares are small enough.

Example 2: Measuring the circumference of a circle
---------
If you just count the number of squares on the perimeter of the disc to get an approximation of the length of the circumference, you can get a wrong result. 
![Approximating a circle with pixels in a grid (own work, CC BY-SA)](https://math.codidact.com/uploads/WwhSRnVgnQYsVVh2PRqBAvE3)
Somehow the result is too short, and it would remain too short even if the subdivision was made finer and finer. 

The method could be improved, for example by noting that some of the pixels are only connected at a corner and thus their centers are further away than the side length of the square.

But I expect it to be difficult to describe mathematically the location of all the pixels on the circumference in a finer and finer grid.

Example 3: Inscribed polygons (Archimedes)
------------
We could approximate our circle of radius 1 by a regular hexagon inscribed in the circle, this would give an approximate perimeter of 6. 
We can also define a process for better approximations:
Given an inscribed regular polygon we double the number of sides and calculate the perimeter of the new polygon.
We get a process like this:
````
number of sides   length of one side   circumference
---------------   ------------------   -------------
              6                1.000           6.000
             12                0.518           6.211
             24                0.261           6.265
             48                0.131           6.279
````
[see for example Regular 12-gon](https://www.wolframalpha.com/input/?i=regular+12gon+with+circumradius+1)
The circumference of the polygons quickly approach the circumference of the circle.

[This Video (Youtube)](https://www.youtube.com/watch?v=_rJdkhlWZVQ) shows how the approximations can be calculated using Pythagoras' formula.

Further Reading
--------------
Going from these better and better approximation to the true value is called "taking the limit" [Wikipedia: Limit (mathematics)](https://en.wikipedia.org/wiki/Limit_(mathematics))

The field of mathematics defining these limits rigurously and studying their properties is called calculus. [Wikipedia: Calculus](https://en.wikipedia.org/wiki/Calculus) and for these problems of adding up "infinitely small" parts the tool of integration is used. [Wikipedia: Integral](https://en.wikipedia.org/wiki/Integral)

[This article on arc length (Wikipedia)](https://en.wikipedia.org/wiki/Arc_length) shows formulae for calculating the length of more general curves using calculus.

There is a [demonstration of the process](https://demonstrations.wolfram.com/ApproximatingPiWithInscribedPolygons/) of approximating a circle with polygons available on Wolfram Alpha, however they are using it for the area of the circle rather than the circumference.