polar2cart: polar2cart

View source: R/A006_polarConversions.R

polar2cartR Documentation

polar2cart

Description

Converts polar co-ordinates into cartesian co-ordinates.

Usage

polar2cart(x = 0, y = 0, distance, bearing, as.deg = FALSE)

Arguments

x, y

the cartesian co-ordinates where angles are drawn from. Can be a vector and defaults to 0.

distance

polar co-ordinate distance(s) from the center. Can be a vector

bearing

polar co-ordinate angle(s). Can be a vector. By default this is in radians. See as.deg

as.deg

defaults to false. Set to TRUE if you give bearings in degrees instead of radians.

Value

Returns a list with x and y co-ordinates.

See Also

Other polarConversion: cart2polar(), makePolar()

Examples

polar2cart(0,0,1,c(0,pi/2,pi,3*pi/2))

R-graphic-design/RGD documentation built on Jan. 2, 2023, 10:30 p.m.