Buffon's needle problem visualized
17 points
2 days ago
| 2 comments
| ivanludvig.dev
| HN
millipede
6 hours ago
[-]
Picking a random orientation depends on trigonometric functions. In order for this to calculate, it would be a lot cooler if it didn't depend on transcendental functions.
reply
LegionMammal978
3 hours ago
[-]
You can pick a uniform random orientation without trig functions by first generating a random point in the unit disk via rejection sampling, then projecting it onto the boundary [0].

Of course, using rejection sampling for disk points will give you an estimate for π more directly.

[0] https://mathworld.wolfram.com/CirclePointPicking.html

reply
IvanLudvig
2 days ago
[-]
reply