ScratchData LogoScratchData
Back to crkcity's profile

pi as ratio of circle to square

CRcrkcity•Created June 15, 2021
pi as ratio of circle to square
5
4
55 views
View on Scratch

Instructions

Use turbo (shift & click flag) to visualize pi in terms of the ratio of a circle area to square area. By calculating the ratio of relative areas, we get a a rough estimate of pi. Tiny purple dots line up in a grid to fill the space. We count how many fall within square and circle. Because the ratio of square area to circle area is pi/4, we calculate pi as: 4 X number of dots on circle / number of dots on square. We also calculate pi as circle dots / radius squared.

Description

As the purple pen sprite moves over the grid it knows if it is touching the circle, square (or both), and it keeps count. The counts are very sensitive to the size of the circle relative to the square. They should have exactly the same width or else the pi estimate will be off (as is this one).

Project Details

Project ID544806721
CreatedJune 15, 2021
Last ModifiedMarch 14, 2022
SharedMarch 14, 2022
Visibilityvisible
CommentsAllowed