Polytope examples in morphometer

Random polygon

This method simulates a random polygon. We choose random angles \theta_i \in [0,1] until \sum \theta_i > 2\pi. The coordinates of points x_i are then given by R_i \cdot(\cos(\theta_i), \sin(\theta_i)) where R_i are independent random radii between 0 and 150.
(Note that the intervals of \theta_i and R_i are arbitrarily chosen.)

Uniform distribution of points on the unit sphere

This method simulates N random points on the unit sphere by sampling N random angles theta in [0,2\pi). The coordinates of points are then given by (\cos(\theta), \sin(\theta)). The parameter N defines the number of points and R the radius of the sphere.

Random beta polygon

This method simulates a beta polygon created by N independent identically distributed random points with density

(1)   \begin{equation*}   f_\beta(x) = \frac{\beta + 1}{\pi} (1 - ||x||^2)^\beta \quad , \quad ||x|| < 1 \quad \textnormal{and} \quad x \in \mathrm{R}^2. \end{equation*}

For more details, see https://arxiv.org/pdf/1805.01338.pdf.

Here a short description of the simulation of the model:
* Choose the number of points N > 2
* Choose a parameter \beta > -1
* Sample N random angles \theta \in [0,2pi)
* Sample N radii r \in [0,1) that follow the probability density: 2 (\beta+1) r (1 - r^2)^\beta
by using the inverse transform sampling:
– simply draw a random number y uniformly from [0,1)
– then r = \sqrt{1-(1-y)^{(1/(\beta+1))}}
* Coordinates of points are then given by r*(cos(theta), sin(theta))