cart2clock {IDPmisc} | R Documentation |
Converts cartesian coordinates (x
, y
to clock
coordinates (rho
, phi
)
cart2clock(x, y, circle)
x, y |
Cartesian coordinates. |
circle |
Defines the full circle in the units of phi . |
Data frame with
rho |
Distance of point from center of coordinate system. |
phi |
Angle between North (12 o' clock), center and the point, measured clockwise. |
Rene Locher
## convert polar coordinates to cartesian coordinates xy <- clock2cart(rho=rep(1,33),phi=seq(0,to=360,len=33),circle=360) ## convert the cartesian coordinates back to polar coordinates rhophi <- cart2clock(xy$x,xy$y,circle=360) round(clock2cart(rhophi,circle=360)-xy) ## QED