Learn R Programming

spatstat.geom (version 3.7-2)

FeretDiamFun: Feret Diameter as a Function of Direction

Description

Create a function which calculates the Feret diameter of a domain at any given angle. Alternatively, calculate the minimum or maximum value of this function.

Usage

FeretDiamFun(W)
minFeretDiam(W)
maxFeretDiam(W)

Value

The result of FeretDiamFun is a

function in the R language with one argument theta.

The result of minFeretDiam or maxFeretDiam is a single numeric value.

Arguments

W

Window (object of class "owin") representing the domain.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

Details

The Feret diameter or caliper diameter of a domain \(W\), at a given angle \(\theta\), is length of the projection of \(W\) onto a line with orientation \(\theta\).

Equivalently, the Feret diameter at angle \(\theta\) is the distance between the tangents to \(W\) that are perpendicular to direction \(\theta\).

The Feret diameter at orientation \(\theta\) can also be written $$ d_W(\theta) = h_W(\theta) - h_W(\theta + \pi) $$ where \(h_W(\theta)\) is the support function of W.

The command FeretDiamFun creates a function in the R language, with one argument theta, which can calculate the Feret diameter at any given angle or angles theta.

The commands minFeretDiam and maxFeretDiam calculate the minimum and maximum value, respectively, of Feret diameter at any orientation.

See Also

FeretBox, SupportFun

Examples

Run this code
  W <- letterR
  Frame(W) <- grow.rectangle(Frame(W), 0.2)
  plot(W, main="")

  d <- FeretDiamFun(W)
  d(pi/6)

  f <- SupportFun(W)
  tt <- pi/6 + c(0, pi)
  plot(infline(theta=tt, p=f(tt)), col="red", lwd=2)

  ## as a function
  curve(d, to=2*pi)

  minFeretDiam(W)

Run the code above in your browser using DataLab