two_disk_overlap: Overlap of two disks

Description Usage Arguments Value Examples

View source: R/circles.R

Description

Compute the overlap of two disks given the euclidean distance between their centers. If no distance is given the distance will be computed by the function provided that the coordinates for the center are provided.

Usage

1
2
two_disk_overlap(r1, r2, d = NULL, x1 = NULL, x2 = NULL, y1 = NULL,
  y2 = NULL)

Arguments

r1

Radius of the first disk

r2

Radius of the second disk

d

Distance between the two disks

x1

x coordinate for the first disk's center

x2

x coordinate for the second disk's center

y1

y coordinate for the first disk's center

y2

y coordinate for the second disk's center

Value

The area of the overlap between the two disks.

Examples

1
2
3
4
5
r1 <- runif(4, 0.2, 0.5)
r2 <- runif(4, 0.2, 0.5)
d  <- runif(4)

two_disk_overlap(r1, r2, d)

jolars/euclidr documentation built on May 19, 2019, 7:25 p.m.