# runifdisc

From spatstat v1.25-1
by Adrian Baddeley

##### Generate N Uniform Random Points in a Disc

Generate a random point pattern containing $n$ independent uniform random points in a circular disc.

##### Usage

`runifdisc(n, radius=1, centre=c(0,0), ...)`

##### Arguments

- n
- Number of points.
- radius
- Radius of the circle.
- centre
- Coordinates of the centre of the circle.
- ...
- Arguments passed to
`disc`

controlling the accuracy of approximation to the circle.

##### Details

This function generates `n`

independent random points,
uniformly distributed in a circular disc.

It is faster (for a circular window) than the general
code used in `runifpoint`

.

To generate random points in an ellipse, first generate points in a
circle using `runifdisc`

,
then transform to an ellipse using `affine`

,
as shown in the examples.
To generate random points in other windows, use
`runifpoint`

.
To generate non-uniform random points, use `rpoint`

.

##### Value

- The simulated point pattern (an object of class
`"ppp"`

).

##### See Also

##### Examples

```
# 100 random points in the unit disc
plot(runifdisc(100))
# 42 random points in the ellipse with major axis 3 and minor axis 1
X <- runifdisc(42)
Y <- affine(X, mat=diag(c(3,1)))
plot(Y)
```

*Documentation reproduced from package spatstat, version 1.25-1, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.