Learn R Programming

pcds (version 0.1.1)

NPEstdtetra: The vertices of the Proportional Edge (PE) Proximity Region in the standard regular tetrahedron

Description

Returns the vertices of the PE proximity region (which is itself a tetrahedron) for a point in the standard regular tetrahedron \(T_h=T((0,0,0),(1,0,0),(1/2,\sqrt{3}/2,0),(1/2,\sqrt{3}/6,\sqrt{6}/3))= (rv=1,rv=2,rv=3,rv=4)\).

PE proximity region is defined with respect to the tetrahedron \(T_h\) with expansion parameter \(r \ge 1\) and vertex regions based on the circumcenter of \(T_h\) (which is equivalent to the center of mass in the standard regular tetrahedron).

Vertex regions are labeled as 1,2,3,4 rowwise for the vertices of the tetrahedron \(T_h\). rv is the index of the vertex region pt resides, with default=NULL. If pt is outside of \(T_h\), it returns NULL for the proximity region.

See also (ceyhan:Phd-thesis,ceyhan:comp-geo-2010;textualpcds).

Usage

NPEstdtetra(pt, r, rv = NULL)

Arguments

pt

A 3D point whose PE proximity region is to be computed.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \(\ge 1\).

rv

Index of the vertex region containing the point, either 1, 2, 3, 4 or NULL (defaut is NULL).

Value

Vertices of the tetrahedron which constitutes the PE proximity region with expansion parameter r and circumcenter (or center of mass) for a point pt in the standard regular tetrahedron

References

See Also

NPEtetra, NPEtri and NPEint

Examples

Run this code
# NOT RUN {
A<-c(0,0,0); B<-c(1,0,0); C<-c(1/2,sqrt(3)/2,0); D<-c(1/2,sqrt(3)/6,sqrt(6)/3)
tetra<-rbind(A,B,C,D)

n<-10  #try also n<-20
dat<-runif.stdtetra(n)$g
r<-1.5
NPEstdtetra(dat[1,],r)

NPEstdtetra(dat[5,],r)

NPEstdtetra(c(.4,.4,.4),r)
NPEstdtetra(c(.5,.5,.5),r)
NPEstdtetra(c(.5,.5,5),r)

#or try
RV<-rv.tetraCC(dat[1,],tetra)$rv
NPEstdtetra(dat[1,],r,rv=RV)

NPEstdtetra(c(-1,-1,-1),r,rv=NULL)

P1<-c(.1,.1,.1)
P2<-c(.5,.5,.5)
NPEstdtetra(P1,r)

# }

Run the code above in your browser using DataLab