# A library to compute the density of the distance between a point and a   random variable uniformly distributed in some sets

**Authors:** Vincent Guigues

arXiv: 1906.00958 · 2019-06-06

## TL;DR

This paper introduces a new algorithm for computing the density of the distance from a point to a uniformly distributed random variable in a polygon, matching the complexity of previous methods but based on triangulation.

## Contribution

It presents an alternative triangulation-based algorithm for the same problem, implemented in an open source library, expanding computational options for this geometric probability task.

## Key findings

- Algorithm has complexity nlog(n)
- Provides an open source implementation
- Offers an alternative to Green's theorem-based method

## Abstract

In [3], algorithms to compute the density of the distance to a random variable uniformly distributed in (a) a ball, (b) a disk, (c) a line segment, or (d) a polygone were introduced. For case (d), the algorithm, based on Green's theorem, has complexity nlog(n) where n is the number of vertices of the polygone. In this paper, we present for case (d) another algorithm with the same complexity, based on a triangulation of the polygone. We also describe an open source library providing this algorithm as well as the algorithms from [3].   [3] V. Guigues, Computation of the cumulative distribution function of the Euclidean distance between a point and a random variable uniformly distributed in disks, balls, or polyhedrons and application to Probabilistic Seismic Hazard Analysis, arXiv, available at arXiv:1809.02007, 2015.

---
Source: https://tomesphere.com/paper/1906.00958