# pointsOnLines

From spatstat v1.20-2
by Adrian Baddeley

##### Place Points Evenly Along Specified Lines

Given a line segment pattern, place a series of points at equal distances along each line segment.

##### Usage

`pointsOnLines(X, eps = NULL, np = 1000)`

##### Arguments

- X
- A line segment pattern (object of class
`"psp"`

). - eps
- Spacing between successive points.
- np
- Approximate total number of points (incompatible with
`eps`

).

##### Details

For each line segment in the pattern `X`

, a succession of points
is placed along the line segment. These points are equally spaced at
a distance `eps`

, except for the first and last points
in the sequence.

The spacing `eps`

is measured in coordinate units of `X`

.
If `eps`

is not given, then it is determined by
`eps = len/np`

where `len`

is the total length of the
segments in `X`

. The actual number of points will then be slightly
larger than `np`

.

##### Value

- A point pattern (object of class
`"ppp"`

) in the same window as`X`

.

##### See Also

##### Examples

```
X <- psp(runif(20), runif(20), runif(20), runif(20), window=owin())
Y <- pointsOnLines(X, eps=0.05)
plot(X, main="")
plot(Y, add=TRUE, pch="+")
```

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

### Community examples

Looks like there are no examples yet.