Now on ScienceBlogs: HeartlandGate: Anti-Science Institute's Insider Reveals Secrets

ScienceBlogs Book Club: Inside the Outbreaks
dotphysbanner.jpg

Dot Physics

What happens when you take some basic, introductory physics and apply them to cool things you see? Dot Physics happens. This blog looks at movies, experiments, demos and other topics typically aimed at the introductory physics level.

Profile

allain_pic4.jpg Rhett Allain is an Associate Professor of Physics at Southeastern Louisiana University. He enjoys teaching and talking about physics. Sometimes he takes things apart and can't put them back together.

Search

Recent Posts

Recent Comments

Archives

Blogroll

« On the 8th Day, God made Pi | Main | Pi: how many digits do you need? »

Scratch version of Pi estimation

Category: calculation
Posted on: March 11, 2010 10:37 AM, by Rhett Allain

I already went over a Monte Carlo method for estimating Pi - you know, for Pi-Day (March 14). Well, here is a small addition. This is the same thing done in Scratch.

Scratch Project

Click the image to run the scratch app. It is kind of fun to watch.

About Scratch

If you are not familiar with Scratch, basically it is a graphical programming language a lot like the stuff for the Lego robotics. It is free, runs on Windows and Mac OS X, and can be embedded in a webpage as a java applet. Sure, Scratch has some limitations, but it is great for kids. Here is what the code for the pi-estimation program looks like:

Randompi  Scratch

If you create an account on Scratch, you can download the code of any project. I like Scratch.

Share on Facebook
Share on StumbleUpon
Share on Facebook
Find more posts in: Physical ScienceTechnology

TrackBacks

TrackBack URL for this entry: http://scienceblogs.com/mt/pings/133447

Comments

1

Do you think that you could include the animation behind a cut? It slows my browser down like crazy every time I load. When I try to search multiple times, I have to reload the main page several times. Thanks!

Posted by: jg | March 12, 2010 9:28 AM

2

@jg,

Sorry about that - I was sort of worried about that app autorunning. I have replaced it with picture and a link to the scratch website. Hope that fixes it.

Posted by: Rhett Allain Author Profile Page | March 12, 2010 9:37 AM

3

n=1.851E6
pi=3.1344...

Guess they've been lying to us about that 3.14159 business all this time. ;)

Posted by: ToSeek | March 12, 2010 10:03 AM

4

@ToSeek,

My wife found the same thing - I suspect it is a problem with Scratch's random number generator. I could be wrong though.

Posted by: Rhett Allain Author Profile Page | March 12, 2010 10:58 AM

5

WOW! This is the first time I've heard of Scratch. I teach algebra to 8th graders and this is exactly the kind of tool I've been looking for. The possibilities are overwhelming. Thanks for the tip!

Posted by: Andy | March 16, 2010 1:15 AM

Post a Comment

(Email is required for authentication purposes only. On some blogs, comments are moderated for spam, so your comment may not appear immediately.)





ScienceBlogs

Search ScienceBlogs:

Go to:

Advertisement
Follow ScienceBlogs on Twitter

© 2006-2011 ScienceBlogs LLC. ScienceBlogs is a registered trademark of ScienceBlogs LLC. All rights reserved.