lawSummary {deldir}R Documentation

Produce a Lewis-Aboav-Weaire summary of a tessellation.

Description

Produce a summary of a Dirichlet (Voronoi) tessellation in terms of parameters relevant to Lewis's law and Aboav-Weaire's law. Note that “law” in the function name corresponds to “Lewis-Aboav-Weaire”.

Usage

lawSummary(object)

Arguments

object

An object of class "deldir" as returned by the function deldir().

Details

Tiles are stripped away from the tessellation in “layers”. Layer 1 consists of “boundary” tiles, i.e. tiles having at least one vertex on the enclosing rectangle (determined by the rw argument of deldir()). Layer 2 consists of tiles which are neighbours of tiles in layer 1 (i.e. tiles determined by points that are Delaunay neighbours of points determining the tiles in layer 1). Layer 3 consists of tiles which are neighbours of tiles in layer 2.

The parameters of interest in respect of the Lewis-Aboav-Weaire summary are then calculated in terms of the tiles that remain after the three layers have been stripped away, which will be referred to as “interior” tiles. These parameters are:

Note that the neighbouring tiles of the interior tiles may include tiles which are not themselves interior tiles (i.e. tiles which are in layer 3).

This function was created at the request of Kai Xu (Fisheries College, Jimei University, Xiamen, Fujian, China 361021).

Value

If no tiles remain after the three layers have been stripped away, then the returned value is NULL. Otherwise the returned value is a list with components calculated in terms of the remaining (“interior”) tiles. These components are:

The returned list also has attributes as follows:

Author(s)

Rolf Turner rolfurner@posteo.net

See Also

tile.list() tile.centroids()

Examples

# A random pattern:
set.seed(42)
xy1   <- data.frame(x=runif(400,0,20),y=runif(400,0,20))
dxy1  <- deldir(xy1)
ldxy1 <- lawSummary(dxy1)
tl1   <- tile.list(dxy1)
plot(0,0,type="n",xlim=c(-2,35),ylim=c(0,20),asp=1,xlab="x",ylab="y",bty="l")
plot(tl1,showpoints=FALSE,add=TRUE)
points(xy1[attr(ldxy1,"i1"),],pch=20,col="yellow")
points(xy1[attr(ldxy1,"i2"),],pch=20,col="blue")
points(xy1[attr(ldxy1,"i3"),],pch=20,col="green")
points(xy1[attr(ldxy1,"i.kept"),],pch=20,col="red")
legend("right",pch=20,col=c("yellow","blue","green","red"),
       legend=c("layer 1","layer 2","layer 3","interior"))

# A highly structured pattern (example due to Kai Xu):
set.seed(115)
x  <- c(rep(1:20,10),rep((1:20)+0.5,10))
y  <- c(rep(1:10,each=20),rep((1:10)+0.5,each=20))*sqrt(3)
a  <- runif(400,0,2*pi)
b  <- runif(400,-1,1)
x  <- x+0.1*cos(a)*b
y  <- y+0.1*sin(a)*b
xy2 <- data.frame(x,y)
dxy2  <- deldir(xy2)
ldxy2 <- lawSummary(dxy2)
tl2   <- tile.list(dxy2)
plot(0,0,type="n",xlim=c(-2,35),ylim=c(0,20),asp=1,xlab="x",ylab="y",bty="l")
plot(tl2,showpoints=FALSE,add=TRUE)
points(xy2[attr(ldxy2,"i1"),],pch=20,col="yellow")
points(xy2[attr(ldxy2,"i2"),],pch=20,col="blue")
points(xy2[attr(ldxy2,"i3"),],pch=20,col="green")
points(xy2[attr(ldxy2,"i.kept"),],pch=20,col="red")
legend("right",pch=20,col=c("yellow","blue","green","red"),
       legend=c("layer 1","layer 2","layer 3","interior"))


[Package deldir version 2.0-4 Index]