pol2cart: pol2cart polar to cartesian coordinates

View source: R/rutils.R

pol2cartR Documentation

pol2cart polar to cartesian coordinates

Description

pol2cart translate polar coordinates of angles (as degrees) and a distance = radius, into cartesian coordinates of x and y. The option of using arbitrary origin coordinates is included

Usage

pol2cart(angle, dist, xorig = 0, yorig = 0)

Arguments

angle

the angle in degrees, either a single number of a vector

dist

the length of the line or radius, a single number

xorig

the final xorigin

yorig

the final yorigin

Value

a matrix of 1 or more rows depending on length of angle

Examples

## Not run: 
  ans <- pol2cart(angle=seq(0,360,15),dist=20,xorig=30,yorig=30)
  print(ans)

## End(Not run)

haddonm/rutilsMH documentation built on July 21, 2023, 8:46 p.m.