| rassoc.circular | R Documentation |
An object of class "Patterns".
Generates n 2D points uniformly
in (a_1-e,a_1+e) \times (a_1-e,a_1+e) \cap U_i B(y_i,e)
(a_1 and b1 are denoted as
a1 and b1 as arguments)
where Y_p=(y_1,y_2,\ldots,y_{n_y}) with
n_y being number of Yp points
for various values of e under the association pattern
and B(y_i,e) is the ball centered at y_i with radius e.
e must be positive
and very large values of e provide patterns close to CSR.
a1 is defaulted
to the minimum of the x-coordinates of the Yp points,
a2 is defaulted
to the maximum of the x-coordinates of the Yp points,
b1 is defaulted
to the minimum of the y-coordinates of the Yp points,
b2 is defaulted
to the maximum of the y-coordinates of the Yp points.
This function is also very similar to rassoc.matern,
where rassoc.circular
needs the study window to be specified,
while rassoc.matern does not.
rassoc.circular(
n,
Yp,
e,
a1 = min(Yp[, 1]),
a2 = max(Yp[, 1]),
b1 = min(Yp[, 2]),
b2 = max(Yp[, 2])
)
n |
A positive integer representing the number of points to be generated. |
Yp |
A set of 2D points representing the reference points. The generated points are associated (in a circular or radial fashion) with these points. |
e |
A positive real number
representing the radius of the balls centered at |
a1, a2 |
Real numbers
representing the range of |
b1, b2 |
Real numbers
representing the range of |
A list with the elements
type |
The type of the point pattern |
mtitle |
The |
parameters |
Radial attraction parameter of the association pattern |
ref.points |
The input set of attraction points |
gen.points |
The output set of generated points
associated with |
tri.Yp |
Logical output for triangulation
based on |
desc.pat |
Description of the point pattern |
num.points |
The |
xlimit,ylimit |
The possible range of the |
Elvan Ceyhan
rseg.circular, rassoc.std.tri,
rassocII.std.tri, rassoc.matern,
and rassoc.multi.tri
## Not run:
nx<-100; ny<-4; #try also nx<-1000; ny<-10;
e<-.15;
#with default bounding box (i.e., unit square)
Y<-cbind(runif(ny),runif(ny))
Xdt<-rassoc.circular(nx,Y,e)
Xdt
summary(Xdt)
plot(Xdt,asp=1)
Xdt<-Xdt$gen.points
Xlim<-range(Xdt[,1],Y[,1]);
Ylim<-range(Xdt[,2],Y[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(Y,asp=1,xlab="x",ylab="y",
main="Circular Association of X points with Y Points",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01),
pch=16,col=2,lwd=2)
points(Xdt)
#with default bounding box (i.e., unit square)
Xlim<-range(Xdt[,1],Y[,1]);
Ylim<-range(Xdt[,2],Y[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(Y,asp=1,xlab="x",ylab="y",
main="Circular Association of X points with Y Points",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01),pch=16,
col=2,lwd=2)
points(Xdt)
#with a rectangular bounding box
a1<-0; a2<-10;
b1<-0; b2<-5;
e<-1.1; #try also e<-5; #pattern very close to CSR!
Y<-cbind(runif(ny,a1,a2),runif(ny,b1,b2))
#try also Y<-cbind(runif(ny,a1,a2/2),runif(ny,b1,b2/2))
Xdt<-rassoc.circular(nx,Y,e,a1,a2,b1,b2)$gen.points
Xlim<-range(Xdt[,1],Y[,1]);
Ylim<-range(Xdt[,2],Y[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(Y,asp=1,xlab="x",ylab="y",
main="Circular Association of X points with Y Points",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01),
pch=16,col=2,lwd=2)
points(Xdt)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.