cl2edges.std.tri | R Documentation |
An object of class "Extrema"
.
Returns the closest points from the 2D data set, Xp
,
to the edges in the
standard equilateral triangle
T_e=T(A=(0,0),B=(1,0),C=(1/2,\sqrt{3}/2))
.
ch.all.intri
is for checking
whether all data points are inside T_e
(default is FALSE
).
If some of the data points are not inside T_e
and ch.all.intri=TRUE
, then the function yields
an error message.
If some of the data points are not inside T_e
and ch.all.intri=FALSE
, then the function yields
the closest points to edges
among the data points inside T_e
(yields NA
if there are no data points
inside T_e
).
See also (\insertCiteceyhan:Phd-thesis,ceyhan:arc-density-PE,ceyhan:masa-2007;textualpcds).
cl2edges.std.tri(Xp, ch.all.intri = FALSE)
Xp |
A set of 2D points representing the set of data points. |
ch.all.intri |
A logical argument (default= |
A list
with the elements
txt1 |
Edge labels as |
txt2 |
A short description of the distances
as |
type |
Type of the extrema points |
desc |
A short description of the extrema points |
mtitle |
The |
ext |
The extrema points, i.e., closest points to edges |
X |
The input data, |
num.points |
The number of data points, i.e., size of |
supp |
Support of the data points, i.e.,
the standard equilateral triangle |
cent |
The center point used for construction of edge regions,
not required for this extrema,
hence it is |
ncent |
Name of the center, |
regions |
Edge regions inside the triangle, |
region.names |
Names of the edge regions,
not required for this extrema,
hence it is |
region.centers |
Centers of mass of the edge regions inside |
dist2ref |
Distances from closest points in each edge region to the corresponding edge |
Elvan Ceyhan
cl2edges.vert.reg.basic.tri
, cl2edgesMvert.reg
,
cl2edgesCMvert.reg
and fr2edgesCMedge.reg.std.tri
n<-20 #try also n<-100
Xp<-runif.std.tri(n)$gen.points
Ext<-cl2edges.std.tri(Xp)
Ext
summary(Ext)
plot(Ext,asp=1)
ed.clo<-Ext
A<-c(0,0); B<-c(1,0); C<-c(0.5,sqrt(3)/2);
Te<-rbind(A,B,C)
CM<-(A+B+C)/3
p1<-(A+B)/2
p2<-(B+C)/2
p3<-(A+C)/2
Xlim<-range(Te[,1],Xp[,1])
Ylim<-range(Te[,2],Xp[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(A,pch=".",xlab="",ylab="",axes=TRUE,xlim=Xlim+xd*c(-.05,.05),
ylim=Ylim+yd*c(-.05,.05))
polygon(Te)
points(Xp,xlab="",ylab="")
points(ed.clo$ext,pty=2,pch=4,col="red")
txt<-rbind(Te,p1,p2,p3)
xc<-txt[,1]+c(-.03,.03,.03,0,0,0)
yc<-txt[,2]+c(.02,.02,.02,0,0,0)
txt.str<-c("A","B","C","re=1","re=2","re=3")
text(xc,yc,txt.str)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.