View source: R/A016_polarConversions2.R
cart2polar | R Documentation |
Converts polar co-ordinates into cartesian co-ordinates.
cart2polar( x = 0, y = 0, x0 = NULL, y0 = NULL, x1 = NULL, y1 = NULL, lineSegments = FALSE, forcePositive = FALSE )
x, y, x0, y0, x1, y1 |
numerical. See details. |
lineSegments |
logical. See details. |
forcePositive |
defaults to FALSE. Setting this to true ensures the bearings are between 0 and 2*pi instead of from -pi to pi. |
If none of the below apply (the default), the input vector is (x,y). i.e. from the origin to x,y.
x and y are ignored if all of x0,y0,x1,y1 are provided and the input vectors are (x1-x0,y1-y0). i.e. from (x0,y0) to (x1,y1). x1 and y1 are ignored otherwise.
if all of x0,y0,x1,y1 are NULL, only x and y are used. If lineSegments is FALSE, the default behaviour applies. If TRUE, the vectors are along the line given by x and y, from the first point to the second and so on.
Returns a list with r and bearing co-ordinates.
Other polarConversion:
makePolar()
,
polar2cart()
print(1+1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.