An object of class "Extrema"
.
Returns the closest data points among the data set, Xp
,
to edge M
-vertex region
Vertex regions are based on center
Any given triangle can be mapped to the standard 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. Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.
See also (ceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:dom-num-NPE-Spat2011;textualpcds).
cl2edges.vert.reg.basic.tri(Xp, c1, c2, M)
A list
with the elements
Vertex labels are
A short description of the distances
as "Distances to Edges in the Respective \eqn{M}-Vertex Regions"
.
Type of the extrema points
A short description of the extrema points
The "main"
title for the plot of the extrema
The extrema points, here, closest points to edges in the corresponding vertex region.
The input data, Xp
,
can be a matrix
or data frame
The number of data points, i.e., size of Xp
Support of the data points, here, it is
The center point used for construction of vertex regions
Name of the center, cent
,
it is "M"
or "CC"
for this function
Vertex regions inside the triangle,
Names of the vertex regions
as "vr=1"
, "vr=2"
, and "vr=3"
Centers of mass of the vertex regions
inside
Distances of closest points in the vertex regions to corresponding edges.
A set of 2D points representing the set of data points.
Positive real numbers
which constitute the vertex of the standard basic triangle
adjacent to the shorter edges;
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
Elvan Ceyhan
cl2edgesCMvert.reg
, cl2edgesMvert.reg
,
and cl2edges.std.tri
# \donttest{
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C);
set.seed(1)
n<-20
Xp<-runif.basic.tri(n,c1,c2)$g
M<-as.numeric(runif.basic.tri(1,c1,c2)$g) #try also M<-c(.6,.3)
Ext<-cl2edges.vert.reg.basic.tri(Xp,c1,c2,M)
Ext
summary(Ext)
plot(Ext)
cl2e<-Ext
Ds<-prj.cent2edges.basic.tri(c1,c2,M)
Xlim<-range(Tb[,1],Xp[,1])
Ylim<-range(Tb[,2],Xp[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(Tb,pch=".",xlab="",ylab="",
main="Closest Points in M-Vertex Regions \n to the Opposite Edges",
axes=TRUE,xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Tb)
points(Xp,pch=1,col=1)
L<-rbind(M,M,M); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)
points(cl2e$ext,pch=3,col=2)
xc<-Tb[,1]+c(-.02,.02,0.02)
yc<-Tb[,2]+c(.02,.02,.02)
txt.str<-c("A","B","C")
text(xc,yc,txt.str)
txt<-rbind(M,Ds)
xc<-txt[,1]+c(-.02,.04,-.03,0)
yc<-txt[,2]+c(-.02,.02,.02,-.03)
txt.str<-c("M","D1","D2","D3")
text(xc,yc,txt.str)
# }
Run the code above in your browser using DataLab