software by alksoft PowerBook 5300 stuff contact alksoft about alksoft donate to alksoft   Andrew's Projects Andrew's Resume Andrew's Personal Homepage


Pi Calculator 1.2

PC Home | What's New | Screenshots | Download

What is Pi Calculator?
Pi Calculator tries to compute the value of pi by using a random number generator. Given plenty of other methods for calculating pi, this may seem like a very silly way to do it. However, this program does illustrate a very powerful method that is used often in the sciences when trying to manipulate a problem that is either impossible or very difficult to solve analytically. In this casem a computer's numerical prowess can be a terrific advantage. In this case, the power of random numbers is employed. This method is called the "Monte Carlo method."

Who needs it?
Well, no one really needs it. Many folks will still find it interesting, though. Pi Calculator may be most useful in an educational setting. Science and math teachers at the 11th and 12th grade levels, as well as freshmen and sophomore college level instructors should find the topic to be at about the right difficulty level without being too abstract for their students. It may also make a good introduction to numerical computing and the power of computers in science.

How does it work?
If you ask nicely, we'll send you the source code. You shouldn't need it, though, since the algorithm is so amazingly simple. Pick N random coordinates x & y in [0,1]. Keep track of the number of points M that corresponds to each (x,y) such that the square root of (x*x + y*y) <=1. Then Pi = 4*(M/N). Simple, see? ;-)

What's new?
This version of the software implements the calculation in a seperate REALbasic "thread" so that it doesn't lock up your computer while calculating. This makes the software a little slower, but the ability to use the computer to work on other tasks while it is calculating should offset the slowdown. Also, this version's interface is cleaner and easier to use. Finally, we have compiled versions specifically for 68k, PowerPC, and Carbon.

This is the main window in Pi Calculator. It's options should be pretty self-explanatory.

This is the extended window in Pi Calculator. It shows the history function. You can enable this display by clicking the black disclosure triangle.

Pi Calculator is between 500KB and 1MB depending on the particular download. Pick the version you want from below.

68k (Requires at least a 68020 and Mac OS 7.6)
PowerPC (Works on any PowerPC Mac running Mac OS 7.6 through Mac OS 9.2.2)
Carbon (Works on Mac OS 8.6 through Mac OS X 10.2.x)

Apple Macintosh - The web designer's choice!
Content & Design © AlkSoft, 2004.

AlkSoft Home