rsegII.std.tri | R Documentation |
T_e
An object of class "Patterns"
.
Generates n
points uniformly
in the standard equilateral triangle
T_e=T((0,0),(1,0),(1/2,\sqrt{3}/2))
under the type II segregation alternative
for eps
in (0,\sqrt{3}/6=0.2886751]
.
In the type II segregation, the annular forbidden regions
around the edges are determined by
the parameter eps
which is the distance from the interior triangle
(i.e., support for the segregation)
to T_e
(see examples for a sample plot.)
rsegII.std.tri(n, eps)
n |
A positive integer representing the number of points to be generated. |
eps |
A positive real number
representing the parameter of type II segregation (which is the
distance from the interior triangle points to the boundary of |
A list
with the elements
type |
The type of the point pattern |
mtitle |
The |
parameters |
The exclusion parameter,
|
ref.points |
The input set of points |
gen.points |
The output set of generated points
segregated from |
tri.Y |
Logical output for triangulation
based on |
desc.pat |
Description of the point pattern |
num.points |
The |
xlimit , ylimit |
The ranges of the |
Elvan Ceyhan
rseg.circular
, rassoc.circular
,
rseg.std.tri
, and rseg.multi.tri
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C);
n<-10 #try also n<-20 or n<-100 or 1000
eps<-.15 #try also .2
set.seed(1)
Xdt<-rsegII.std.tri(n,eps)
Xdt
summary(Xdt)
plot(Xdt,asp=1)
Xlim<-range(Te[,1])
Ylim<-range(Te[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
Xp<-Xdt$gen.points
plot(Te,pch=".",xlab="",ylab="",
main="Type II segregation in the \n standard equilateral triangle",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
polygon(Te)
points(Xp)
#The support for the Type II segregation alternative
C1<-c(1/2,sqrt(3)/2-2*eps);
A1<-c(eps*sqrt(3),eps); B1<-c(1-eps*sqrt(3),eps);
supp<-rbind(A1,B1,C1)
plot(Te,asp=1,pch=".",xlab="",ylab="",
main="Support of the Type II Segregation",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
polygon(Te)
polygon(supp,col=5)
points(Xp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.