intersect_circles: Find intersection points of circles

Description Usage Arguments Value Examples

View source: R/circles.R

Description

Intersects any number of circles to find the points at which they intersect.

Usage

1
intersect_circles(x, y, r, nan.rm = FALSE)

Arguments

x

X coordinates of the circle centers

y

Y coordinates of the circle centers

r

Radiuses of the circles

nan.rm

Set to TRUE to drop all combinations of circles with no intersections.

Value

Return a matrix of x and y coordinates as well as the indices of the circles.

Examples

1
2
3
4
5
6
7
8
9
r <- runif(5, 0.3, 0.8)
x <- runif(5)
y <- runif(5)

int <- intersect_circles(x, y, r)
int

draw_circles(x, y, r)
points(int[, 1], int[, 2], pch = 16)

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