| rseg.std.tri | R Documentation | 
T_eAn 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 I segregation alternative for eps
in (0,\sqrt{3}/3=0.5773503].
In the type I segregation, the triangular forbidden regions
around the vertices are determined by
the parameter eps
which serves as the height of these triangles
(see examples for a sample plot.)
See also (\insertCiteceyhan:arc-density-PE,ceyhan:arc-density-CS,ceyhan:dom-num-NPE-Spat2011;textualpcds).
rseg.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 I segregation (which is the height of the triangular forbidden regions around the vertices).  | 
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,
rsegII.std.tri, and rseg.multi.tri
## Not run: 
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C);
n<-100
eps<-.3  #try also .15, .5, .75
set.seed(1)
Xdt<-rseg.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,asp=1,pch=".",xlab="",ylab="",
main="Type I 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 I segregation alternative
sr<-eps/(sqrt(3)/2)
C1<-C+sr*(A-C); C2<-C+sr*(B-C)
A1<-A+sr*(B-A); A2<-A+sr*(C-A)
B1<-B+sr*(A-B); B2<-B+sr*(C-B)
supp<-rbind(A1,B1,B2,C2,C1,A2)
plot(Te,asp=1,pch=".",xlab="",ylab="",
main="Support of the Type I Segregation",
     xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
if (sr<=.5)
{
  polygon(Te)
  polygon(supp,col=5)
} else
{
  polygon(Te,col=5,lwd=2.5)
  polygon(rbind(A,A1,A2),col=0,border=NA)
  polygon(rbind(B,B1,B2),col=0,border=NA)
  polygon(rbind(C,C1,C2),col=0,border=NA)
}
points(Xp)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.