IarcPEset2pnt.std.tri: The indicator for the presence of an arc from a point in set...

View source: R/PropEdge2D.R

IarcPEset2pnt.std.triR Documentation

The indicator for the presence of an arc from a point in set S to the point p or Proportional Edge Proximity Catch Digraphs (PE-PCDs) - standard equilateral triangle case

Description

Returns I(p in N_{PE}(x,r) for some x in S) for S, in the standard equilateral triangle, that is, returns 1 if p is in \cup_{x in S}N_{PE}(x,r), and returns 0 otherwise.

PE proximity region is constructed with respect to the standard equilateral triangle T_e=T(A,B,C)=T((0,0),(1,0),(1/2,\sqrt{3}/2)) with the expansion parameter r \ge 1 and vertex regions are based on center M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of T_e; default is M=(1,1,1), i.e., the center of mass of T_e (which is equivalent to the circumcenter for T_e).

Vertices of T_e are also labeled as 1, 2, and 3, respectively. If p is not in S and either p or all points in S are outside T_e, it returns 0, but if p is in S, then it always returns 1 regardless of its location (i.e., loops are allowed).

Usage

IarcPEset2pnt.std.tri(S, p, r, M = c(1, 1, 1))

Arguments

S

A set of 2D points. Presence of an arc from a point in S to point p is checked by the function.

p

A 2D point. Presence of an arc from a point in S to point p is checked by the function.

r

A positive real number which serves as the expansion parameter in PE proximity region in the standard equilateral triangle T_e=T((0,0),(1,0),(1/2,\sqrt{3}/2)); must be \ge 1.

M

A 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of the standard equilateral triangle T_e; default is M=(1,1,1) i.e., the center of mass of T_e.

Value

I(p is in U_x in S N_{PE}(x,r)) for S in the standard equilateral triangle, that is, returns 1 if p is in S or inside N_{PE}(x,r) for at least one x in S, and returns 0 otherwise. PE proximity region is constructed with respect to the standard equilateral triangle T_e=T(A,B,C)=T((0,0),(1,0),(1/2,\sqrt{3}/2)) with M-vertex regions

Author(s)

Elvan Ceyhan

See Also

IarcPEset2pnt.tri, IarcPEstd.tri, IarcPEtri, and IarcCSset2pnt.std.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<-10

set.seed(1)
Xp<-runif.std.tri(n)$gen.points

M<-as.numeric(runif.std.tri(1)$g)  #try also M<-c(.6,.2)

r<-1.5

S<-rbind(Xp[1,],Xp[2,])  #try also S<-c(.5,.5)
IarcPEset2pnt.std.tri(S,Xp[3,],r,M)
IarcPEset2pnt.std.tri(S,Xp[3,],r=1,M)

S<-rbind(Xp[1,],Xp[2,],Xp[3,],Xp[5,])
IarcPEset2pnt.std.tri(S,Xp[3,],r,M)

IarcPEset2pnt.std.tri(S,Xp[6,],r,M)
IarcPEset2pnt.std.tri(S,Xp[6,],r=1.25,M)

P<-c(.4,.2)
S<-Xp[c(1,3,4),]
IarcPEset2pnt.std.tri(Xp,P,r,M)

## End(Not run)


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