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

incircle

Find Largest Circle Inside Window


Description

Find the largest circle contained in a given window.

Usage

incircle(W)

inradius(W)

Arguments

W

A window (object of class "owin").

Details

Given a window W of any type and shape, the function incircle determines the largest circle that is contained inside W, while inradius computes its radius only.

For non-rectangular windows, the incircle is computed approximately by finding the maximum of the distance map (see distmap) of the complement of the window.

Value

The result of incircle is a list with entries x,y,r giving the location (x,y) and radius r of the incircle.

The result of inradius is the numerical value of radius.

Author(s)

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

See Also

Examples

W <- square(1)
  Wc <- incircle(W)
  plot(W)
  plot(disc(Wc$r, c(Wc$x, Wc$y)), add=TRUE)

  plot(letterR)
  Rc <- incircle(letterR)
  plot(disc(Rc$r, c(Rc$x, Rc$y)), add=TRUE)

  W <- as.mask(letterR)
  plot(W)
  Rc <- incircle(W)
  plot(disc(Rc$r, c(Rc$x, Rc$y)), add=TRUE)

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.