Just what is meant by dummy points as referred to by the help for the deldir() function? I understood they indicated the boundary beyond which triangulation would cease. I thought I would need the x/y elements (as described in the help file at the end of the description of the use of the dpl argument) to describe ad hoc dummy points as way to define a polygon or two as a boundary. However, it gives this error: Error in xd[-drop] : only 0's may be mixed with negative subscripts Something internal is doing the negative subscripting. I tried ndx/ndy instead of x/y but it evidently refers only to a rectangle so not what I need. Am I barking up the wrong tree altogether? Is the boundary defined somewhere else entirely? I need to get that clear before I am able to provide useful example code. TIA Patrick
On 01/02/2015 10:26 PM, p_connolly wrote:> Just what is meant by dummy points as referred to by the help for the > deldir() function? I understood they indicated the boundary beyond > which triangulation would cease.You should say what package you're asking about. deldir() is not a base R function. Duncan Murdoch> > I thought I would need the x/y elements (as described in the help file > at the end of the description of the use of the dpl argument) to > describe ad hoc dummy points as way to define a polygon or two as a > boundary. However, it gives this error: > > Error in xd[-drop] : only 0's may be mixed with negative subscripts > > Something internal is doing the negative subscripting. > I tried ndx/ndy instead of x/y but it evidently refers only to a > rectangle so not what I need. > > Am I barking up the wrong tree altogether? Is the boundary defined > somewhere else entirely? I need to get that clear before I am able to > provide > useful example code. > > TIA > Patrick > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
On 02/02/15 16:26, p_connolly wrote:> Just what is meant by dummy points as referred to by the help for the > deldir() function? I understood they indicated the boundary beyond > which triangulation would cease. > > I thought I would need the x/y elements (as described in the help file > at the end of the description of the use of the dpl argument) to > describe ad hoc dummy points as way to define a polygon or two as a > boundary. However, it gives this error: > > Error in xd[-drop] : only 0's may be mixed with negative subscripts > > Something internal is doing the negative subscripting. > I tried ndx/ndy instead of x/y but it evidently refers only to a > rectangle so not what I need. > > Am I barking up the wrong tree altogether? Is the boundary defined > somewhere else entirely? I need to get that clear before I am able to > provide > useful example code.The dummy points have nothing to do with any "boundary". In fact they have nothing much to do with anything, really! :-) They are a hangover from the original purpose of deldir which was to assist in a numerical integration needed for the maximum likelihood estimation of the intensity function of an inhomogeneous Poisson process. I really should get rid of them, but that would require a bit of work and re-writing of code and help files, and they do no real harm so I have decided to apply the "If it ain't broke don't fix it." principle. The deldir function creates a Delaunay triangulation/Dirichlet tessellation inside a "rectangular window" (denoted by "rw" in the argument list). This is the only boundary invoked or involved. The function plot.tile.list() will *plot* the Dirichlet tessellation "clipped" to a specified polygon. But that is just for *plotting*. I am not sure that I really understand the idea of a "boundary beyond which the triangulation ceases". The Delaunay triangulation is a finite structure; its outer boundary is the convex hull of the set of points being triangulated. You cannot confine it to a smaller region without losing some of those points. If you can explain what you really want to do, perhaps I can help. cheers, Rolf -- Rolf Turner Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 Home phone: +64-9-480-4619
On 2015-02-03 00:46, Rolf Turner wrote: [...]> The deldir function creates a Delaunay triangulation/Dirichlet > tessellation inside a "rectangular window" (denoted by "rw" in the > argument list). This is the only boundary invoked or involved. > > The function plot.tile.list() will *plot* the Dirichlet tessellation > "clipped" to a specified polygon. But that is just for *plotting*. I > am not sure that I really understand the idea of a "boundary beyond > which the triangulation ceases". The Delaunay triangulation is a > finite > structure; its outer boundary is the convex hull of the set of points > being triangulated. You cannot confine it to a smaller region without > losing some of those points. > > If you can explain what you really want to do, perhaps I can help.This should make it clearer: Suppose we had trees planted at the following coordinates 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) We can get a plot of the layout and polygons that "belong" to each tree. del <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10), plotit = TRUE, wl = 'tess') The areas of the polygons so drawn can be seen in this dataframe. del$summary Apart from those immediately adjacent to the corner (dummy) points, the areas represent the amount of space the roots could grow at a uniform rate before encountering a neighbouring tree's roots or a notional concrete path as described by the dummy triangular points, shown by this red square: polygon(y=c(0,0,10,10,0), x=c(0,10, 10, 0, 0), border = "red") My question relates to the possibility of doing something similar if the notional path was described by this green polygon: polygon(y=c(0.5, 1, 1.5, 9.5, 10, 8.5, 0.5), x=c(0.5, 8, 9.5, 9, 7, .7, 0.5), border = "green") Judging by references to 'rw', a rectangular window, I suspect not. Thanks for the help. Patrick> > cheers, > > Rolf