ScratchData LogoScratchData
Back to Flint-L's profile

Pi Calculator (Buffon's needle)

FLFlint-L•Created August 13, 2014
Pi Calculator (Buffon's needle)
14
5
361 views
View on Scratch

Instructions

Green flag. Space to reset local variables. Down arrow to add local variables to cloud, allowing you to estimate pi on multiple machines, getting closer to pi every time. TURBO MODE!!!! If you like it, love, favorite, or even follow me! Thumbnail by @RichardStarbright

Description

http://en.wikipedia.org/wiki/Buffon's_needle A 12px (needle) is dropped onto a grid of lines that are spaced at 11px intervals. The needle will appear randomly on the screen, pointing in a random direction. Each time it is dropped, it changes the dropped variable by one. If, when it is dropped, it is touching one of the black lines, the crossed variable goes up by one. Then, it performs the operation (d/(c/2)) where d and c are dropped and crossed, respectively. The answer is an estimation of pi.

Project Details

Project ID25553939
CreatedAugust 13, 2014
Last ModifiedJanuary 1, 2015
SharedAugust 13, 2014
Visibilityvisible
CommentsAllowed