rassocII.std.tri: Generation of points associated (in a Type II fashion) with...

View source: R/PatternGen.R

rassocII.std.triR Documentation

Generation of points associated (in a Type II fashion) with the edges of T_e

Description

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 association alternative for eps in (0,\sqrt{3}/6=0.2886751].

In the type II association, the annular allowed regions around the edges are determined by the parameter eps where \sqrt{3}/6-eps is the distance from the interior triangle (i.e., forbidden region for association) to T_e (see examples for a sample plot.)

Usage

rassocII.std.tri(n, eps)

Arguments

n

A positive integer representing the number of points to be generated.

eps

A positive real number representing the parameter of type II association (where \sqrt{3}/6-eps is the distance from the interior triangle distance from the interior triangle to T_e).

Value

A list with the elements

type

The type of the point pattern

mtitle

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

parameters

The attraction parameter, eps, of the association pattern, where \sqrt{3}/6-eps is the distance from the interior triangle to T_e

ref.points

The input set of points Y; reference points, i.e., points with which generated points are associated (i.e., vertices of T_e).

gen.points

The output set of generated points associated with Y points (i.e., edges of T_e).

tri.Y

Logical output for triangulation based on Y points should be implemented or not. if TRUE triangulation based on Y points is to be implemented (default is set to FALSE).

desc.pat

Description of the point pattern

num.points

The vector of two numbers, which are the number of generated points and the number of reference (i.e., Y) points, which is 3 here.

xlimit,ylimit

The ranges of the x- and y-coordinates of the reference points, which are the vertices of T_e here.

Author(s)

Elvan Ceyhan

See Also

rseg.circular, rassoc.circular, rsegII.std.tri, and rseg.multi.tri

Examples

## Not run: 
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C);
n<-100  #try also n<-20 or n<-100 or 1000
eps<-.2  #try also .25, .1

set.seed(1)
Xdt<-rassocII.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 association 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 association alternative
A1<-c(1/2-eps*sqrt(3),sqrt(3)/6-eps);
B1<-c(1/2+eps*sqrt(3),sqrt(3)/6-eps);
C1<-c(1/2,sqrt(3)/6+2*eps);
supp<-rbind(A1,B1,C1)

plot(Te,asp=1,pch=".",xlab="",ylab="",
main="Support of the Type II Association",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
polygon(Te,col=5)
polygon(supp,col=0)
points(Xp)

## End(Not run)


elvanceyhan/pcds documentation built on June 29, 2023, 8:12 a.m.