Learn R Programming

PlaneGeometry (version 1.6.0)

SteinerChain: Steiner chain

Description

Return a Steiner chain of circles.

Usage

SteinerChain(c0, n, phi, shift, ellipse = FALSE)

Value

A list of n+1

Circle objects. The inner circle is stored at the last position.

Arguments

c0

exterior circle, a Circle object

n

number of circles, not including the inner circle; at least 3

phi

-1 < phi < 1 controls the radii of the circles

shift

any number; it produces a kind of rotation around the inner circle; values between 0 and n cover all possibilities

ellipse

logical; the centers of the circles of the Steiner chain lie on an ellipse, and this ellipse is returned as an attribute if you set this argument to TRUE

Examples

Run this code
c0 <- Circle$new(c(1,1), 3)
chain <- SteinerChain(c0, 5, 0.3, 0.5, ellipse = TRUE)
plot(0, 0, type = "n", asp = 1, xlim = c(-4,4), ylim = c(-4,4))
invisible(lapply(chain, draw, lwd = 2, border = "blue"))
draw(c0, lwd = 2)
draw(attr(chain, "ellipse"), lwd = 2, border = "red")

Run the code above in your browser using DataLab