How to compute the average distance till intersection within a triangle in R^2? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-22T11:01:18Z http://mathoverflow.net/feeds/question/10461 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/10461/how-to-compute-the-average-distance-till-intersection-within-a-triangle-in-r2 How to compute the average distance till intersection within a triangle in R^2? unknown (google) 2010-01-02T04:36:43Z 2010-01-03T00:29:09Z <p>Lots of simple questions because I am a noob.</p> <p>You are given 3 points in 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?</p> <p>Next, what if I have a complex polygon? Can I combine my knowledge from individual triangles somehow to compute mean and distr. for the convex polygon?</p> <p>Finally, how about a non-convex polygon?</p> http://mathoverflow.net/questions/10461/how-to-compute-the-average-distance-till-intersection-within-a-triangle-in-r2/10465#10465 Answer by Suresh Venkat for How to compute the average distance till intersection within a triangle in R^2? Suresh Venkat 2010-01-02T04:55:18Z 2010-01-02T04:55:18Z <p>For a triangle, this seems relatively easy. construct the voronoi diagram of the sides, which in this case is merely the partition formed by the angle bisectors at each vertex. they intersect at the center of the incircle, forming three triangles. In each triangle, the 'distance to boundary' is really the distance to the corresponding side of the original triangle, and the answer is a straight integration. </p> http://mathoverflow.net/questions/10461/how-to-compute-the-average-distance-till-intersection-within-a-triangle-in-r2/10466#10466 Answer by S. Donovan for How to compute the average distance till intersection within a triangle in R^2? S. Donovan 2010-01-02T04:59:43Z 2010-01-02T05:17:32Z <p>x is in the triangle. Draw segments that connect x to each vertex and segments perpendicular to each side from x. Then, starting from the nearest perpendicular segment, measure the angle formed by your vector and call it $\theta$. Note the length of the perpendicular, call it R. Then the distance, from x to the side in the direction of the vector, is: $R \sec (\theta)$.</p> http://mathoverflow.net/questions/10461/how-to-compute-the-average-distance-till-intersection-within-a-triangle-in-r2/10467#10467 Answer by Michael Lugo for How to compute the average distance till intersection within a triangle in R^2? Michael Lugo 2010-01-02T05:04:42Z 2010-01-02T05:04:42Z <p>We can start by solving the problem for an arbitrary triangle and a <i>fixed</i> direction, say the upward direction, as we can always rotate the whole figure into that position.</p> <p>In the generic case, no edge of the triangle is horizontal. Thus the triangle has a "top" vertex at (0, 0) -- this is the vertex with the largest y-coordinate. Without loss of generality, rescale so that the edge opposite the vertex at (0, 0) passes through (-1, 0). We'll say that the "height" of this triangle is 1, where by height we <i>mean</i> the length of the vertical dropped from the top vertex.</p> <p>Then the set of points of vertical distance at least r from the top of the original triangle form a triangle of height 1-r, similar to the original triangle. Thus</p> <p>$$Prob(\hbox{vertical distance from top } &gt; r) = (1-r)^2$$</p> <p>and this gives the distribution. In particular the expected value of the vertical distance from a random point to the top of the triangle (after the rescaling given above) is 1/3.</p> <p>If you want to pick a <i>random</i> direction, though, then this gets a lot harder because the rescaling step will act differently for different directions.</p> http://mathoverflow.net/questions/10461/how-to-compute-the-average-distance-till-intersection-within-a-triangle-in-r2/10469#10469 Answer by Reid Barton for How to compute the average distance till intersection within a triangle in R^2? Reid Barton 2010-01-02T05:52:10Z 2010-01-02T05:52:10Z <p>If you call the random variable you described X, then it's much easier to compute the expected value of X<sup>2</sup>. Indeed, for any point P inside triangle ABC, the expected value of X<sup>2</sup> where X is the length of a ray through P intersected with the interior of ABC is just the area of ABC divided by &pi;&mdash;imagine trying to compute the area of ABC using polar coordinates with origin at P.</p> <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.</p>