Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

diameter.box3

Geometrical Calculations for Three-Dimensional Box


Description

Calculates the volume, diameter, shortest side, side lengths, or eroded volume of a three-dimensional box.

Usage

## S3 method for class 'box3'
diameter(x)

## S3 method for class 'box3'
volume(x)

shortside(x)
sidelengths(x)
eroded.volumes(x, r)

## S3 method for class 'box3'
shortside(x)

## S3 method for class 'box3'
sidelengths(x)

## S3 method for class 'box3'
eroded.volumes(x, r)

Arguments

x

Three-dimensional box (object of class "box3").

r

Numeric value or vector of numeric values for which eroded volumes should be calculated.

Details

diameter.box3 computes the diameter of the box. volume.box3 computes the volume of the box. shortside.box3 finds the shortest of the three side lengths of the box. sidelengths.box3 returns all three side lengths of the box.

eroded.volumes computes, for each entry r[i], the volume of the smaller box obtained by removing a slab of thickness r[i] from each face of the box. This smaller box is the subset consisting of points that lie at least r[i] units away from the boundary of the box.

Value

For diameter.box3, shortside.box3 and volume.box3, a single numeric value. For sidelengths.box3, a vector of three numbers. For eroded.volumes, a numeric vector of the same length as r.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

X <- box3(c(0,10),c(0,10),c(0,5))
    diameter(X) 
    volume(X)
    sidelengths(X)
    shortside(X)
    hd <- shortside(X)/2
    eroded.volumes(X, seq(0,hd, length=10))

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.