TOPICS
Search

Triangle Point Picking


TrianglePointPickingWrong

Triangle point picking is the uniform selection by area of a random point inside a nondegenerate triangle. Given a triangle with one vertex at the origin and the others at positions v_1 and v_2, one might think that a random point inside the triangle would be given by

 x=a_1v_1+(1-a_1)a_2v_2,
(1)

where a_1 and a_2 are independent uniform variates in the interval [0,1]. This samples the triangle nonuniformly, concentrating points in the v_1 corner.

TrianglePointPickingTrilinears

Picking three independent uniform variates in [0,1] as proportional trilinear coordinates also does not produce uniform point spacing in the triangle. The resulting area density is greatest at the incenter.

TrianglePointPicking

To pick points uniformly distributed inside the triangle, instead pick

 x=a_1v_1+a_2v_2,
(2)

where a_1 and a_2 are independent uniform variates in the interval [0,1], which gives points uniformly distributed in the parallelogram spanned by v_1 and v_2 (left figure). Keep the points with a_1+a_2<=1. The remaining points can either be discarded or transformed by (a_1,a_2)|->(1-a_1,1-a_2) into the triangle interior (right figure).

The expected distance of a point picked at random inside an equilateral triangle of unit side length from the center of the triangle is

 d^__(center)=1/(72)[8sqrt(3)+3sinh^(-1)(sqrt(3))+ln(2+sqrt(3))],
(3)

and the expected distance from a fixed vertex is

 d^__(vertex)=1/(12)(4+3ln3).
(4)

The expected distance from the closest vertex is

 d^__(closest vertex)=(4+3ln3)/(12sqrt(3)),
(5)

while the expected distance from the farthest is

 d^__(farthest vertex)
 =1/(36)[27ln3+sqrt(3)(4+3ln3)-6sqrt(3)sinh^(-1)(sqrt(3))].
(6)

Picking n>=1 points independently and uniformly from a triangle with unit area gives a convex hull with expected area of

A(n)=1-2/(n+1)sum_(k=1)^(n)1/k
(7)
=1-(2H_n)/(n+1),
(8)

where n is an integer and H_n is a harmonic number (Buchta 1984, 1986). The first few values are 0, 0, 1/12, 1/6, 43/180, 3/10, 197/560, ... (OEIS A093762 and A002548), with A(n)=A093762(n)/A002548(n+1). This is a special case of simplex simplex picking.


See also

Disk Point Picking, Simplex Simplex Picking, Square Point Picking, Triangle Interior, Triangle Line Picking, Triangle Triangle Picking

Explore with Wolfram|Alpha

References

Buchta, C. "Zufallspolygone in konvexen Vielecken." J. reine angew. Math. 347, 212-220, 1984. https://doi.org/10.1515/crll.1984.347.212.Buchta, C. "A Note on the Volume of a Random Polytope in a Tetrahedron." Ill. J. Math. 30, 653-659, 1986. https://doi.org/10.1215/ijm/1256064237.Sloane, N. J. A. Sequences A002548 and A093762 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Triangle Point Picking

Cite this as:

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

Subject classifications