SMRTR Science & EngineeringSep 11, 2025Hacker News

Randomly selecting points inside a triangle

SMRTR summary

Random points can be generated inside a triangle using three methods: barycentric coordinates (which doesn't produce uniform distribution), accept-reject (which discards points outside the triangle), or accept-flip (which uses a mirrored triangle to avoid waste). The accept-flip method efficiently creates uniform random points by keeping all generated points, sometimes after flipping them from a twin triangle back to the original.

SMRTR provides this summary for quick context. The original article belongs to Hacker News.

Read the original article
SMRTR Science & Engineering

Get the next batch of curated summaries in your inbox.

This archive is built from SMRTR newsletter summaries. Subscribe for hand-picked stories without the extra noise.