project points to a circle

circle_projector(
  x,
  y,
  x0 = 0,
  y0 = 0,
  r = 1,
  source = c("x", "y", "-x", "-y", "center")
)

Arguments

x, y

points to be projected

x0, y0

circle center

r

radius of circle

source

projection type.

Value

data.frame of coordinates of projected points

Details

Here, for sources of x or y, projected points will be at the right or up half circle; for sources of -x or -y, projected points will be at the left or down half circle

Examples