TOPICS
Search

Triangle Line Picking


Isosceles triangle triangle line picking

Consider the average length of a line segment determined by two points picked at random in the interior of an arbitrary triangle Delta(a,b,c) with side lengths a, b, and c. This problem is not affine, but a simple formula in terms of the area or linear properties of the original triangle can be found using Borel's overlap technique to collapse the quadruple integral to a double integral and then convert to polar coordinates, leading to the beautiful general formula

l^__(Delta(a,b,c))=(4ss_as_bs_c)/(15)[1/(a^3)ln(s/(s_a))+1/(b^3)ln(s/(s_b))+1/(c^3)ln(s/(s_c))]+(a+b+c)/(15)+((b+c)(b-c)^2)/(30a^2)+((c+a)(c-a)^2)/(30b^2)+((a+b)(a-b)^2)/(30c^2)
(1)

(A. G. Murray, pers. comm., Apr. 4, 2020), where s=(a+b+c)/2 is the semiperimeter and s_i=s-i. The formulas for odd moments have a similar form to that of the mean but with higher powers of a, b, c, and the triangle area Delta=sqrt(ss_as_bs_c).

This formula immediately gives the special cases obtained below originally using brute-force computer algebra.

Equilateral triangle line picking
EquilateralTriangleLinePickingDistribution

If the original triangle is chosen to be an equilateral triangle with unit side lengths, then the average length of a line with endpoints chosen at random inside it is given by

l^__(Delta(1,1,1))=(int_0^1int_0^1int_0^(sqrt(3)(1/2-|x_1-1/2|))int_0^(sqrt(3)(1/2-|x_2-1/2|))sqrt((x_1^2-x_2^2)^2+(y_1^2-y_2^2)^2)dy_2dy_1dx_2dx_1)/(int_0^1int_0^1int_0^(sqrt(3)(1/2-|x_1-1/2|))int_0^(sqrt(3)(1/2-|x_2-1/2|))dy_2dy_1dx_2dx_1)
(2)
=(16)/3int_0^1int_0^1int_0^(sqrt(3)(1/2-|x_1-1/2|))int_0^(sqrt(3)(1/2-|x_2-1/2|))sqrt((x_1^2-x_2^2)^2+(y_1^2-y_2^2)^2)dy_2dy_1dx_2dx_1.
(3)
TriangleLinePickingRegions

The integrand can be split up into the four pieces

I_1=int_0^(1/2)int_0^(1/2)int_0^(x_1sqrt(3))int_0^(x_2sqrt(3))sqrt((x_1^2-x_2^2)^2+(y_1^2-y_2^2)^2)dy_2dy_1dx_2dx_1
(4)
I_2=int_0^(1/2)int_(1/2)^1int_0^(x_1sqrt(3))int_0^((1-x_2)sqrt(3))sqrt((x_1^2-x_2^2)^2+(y_1^2-y_2^2)^2)dy_2dy_1dx_2dx_1
(5)
I_3=int_(1/2)^1int_0^(1/2)int_0^((1-x_1)sqrt(3))int_0^(x_2sqrt(3))sqrt((x_1^2-x_2^2)^2+(y_1^2-y_2^2)^2)dy_2dy_1dx_2dx_1
(6)
I_4=int_(1/2)^1int_(1/2)^1int_0^((1-x_1)sqrt(3))int_0^((1-x_2)sqrt(3))sqrt((x_1^2-x_2^2)^2+(y_1^2-y_2^2)^2)dy_2dy_1dx_2dx_1.
(7)

As illustrated above, symmetry immediately gives I_2=I_3 and I_1=I_4, so

 l^__(eq.)=(32)/3(I_1+I_2).
(8)

With some effort, the integrals I_1 and I_2 can be done analytically to give the final beautiful result

l^__(Delta(1,1,1))=1/(20)(4+3ln3)
(9)
=0.364791843300...
(10)

(OEIS A093064; E. W. Weisstein, Mar. 16, 2004).

IsoscelesRightTriangleLinePickingDistribution

If the original triangle is chosen to be an isosceles right triangle with unit legs, then the average length of a line with endpoints chosen at random inside it is given by

l^__(Delta(1,1sqrt(2)))=4int_0^1int_0^1int_0^(1-x_1)int_0^(1-x_2)sqrt((x_1-x_2)^2+(y_1-y_2)^2)dy_2dy_1dx_2dx_1
(11)
=1/(30)[2+4sqrt(2)+(4+sqrt(2))sinh^(-1)1]
(12)
=1/(60)(4+8sqrt(2)+sqrt(2)cosh^(-1)3+8sinh^(-1)1)
(13)
=0.414293...
(14)

(OEIS A093063; M. Trott, pers. comm., Mar. 10, 2004), which is numerically surprisingly close to sqrt(2)-1=0.414213....

The mean length of a line segment picked at random in a 3, 4, 5 triangle is given by

l^__(Delta(3,4,5))=(341)/(375)+(48)/5((ln2)/(3^3)+(ln3)/(4^3)+(ln6)/(5^3))
(15)
=(341)/(375)+(2432ln2)/(5625)+(567ln3)/(2500)
(16)
=1.4581846...
(17)

(E. W. Weisstein, Aug. 6-9, 2010; OEIS A180307).

The mean length of a line segment picked at random in a 30-60-90 triangle with unit hypotenuse was computed by E. W. Weisstein (Aug. 5, 2010) as a complicated analytic expression involving sums of logarithms. After simplification, the result can be written as

l^__(30-60-90)=(17)/(20)+(sqrt(3))/(40)+(9ln3)/(160)+(9+8sqrt(3))/(720)ln(2+sqrt(3))
(18)
=0.2885717...
(19)

(E. Weisstein, M. Trott, A. Strzebonski, pers. comm., Aug. 25, 2010; OEIS A180308).

The expected distance from a random point in a general triangle to the vertex A opposite the side of length a is

 d_(Delta(a,b,c),A)=(4s(s-a)(s-b)(s-c))/(3a^3)ln(s/(s_a))+(b+c)/6+((b+c)(b-c)^2)/(6a^2)
(20)

(A. G. Murray, pers. comm., Apr. 4, 2020), with analogous expressions for d_(Delta(a,b,c),B) and d_(Delta(a,b,c),C). These give the beautiful identity

 l_(Delta(a,b,c))=1/5[d_(Delta(a,b,c),A)+d_(Delta(a,b,c),B)+d_(Delta(a,b,c),C)]
(21)

(A. G. Murray, pers. comm., Apr. 4, 2020).


See also

Equilateral Triangle, Isosceles Right Triangle, Square Line Picking, Triangle Point Picking, Triangle Triangle Picking

Explore with Wolfram|Alpha

References

Pure, R.; Durrani, S.; Tong, F.; and Pan, J. "Distance Distribution Between Two Random Points in Arbitrary Polygons." Math. Meth. Appl. Sci. 45, 2760-2775, 2022. https://doi.org/10.1002/mma.7951.Sheng, T. .K. "The Distance between Two Random Points in Plane Regions." Adv. Appl. Prob. 17, 748-773, 1985.Sloane, N. J. A. Sequences A093063, A093064, A180307, and A180308 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Triangle Line Picking

Cite this as:

Weisstein, Eric W. "Triangle Line Picking." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/TriangleLinePicking.html

Subject classifications