spherical2cart: spherical2cart

View source: R/A014_sphericalConversions.R

spherical2cartR Documentation

spherical2cart

Description

Converts spherical co-ordinates into cartesian co-ordinates.

Usage

spherical2cart(
  x = 0,
  y = 0,
  z = 0,
  radius,
  inclination,
  azimuth,
  as.deg = FALSE
)

Arguments

x, y

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

as.deg

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

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

Details

Uses conventions fromm physics. To Do: Add mathematics convention.

Value

Returns a list with x, y and z co-ordinates.

Examples

print(1+1)

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