Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cart2clock

Convert Cartesian Coordinates to Clock Coordinates


Description

Converts cartesian coordinates (x, y to clock coordinates (rho, phi)

Usage

cart2clock(x, y, circle)

Arguments

x, y

Cartesian coordinates.

circle

Defines the full circle in the units of phi.

Details

Be aware that in clock coordinates and polar coordinate the angle phi is differently defined!

Value

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.

Author(s)

Rene Locher

See Also

Examples

## convert clock coordinates to cartesian coordinates
xy <- clock2cart(rho=rep(1,33),phi=seq(0,to=360,length.out=33),circle=360)

## convert the cartesian coordinates back to clock coordinates
rhophi <- cart2clock(xy$x,xy$y,circle=360)

round(clock2cart(rhophi,circle=360)-xy)
## QED

IDPmisc

'Utilities of Institute of Data Analyses and Process Design (www.zhaw.ch/idp)'

v1.1.20
GPL (>= 3)
Authors
Rene Locher [aut, cre], Andreas Ruckstuhl [ctb]
Initial release
2020-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.