runif.basic.tri | R Documentation |
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 (\insertCiteceyhan:Phd-thesis,ceyhan:arc-density-CS,ceyhan:arc-density-PE;textualpcds). Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.
runif.basic.tri(n, c1, c2)
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
|
A list
with the elements
type |
The type of the pattern from which points are to be generated |
mtitle |
The |
tess.points |
The vertices of the support
of the uniformly generated points,
it is the standard basic triangle |
gen.points |
The output set of generated points uniformly in the standard basic triangle |
out.region |
The outer region which contains the support region,
|
desc.pat |
Description of the point pattern from which points are to be generated |
num.points |
The |
txt4pnts |
Description of the two numbers in |
xlimit , ylimit |
The ranges of the |
Elvan Ceyhan
runif.std.tri
, runif.tri
,
and runif.multi.tri
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.