R/circles.R

Defines functions circles

Documented in circles

circles <- function(x,y,r,...){
  n <- length(x)
  if(length(y)!=n || length(r)!=n)
    stop("arguments should be of same length!")
  phi <- seq(0,2*pi,length=360)
  for(i in 1:n){
    lines(c(x[i]+r[i]*cos(phi),x[i]+r[i]),c(y[i]+r[i]*sin(phi),y[i]),type="l",...)
  }
}

Try the tripack package in your browser

Any scripts or data that you put into this service are public.

tripack documentation built on July 8, 2020, 5:59 p.m.