FeretBox: Feret Box Enclosing a Domain

View source: R/sptfun.R

FeretBoxR Documentation

Feret Box Enclosing a Domain

Description

Given a spatial domain, calculate its Feret box, the narrowest rectangle enclosing the domain at a given angle (or at any angle).

Usage

FeretBox(W, theta = NULL)

Arguments

W

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

theta

Either a single numeric value specifying an angle such that the sides of the box should be parallel and perpendicular to theta, or NULL signifying that the orientation of the box is unconstrained.

Details

If theta is given, then the smallest rectangle containing W with sides parallel and perpendicular to angle theta will be computed and returned.

If theta=NULL (the default), then the orientation of the rectangle is unconstrained. The rectangle with the narrowest possible width (at any orientation) is determined by finding the minimum Feret diameter.

Value

A polygonal window (object of class "owin") representing a rotated rectangle.

Author(s)

\adrian

.

See Also

FeretDiamFun

Examples

  W <- Window(chorley)
  B <- FeretBox(W)
  plot(B, main="", type="n")
  plot(W, add=TRUE)
  plot(B, add=TRUE, border="red")

spatstat.geom documentation built on March 21, 2026, 9:06 a.m.