circumcenter.basic.tri {pcds}R Documentation

Circumcenter of a standard basic triangle form

Description

Returns the circumcenter of a standard basic triangle form T_b=T((0,0),(1,0),(c_1,c_2)) given c_1, c_2 where c_1 is in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

Any given triangle can be mapped to the standard basic triangle form 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 form is useful for simulation studies under the uniformity hypothesis.

See (Weisstein (2019); Ceyhan (2010)) for triangle centers and (Ceyhan et al. (2006); Ceyhan et al. (2007); Ceyhan (2011)) for the standard basic triangle form.

Usage

circumcenter.basic.tri(c1, c2)

Arguments

c1, c2

Positive real numbers representing the top vertex in standard basic triangle form T_b=T((0,0),(1,0),(c_1,c_2)), c_1 must be in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

Value

circumcenter of the standard basic triangle form T_b=T((0,0),(1,0),(c_1,c_2)) given c_1, c_2 as the arguments of the function.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2011). “Spatial Clustering Tests Based on Domination Number of a New Random Digraph Family.” Communications in Statistics - Theory and Methods, 40(8), 1363-1395.

Ceyhan E, Priebe CE, Marchette DJ (2007). “A new family of random graphs for testing spatial segregation.” Canadian Journal of Statistics, 35(1), 27-50.

Ceyhan E, Priebe CE, Wierman JC (2006). “Relative density of the random r-factor proximity catch digraphs for testing spatial patterns of segregation and association.” Computational Statistics & Data Analysis, 50(8), 1925-1964.

Weisstein EW (2019). “Triangle Centers.” From MathWorld — A Wolfram Web Resource, http://mathworld.wolfram.com/TriangleCenter.html.

See Also

circumcenter.tri

Examples


c1<-.4; c2<-.6;
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
#the vertices of the standard basic triangle form Tb
Tb<-rbind(A,B,C)
CC<-circumcenter.basic.tri(c1,c2)  #the circumcenter
CC

D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2; #midpoints of the edges
Ds<-rbind(D1,D2,D3)

Xlim<-range(Tb[,1])
Ylim<-range(Tb[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]

oldpar <- par(pty = "s")
plot(A,pch=".",asp=1,xlab="",ylab="",axes=TRUE,xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Tb)
points(rbind(CC))
L<-matrix(rep(CC,3),ncol=2,byrow=TRUE); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty = 2)

txt<-rbind(Tb,CC,D1,D2,D3)
xc<-txt[,1]+c(-.03,.04,.03,.06,.06,-.03,0)
yc<-txt[,2]+c(.02,.02,.03,-.03,.02,.04,-.03)
txt.str<-c("A","B","C","CC","D1","D2","D3")
text(xc,yc,txt.str)

#for an obtuse triangle
c1<-.4; c2<-.3;
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
#the vertices of the standard basic triangle form Tb
Tb<-rbind(A,B,C)
CC<-circumcenter.basic.tri(c1,c2)  #the circumcenter
CC

D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2; #midpoints of the edges
Ds<-rbind(D1,D2,D3)

Xlim<-range(Tb[,1],CC[1])
Ylim<-range(Tb[,2],CC[2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]

plot(A,pch=".",asp=1,xlab="",ylab="",axes=TRUE,xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Tb)
points(rbind(CC))
L<-matrix(rep(CC,3),ncol=2,byrow=TRUE); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty = 2)

txt<-rbind(Tb,CC,D1,D2,D3)
xc<-txt[,1]+c(-.03,.03,.03,.07,.07,-.05,0)
yc<-txt[,2]+c(.02,.02,.04,-.03,.03,.04,.06)
txt.str<-c("A","B","C","CC","D1","D2","D3")
text(xc,yc,txt.str)
par(oldpar)



[Package pcds version 0.1.8 Index]