Last chance! 50% off unlimited learning
Sale ends in
An object of class "Extrema"
.
Returns the closest data points among the data set, dat
, to edge tri
NA
if there are no data points in a
See also (ceyhan:Phd-thesis,ceyhan:comp-geo-2010;textualpcds).
cl2eVRCC(dat, tri)
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 list
with the elements
Vertex labels are
A short description of the distances as "Distances to Edges in the Respective
CC-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 respective vertex region.
The input data, dat
, can be a matrix
or data frame
The number of data points, i.e., size of dat
Support of the data points, here, it is tri
The center point used for construction of vertex regions
Name of the center, cent
, it is "CC"
for this function
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 of closest points in the vertex regions to corresponding edges
cl2eTbVRcent
, cl2eVRCM
, cl2eVRcent
,
and cl2edgesTe
# NOT RUN {
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<-cl2eVRCC(dat,Tr)
Ext
summary(Ext)
plot(Ext)
cl2eVRCC(dat[1,],Tr)
cl2e<-cl2eVRCC(dat,Tr)
cl2e
CC<-circ.cent.tri(Tr);
D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2;
Ds<-rbind(D1,D2,D3)
Xlim<-range(Tr[,1],dat[,1],CC[1])
Ylim<-range(Tr[,2],dat[,2],CC[2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(Tr,asp=1,pch=".",xlab="",ylab="",axes=TRUE,xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Tr)
xc<-Tr[,1]+c(-.02,.02,.02)
yc<-Tr[,2]+c(.02,.02,.04)
txt.str<-c("A","B","C")
text(xc,yc,txt.str)
points(dat,pch=1,col=1)
L<-matrix(rep(CC,3),ncol=2,byrow=TRUE); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)
points(cl2e$ext,pch=3,col=2)
txt<-rbind(CC,Ds)
xc<-txt[,1]+c(-.04,.04,-.03,0)
yc<-txt[,2]+c(-.05,.04,.06,-.08)
txt.str<-c("CC","D1","D2","D3")
text(xc,yc,txt.str)
P<-c(1.4,1.0)
cl2eVRCC(P,Tr)
cl2eVRCC(dat,Tr)
cl2eVRCC(rbind(dat,dat),Tr)
dat.fr<-data.frame(a=dat)
cl2eVRCC(dat.fr,Tr)
dat.fr<-data.frame(a=Tr)
cl2eVRCC(dat,dat.fr)
# }
Run the code above in your browser using DataLab