[Math] How to compute the average distance till intersection within a triangle in $\mathbb{R}^2$

computational geometryeuclidean-geometrymg.metric-geometrytriangles

You are given 3 points in $\mathbb{R}^2$; $A$, $B$, $C$ forming a triangle with area > 0. You pick an arbitrary point inside $ABC$ and an arbitrary direction. After some distance $d$, you will intersect some side of a triangle. The task is to compute the expected $d$ for a given triangle. Also, it would be nice to know the whole distribution. What kind of distribution (e.g. uniform, normal) would it be?

Next, what if I have a complex polygon? Can I combine my knowledge from individual triangles somehow to compute mean and distribution for the convex polygon?

Finally, how about a non-convex polygon?

Best Answer

If you call the random variable you described X, then it's much easier to compute the expected value of X2. Indeed, for any point P inside triangle ABC, the expected value of X2 where X is the length of a ray through P intersected with the interior of ABC is just the area of ABC divided by π—imagine trying to compute the area of ABC using polar coordinates with origin at P.

You can use a similar trick to write the expected value of X in terms of the average value of 1/d(P, Q) where P and Q are selected uniformly at random from the interior of triangle ABC, but this doesn't seem terribly helpful.

Related Question