secant_intersections(a = 0, b = 1, r = 2)
# A tangent
secant_intersections(a = 2, b = 0, r = 2, verbose = TRUE)
# Missing the circle
secant_intersections(a = 3, b = 0, r = 2)
# Creating a circle boundary approximation
plot(0, 0, col = "red", pch = "+",
xlim = c(-2, 2),
ylim = c(-2, 2))
for (i in seq(-1, 1, by = 0.01)) {
points(secant_intersections(Inf, i, 1), pch = "+")
}
Run the code above in your browser using DataLab