File: circle.R

package info (click to toggle)
r-cran-calibrate 1.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 628 kB
  • sloc: makefile: 2
file content (12 lines) | stat: -rw-r--r-- 221 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
"circle" <- function(radius = 1, origin = c(0,0)) 
{
    t <- seq(-pi,pi,by=0.01)
    a <- origin[1]
    b <- origin[2]
    r <- radius
    x <- a + r*cos(t)
    y <- b + r*sin(t)
    points(x,y,type="l")
}