Originally Posted By: Shannow
Saw an absolute revelation the other day.
And am now going to sit down and do it.
have a co-ordinate box, 0,0 to 1,1...area 1 square units.
Throw a huge number of random co-ordinates into the box (I don't think that they need to be random, but that was the premise of it).
Take each and every co-ordinate, and calculate the square root of the (X^2xY^2), i.e the distance from 0,0.
If it's less than, it goes in one bucket. Greater than, the other bucket. The "exactly" 1 gets distributed in the ratio of the buckets.
The first bucket is an approximation to pi/4.
More random numbers (or IMO the tighter the grid), the closer you are.
i'm going to do that now. to test. I have an idea in my mind of why works. i did stochastic processes a long time ago at uni.