Returns the vertices of the PE proximity region (which is itself a triangle) for a point in the
standard basic triangle (rv=1,rv=2,rv=3)
.
PE proximity region is defined with respect
to the standard basic triangle
Vertex regions are labeled as 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 (ceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds).
NPEbas.tri(p, r, c1, c2, M = c(1, 1, 1), rv = NULL)
Vertices of the triangular region which constitutes the PE proximity region with expansion parameter
r and center M
for a point p
A 2D point whose PE proximity region is to be computed.
A positive real number which serves as the expansion parameter in PE proximity region;
must be
Positive real numbers representing the top vertex in standard basic triangle
A 2D point in Cartesian coordinates or a 3D point in barycentric coordinates
which serves as a center in the interior of the standard basic triangle
Index of the M
-vertex region containing the point p
, either 1,2,3
or NULL
(default is NULL
).
Elvan Ceyhan
NPEtri
, NAStri
, NCStri
and IndNPEbas.tri
if (FALSE) {
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C);
M<-as.numeric(runif.bas.tri(1,c1,c2)$g) #try also M<-c(.6,.2)
r<-2
P1<-as.numeric(runif.bas.tri(1,c1,c2)$g) #try also P1<-c(.4,.2)
NPEbas.tri(P1,r,c1,c2,M)
#or try
Rv<-rv.bas.tri.cent(P1,c1,c2,M)$rv
NPEbas.tri(P1,r,c1,c2,M,Rv)
P1<-c(1.4,1.2)
P2<-c(1.5,1.26)
NPEbas.tri(P1,r,c1,c2,M) #gives an error if M=c(1.3,1.3)
#since center is not the circumcenter or not in the interior of the triangle
}
Run the code above in your browser using DataLab