Last chance! 50% off unlimited learning
Sale ends in
An object of class "Extrema"
.
Returns the furthest data points among the data set, Dt
, in each tri
tri
.
ch.all.intri
is for checking whether all data points are inside tri
(default is FALSE
).
If some of the data points are not inside tri
and ch.all.intri=TRUE
, then the function yields
an error message.
If some of the data points are not inside tri
and ch.all.intri=FALSE
, then the function yields
the closest points to edges among the data points inside tri
(yields NA
if there are no data points
inside tri
).
See also (ceyhan:Phd-thesis,ceyhan:mcap2012;textualpcds).
fr2vVRCC(Dt, tri, ch.all.intri = FALSE)
A list
with the elements
Vertex labels are
A short description of the distances as "Distances from furthest points to ..."
.
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, furthest points from vertices in each tri
.
The input data, Dt
, can be a matrix
or data frame
The number of data points, i.e., size of Dt
Support of the data points, here, it is the triangle tri
for this function.
The center point used for construction of edge regions.
Name of the center, cent
, it is circumcenter "CC"
for this function
CC-Vertex regions inside the triangle, tri
, provided as a list
Names of the vertex regions as "vr=1"
, "vr=2"
, and "vr=3"
Centers of mass of the vertex regions inside tri
Distances from furthest points in each vertex region to the corresponding vertex
A set of 2D points representing the set of data points.
Three 2D points, stacked row-wise, each row representing a vertex of the triangle.
A logical argument (default=FALSE
) to check whether all data points are inside
the triangle tri
. So, if it is TRUE
,
the function checks if all data points are inside the closure of the triangle (i.e., interior and boundary
combined) else it does not.
Elvan Ceyhan
fr2vTbVRCC
, fr2eTeER
, Kfr2vTbVRCC
and Kfr2vVRCC
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10 #try also n<-20
set.seed(1)
dat<-runif.tri(n,Tr)$g
Ext<-fr2vVRCC(dat,Tr)
Ext
summary(Ext)
plot(Ext)
fr2vVRCC(dat[1,],Tr)
f2v<-fr2vVRCC(dat,Tr)
CC<-circ.cent.tri(Tr) #the circumcenter
D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2;
Ds<-rbind(D1,D2,D3)
Xlim<-range(Tr[,1],dat[,1])
Ylim<-range(Tr[,2],dat[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(Tr,xlab="",asp=1,ylab="",pch=".",axes=TRUE,xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Tr)
L<-matrix(rep(CC,3),ncol=2,byrow=TRUE); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)
points(dat)
points(rbind(f2v$ext),pch=4,col=2)
txt<-rbind(Tr,CC,Ds)
xc<-txt[,1]+c(-.06,.08,.05,.12,-.1,-.1,-.09)
yc<-txt[,2]+c(.02,-.02,.05,.0,.02,.06,-.04)
txt.str<-c("A","B","C","CC","D1","D2","D3")
text(xc,yc,txt.str)
fr2vVRCC(dat,Tr)
fr2vVRCC(c(1.4,1.2),Tr)
dat.fr<-data.frame(a=dat)
fr2vVRCC(dat.fr,Tr)
dat.fr<-data.frame(a=Tr)
fr2vVRCC(dat,dat.fr)
dat2<-rbind(dat,c(.2,.4))
fr2vVRCC(dat2,Tr)
fr2vVRCC(dat2,Tr,ch.all.intri = FALSE)
#gives an error message if ch.all.intri = TRUE
#since not all points in the data set are in the triangle
Run the code above in your browser using DataLab