runifpointOnLines {spatstat} | R Documentation |
Given a line segment pattern, generate a random point pattern
consisting of n
points uniformly distributed on the
line segments.
runifpointOnLines(n, L)
n |
Number of points to generate. |
L |
Line segment pattern (object of class "psp" )
on which the points should lie.
|
This command generates a point pattern consisting of n
independent random points, each point uniformly distributed on
the line segment pattern. This means that, for each random point,
A point pattern (object of class "ppp"
) with the same
window as L
.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
psp
,
ppp
,
pointsOnLines
,
runifpoint
X <- psp(runif(10), runif(10), runif(10), runif(10), window=owin()) Y <- runifpointOnLines(20, X) plot(X, main="") plot(Y, add=TRUE)