pi from area

Your browser needs java to view projects. Click here to install Java.

user_icon kevin_karplus shared it 1 year, 8 months ago
390 views, 2 taggers, 5 people love it, 1 remix by 1 person, 37 downloads, in 5 galleries
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
Oldschooler2 Oldschooler2 5 months, 1 week ago

I used a very similar approach to this in my C++ class at school to approximate the area of pi, only you could pick how many random points.

hmnwilson hmnwilson 10 months, 2 weeks ago

Where did you go?

skryed skryed 1 year, 1 month ago

you live un santa cruz? lol me too

Techie31415 Techie31415 1 year, 2 months ago

I managed to speed it up a bit and let it run for 100,000 samples, but it came consistently to about -0.015 of pi. Since it never (at the end) went above the true value of pi in the 3 tests that I did, seemingly, the random number generator in Scratch is probably only pseudo-random, or I did not do enough tests. Is there any part of statistics that might predict the value of pi that I got with 100,000 tests to be within this range, however?

bubble-07 bubble-07 1 year, 3 months ago

To make it a little more efficien, you could make it so it goes line by line, with the script copied within the forever loop. That i good for optomization.

DrSuper DrSuper 1 year, 4 months ago

This is cool and a great idea. If you could show the math a bit and advise the looker to be patient they will get it. Not many people have dowloaded it so i fear not many lookers got it. Look at my game Susa you will like it!

jhnbytwoo jhnbytwoo 1 year, 7 months ago

Oh, wait, I see the variable name now, sorry.

jhnbytwoo jhnbytwoo 1 year, 7 months ago

Isn't Pi 3.14159... not 314,159...? Or will it fix that?

Ivaash Ivaash 1 year, 7 months ago

Can you help me you're a forum moderator (link to forums)">(link to forum)

kevin_karplus kevin_karplus 1 year, 8 months ago

From statistics, we can work out that both the mean and the variance of the number of points in the circle is n*pi/4. That means that the standard deviation of the estimate of pi will be about pi/sqrt(n). After 10000 samples, you expect to be within about +- 0.03 of pi.

bigB bigB 1 year, 8 months ago

its a good priject but i am actually suprised at how ineffiecient it is.

maki maki 1 year, 8 months ago

this is similar to my project

planetX planetX 1 year, 8 months ago

cool

Please Wait...