runif.basic.tri {pcds}R Documentation

Generation of Uniform Points in the standard basic triangle

Description

An object of class "Uniform". Generates n points uniformly in the standard basic triangle T_b=T((0,0),(1,0),(c_1,c_2)) where c_1 is in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

Any given triangle can be mapped to the basic triangle by a combination of rigid body motions (i.e., translation, rotation and reflection) and scaling, preserving uniformity of the points in the original triangle (Ceyhan (2005); Ceyhan et al. (2007); Ceyhan et al. (2006)). Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.

Usage

runif.basic.tri(n, c1, c2)

Arguments

n

A positive integer representing the number of uniform points to be generated in the standard basic triangle.

c1, c2

Positive real numbers representing the top vertex in standard basic triangle T_b=T((0,0),(1,0),(c_1,c_2)), c_1 must be in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

Value

A list with the elements

type

The type of the pattern from which points are to be generated

mtitle

The "main" title for the plot of the point pattern

tess.points

The vertices of the support of the uniformly generated points, it is the standard basic triangle T_b for this function

gen.points

The output set of generated points uniformly in the standard basic triangle

out.region

The outer region which contains the support region, NULL for this function.

desc.pat

Description of the point pattern from which points are to be generated

num.points

The vector of two numbers, which are the number of generated points and the number of vertices of the support points (here it is 3).

txt4pnts

Description of the two numbers in num.points.

xlimit, ylimit

The ranges of the x- and y-coordinates of the support, Tb

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E, Priebe CE, Marchette DJ (2007). “A new family of random graphs for testing spatial segregation.” Canadian Journal of Statistics, 35(1), 27-50.

Ceyhan E, Priebe CE, Wierman JC (2006). “Relative density of the random r-factor proximity catch digraphs for testing spatial patterns of segregation and association.” Computational Statistics & Data Analysis, 50(8), 1925-1964.

See Also

runif.std.tri, runif.tri, and runif.multi.tri

Examples


c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C);
n<-100

set.seed(1)
runif.basic.tri(1,c1,c2)
Xdt<-runif.basic.tri(n,c1,c2)
Xdt
summary(Xdt)
plot(Xdt)

Xp<-runif.basic.tri(n,c1,c2)$g

Xlim<-range(Tb[,1])
Ylim<-range(Tb[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]

plot(Tb,xlab="",ylab="",xlim=Xlim+xd*c(-.01,.01),
ylim=Ylim+yd*c(-.01,.01),type="n")
polygon(Tb)
points(Xp)



[Package pcds version 0.1.8 Index]