Learn R Programming

pcds (version 0.1.4)

plotPEregsTH: The plot of the Proportional Edge (PE) Proximity Regions for a 3D data set - one tetrahedron case

Description

Plots the points in and outside of the tetrahedron th and also the PE proximity regions (which are also tetrahedrons) for points inside the tetrahedron th.

PE proximity regions are constructed with respect to tetrahedron th with expansion parameter \(r \ge 1\) and vertex regions are based on the center M which is circumcenter ("CC") or center of mass ("CM") of th with default="CM", so PE proximity regions are defined only for points inside the tetrahedron th.

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

Usage

plotPEregsTH(
  Xp,
  r,
  th,
  M = "CM",
  main = "",
  xlab = "",
  ylab = "",
  zlab = "",
  xlim = NULL,
  ylim = NULL,
  zlim = NULL,
  ...
)

Value

Plot of the PE proximity regions for points inside the tetrahedron th

(and just the points outside th)

Arguments

Xp

A set of 3D points for which PE proximity regions are constructed.

r

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

th

Four 3D points, stacked row-wise, each row representing a vertex of the tetrahedron.

M

The center to be used in the construction of the vertex regions in the tetrahedron, th. Currently it only takes "CC" for circumcenter and "CM" for center of mass; default="CM".

main

An overall title for the plot (default="").

xlab, ylab, zlab

Titles for the \(x\), \(y\), and \(z\) axes, respectively (default="" for all).

xlim, ylim, zlim

Two numeric vectors of length 2, giving the \(x\)-, \(y\)-, and \(z\)-coordinate ranges (default=NULL for all).

...

Additional scatter3D parameters.

Author

Elvan Ceyhan

References

See Also

plotPEregsStdTH, plotPEregsTri and plotPEregsInt

Examples

Run this code
# \donttest{
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.tetra(n,tetra)$g  #try also dat[,1]<-dat[,1]+1

M<-"CM"  #try also M<-"CC"
r<-1.5

plotPEregsTH(dat[1,],r,tetra)  #uses the default M="CM"
plotPEregsTH(dat[1,],r,tetra,M)

plotPEregsTH(dat[5,],r,tetra,M)

plotPEregsTH(c(.4,.4,.4),r,tetra,M)

plotPEregsTH(c(.5,.5,.5),r,tetra,M)

plotPEregsTH(dat[1:3,],r,tetra,M)

P1<-c(.1,.1,.1)
plotPEregsTH(rbind(P1,P1),r,tetra,M)
# }

Run the code above in your browser using DataLab