ScratchData LogoScratchData
Back to crkcity's profile

Polygon Pi (estimating pi and radian size from polygons)

CRcrkcity•Created May 22, 2022
Polygon Pi (estimating pi and radian size from polygons)
7
5
88 views
View on Scratch

Instructions

Estimates pi from polygons. Shows that perimeter/2r approaches pi (π), as number of sides of polygon increases (approaching a circle). It's true for circles of any radius (r), which you can test by varying radius. You also can set a turn angle and press "T" for a test by making a polygon and then sending around a white sprite that, using no trig, moves the calculated side length while turning the degrees you chose. (The orientation is the trigonometry style, counterclockwise angles, with 0 degrees facing east). (Press "C" to see the clockwise, compass style orientation, the default mode in Scratch, with angle of 0 degrees set to north)

Description

Draws not a true circle but a polygon with very many tiny flat sides. The very tiny flat side length is the key to estimating pi (and radians per degree as .01745). The model increases # sides of polygon, updating perimeter and (outer) side length. This estimates pi as 3.1415... and estimates radian length for 1 degree = 0.01745 = side length / r, when turn angle = 1. A circle's circumference = π2r = π*diameter, suggesting polygons with very many sides should have a perimeter close to a circle's circumference. The model suggests circle is a polygon with infinite number of sides, but we stop at 1 degree turns which makes a 360 sided polygon called a "trihectohexacontagon." In making the model, the key was to realize the length of the side opposite to the angle = radius * 2 * (sine (turn angle/2). So, for a hexagon, the opposite side length = Radius (which is 100), and perimeter / 2r = 3. As we add sides, we a closer and closer estimate of π, an irrational number ≈ 3.14159 (≈ means approximately equal to). (Note the trig mode, starting at east, going counterclockwise, uses cosine for X, sine for Y. By contrast, in the Scratch mode, going clockwise, we could have changed the angle by adding 90 degrees and multiplying by -1, but it is simpler just to use cosine for Y and sine for X)

Project Details

Project ID694753774
CreatedMay 22, 2022
Last ModifiedMarch 14, 2023
SharedMarch 14, 2023
Visibilityvisible
CommentsAllowed