Pi Revealed in a Pile of Toothpicks
Offered By: Coding Train via YouTube
Course Description
Overview
Syllabus
Happy Pi Day 2023!
Introduce Buffon's Needle
Unpack the math
Let toothpick fall at an angle
The probability that the toothpick crosses the border
Uniform probability density function
Illustrate the probablity with a graph
Approximating the value of Pi
Calculating the area under the curve
Resources for Buffon's Needle
Start Coding
Draw vertical lines
Add a toothpick
Draw background in setup
We have to use the built-in value of Pi
Find the closest column
Determine if the toothpick intersects the column
Rotate the line relative to the y-axis
Draw the toothpick as a vertical line
Improve the visuals
Approximate the value of Pi using the probility that a toothpick intersects a column
Suggestions for variations
New Passenger Showcase page on the Coding Train website
Easter egg
Taught by
The Coding Train
Related Courses
Blockchain EssentialsA Cloud Guru AI Design and Engineering with Microsoft Azure
Cloudswyft via FutureLearn Aprendizaje de las matemáticas de primaria
Universidad de los Andes via Coursera Astrophysics: Exploring Exoplanets
Australian National University via edX Astrophysics: The Violent Universe
Australian National University via edX