NPEtri: The vertices of the Proportional Edge (PE) Proximity Region...

View source: R/PropEdge2D.R

NPEtriR Documentation

The vertices of the Proportional Edge (PE) Proximity Region in a general triangle

Description

Returns the vertices of the PE proximity region (which is itself a triangle) for a point in the triangle tri=T(A,B,C)=(rv=1,rv=2,rv=3).

PE proximity region is defined with respect to the triangle tri with expansion parameter r \ge 1 and vertex regions based on center M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of the triangle tri or based on the circumcenter of tri; default is M=(1,1,1), i.e., the center of mass of tri.

Vertex regions are labeled as 1,2,3 rowwise for the vertices of the triangle tri. rv is the index of the vertex region p resides, with default=NULL. If p is outside of tri, it returns NULL for the proximity region.

See also (\insertCiteceyhan:Phd-thesis,ceyhan:arc-density-PE,ceyhan:dom-num-NPE-Spat2011;textualpcds).

Usage

NPEtri(p, tri, r, M = c(1, 1, 1), rv = NULL)

Arguments

p

A 2D point whose PE proximity region is to be computed.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

r

A positive real number which serves as the expansion parameter in PE proximity region; 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 triangle tri or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

rv

Index of the M-vertex region containing the point p, either 1,2,3 or NULL (default is NULL).

Value

Vertices of the triangular region which constitutes the PE proximity region with expansion parameter r and center M for a point p

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

NPEbasic.tri, NAStri, NCStri, and IarcPEtri

Examples

## Not run: 
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);

M<-as.numeric(runif.tri(1,Tr)$g)  #try also M<-c(1.6,1.0)

r<-1.5

n<-3
set.seed(1)
Xp<-runif.tri(n,Tr)$g

NPEtri(Xp[3,],Tr,r,M)

P1<-as.numeric(runif.tri(1,Tr)$g)  #try also P1<-c(.4,.2)
NPEtri(P1,Tr,r,M)

M<-c(1.3,1.3)
r<-2

P1<-c(1.4,1.2)
P2<-c(1.5,1.26)
NPEtri(P1,Tr,r,M)
NPEtri(P2,Tr,r,M)

#or try
Rv<-rel.vert.tri(P1,Tr,M)$rv
NPEtri(P1,Tr,r,M,Rv)

## End(Not run)


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