ScratchData LogoScratchData
Back to DarthPickley's profile

Pi calculation

DADarthPickley•Created March 14, 2011
Pi calculation
3
1
397 views
View on Scratch

Description

several different methods, most use integration of a function. this function is either integrated from 0 to infinity, or from 0 to 1 for the semicircle. Integration is time consuming and gets messy as well. these methods don't work very well here. the best one was Sin x / x ratio, where I used the fact that in Scratch, the Period of Sine and Cosine functions are known exactly as 360, and by calculus, its slope at 0 should be exactly 180/pi. some basic algebraic manipulation allows Pi to be found this way. This works quite well because it is a single calculation repeated multiple times. It gives an extremely accurate answer, such that: for x = 0.000001, (sin(x)/x)*180 = 3.141592653589793, which is all the precision that Scratch can give. this method only will work for calculating the Trigonometric functions in degrees. if it is in Pi radians, you do not know the exact value for the period, you know that it is 2pi, and since this is what you want to figure out (what pi is), it won't work. I have not done any of the infinite Series. I might in a new project

Project Details

Project ID1656529
CreatedMarch 14, 2011
Last ModifiedMarch 14, 2011
SharedMarch 14, 2011
Visibilityvisible
CommentsAllowed