Get the latest tech news
Randomly selecting points inside a triangle
How to uniformly sample points from a triangle. One method that seems plausible but isn't uniform, and a clever method that is uniform.
Generate random numbers α, β, and γ from the interval [0, 1]. The method is fairly efficient; on average only half the points will be rejected. Every sample point will either land inside the original triangle or in its flipped twin.
Or read this on Hacker News