Place Points Evenly Along Specified Lines
Given a line segment pattern, place a series of points at equal distances along each line segment.
pointsOnLines(X, eps = NULL, np = 1000)
- A line segment pattern (object of class
- Spacing between successive points.
- Approximate total number of points (incompatible with
For each line segment in the pattern
X, a succession of points
is placed along the line segment. These points are equally spaced at
eps, except for the first and last points
in the sequence.
eps is measured in coordinate units of
eps is not given, then it is determined by
eps = len/np where
len is the total length of the
X. The actual number of points will then be slightly
- A point pattern (object of class
"ppp") in the same window as
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="+")