suspending
it from so-called ideal points
(-Inf,-Inf), (Inf,-Inf) (Inf,Inf), and (-Inf,Inf). The triangulation
is also enclosed in a finite rectangular window. A set of dummy
points may be added, in various ways, to the set of data points
being triangulated.deldir(x, y, dpl=NULL, rw=NULL, eps=1e-09, sort=TRUE, plotit=FALSE,
digits=6, z=NULL, zdum=NULL, suppressMsge=FALSE, ...)
If x
is a data frame then the x
coordin
ndx
: The x-dimension ofTRUE
(the default) the data (including dummy
points) are sorted into a sequence of TRUE
a plot is produced. The nature
of the plot may be controlled by using the ...
argument
to pass appropriate arguments to plot.deldir()
. Without
z
to be associated with any dummy points that are
created. See Warnings.deldir
) should be
suppressed....
if plotit=TRUE
.deldir
), invisible if plotit=TRUE
, with components:n.data + n.dum
rows
(see below). The rows correspond to the points in the set being
triangulated. The column names are x
(the x-coordinate of
the point), y
(the y-coordinate), z
(the auxiliary
values or weights if these were specified), n.tri
(the number
of Delaunay triangles emanating from the point), del.area
(1/3 of the total area of all the Delaunay triangles emanating
from the point), del.wts
(the corresponding entry of
the del.area
column divided by the sum of this column);
n.tside
(the number of sides --- within the rectangular
window --- of the Dirichlet tile surrounding the point), nbpt
(the number of points in which the Dirichlet tile intersects the
boundary of the rectangular window), dir.area
(the area
of the Dirichlet tile surrounding the point), and dir.wts
(the corresponding entry of the dir.area
column divided by
the sum of this column).Note that the factor of 1/3 associated with the del.area column arises because each triangle occurs three times --- once for each corner.
summary
correspond to real points.summary
correspond to dummy
points.del.area
column of summary
.dir.area
column of summary
.deldir()
before
duplicate points (if any) were removed. These coordinates are used
by triang.list()
.NULL
) are identical.TRUE
a plot of the triangulation and/or tessellation is produced
or added to an existing plot.frac
for this function, which defaulted
to 0.0001. Points were deemed to be duplicates if the difference
inx
-coordinates was less thanfrac
times the width
ofrw
andy
-coordinates was less thanfrac
times the height ofrw
. This process has been changed to
one which usesduplicated()
on the data frame whose
columns arex
andy
.As a result it may happen that points which were previously eliminated as duplicates will no longer be eliminated. (And possibly vice-versa.)
delsgs
andsummary
of the value
returned bydeldir()
are nowdata framesrather than
matrices. The componentsummary
was changed to allow thez
to be of arbitrary mode (i.e.
not necessarily numeric). The componentdelsgs
was then
changed for consistency. Note that the otherdirsgs
has been a data frame since time immemorial.A message alerting the user to the foregoing two items is printed
out the first time thatdeldir()
is called withsuppressMsge=FALSE
in a given session. In succeeding
calls todeldir()
in the same session, no message is printed.
(I.e. the
Thewarning()
function, sosuppressWarnings()
willnotsuppress its appearance. To effect such suppression
(necessary only on the first call todeldir()
in a
given session) one must set thesuppressMsge
argument ofdeldir
equal toTRUE
.
z
, ofzdum
.
Ifzdum
is not supplied then the auxiliary values or weights
associated with the dummy points are all taken to be missing values
(i.e.NA
).Further revisions were made December 1996. The author gratefully acknowledges the contributions, assistance, and guidance of Mark Berman, of D.M.S., CSIRO, in collaboration with whom this project was originally undertaken. The author also acknowledges much useful advice from Adrian Baddeley, formerly of D.M.S., CSIRO (now of CMIS, CSIRO and Adjunct Professor of Statistics at the University of Western Australia). Daryl Tingley of the Department of Mathematics and Statistics, University of New Brunswick provided some helpful insight. Special thanks are extended to Alan Johnson, of the Alaska Fisheries Science Centre, who supplied two data sets which were extremely valuable in tracking down some errors in the code.
Don MacQueen, of Lawrence Livermore National Lab, wrote an Splus driver function for the old stand-alone version of this software. That driver, which was available on Statlib, is now deprecated in favour of the current package ``delaunay'' package. Don also collaborated in the preparation of that package.
See the ChangeLog
for information about further revisions
and bug-fixes.
Ahuja, N. and Schacter, B. J. (1983). Pattern Models. New York: Wiley.
plot.deldir()
tile.list()
triang.list()
# Puts dummy points at the corners of the rectangular
# window, i.e. at (0,0), (10,0), (10,10), and (0,10)
# An "alerting note" is printed.
x <- c(2.3,3.0,7.0,1.0,3.0,8.0)
y <- c(2.3,3.0,2.0,5.0,8.0,9.0)
tv <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10))
# Plots the triangulation which was created (but not the tesselation).
tv <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10),plot=TRUE,wl='tr')
# Auxiliary values associated with points; 4 dummy points to be
# added so 4 dummy "z-values" provided.
z <- sample(1:100,6)
zdum <- rep(-99,4)
tv <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10),z=z,zdum=zdum)
Run the code above in your browser using DataCamp Workspace