makePolar: Polar Co-ordinates

View source: R/M002_polar.R

makePolarR Documentation

Polar Co-ordinates

Description

Functions to convert polar co-ordinates into cartesean co-ordinates and to make a component that uses functions that output polar co-ordinates.

Usage

runPolar(
  x = 0.5,
  y = 0.5,
  distanceFunction = function(x) {     x/2 },
  bearingFunction = function(x) {     x * 2 * pi },
  parameterSpace = seq(0, 1, length.out = 100),
  rotation = 0,
  numLines = 1
)

makePolar(type = "lines", ...)

Arguments

x, y

the center polar co-ordinates are drawn from.

distanceFunction

a function that returns distances from x,y

bearingFunction

a function that returns bearings from x,y

parameterSpace

a vector of parameters passed to the distance and bearing functions.

rotation

an additional rotation. Defaults to 0.

numLines

divides the answer into a number of lines seperated by NAs for use with lines().

type

the type/graphics function of the component.

...

parameters passed to the component and the component functions. See "details" for more information.

Details

Used by many other applications such as Maurer roses, spirals and spirographs.

Value

runPolar returns a list with x and y components. makePolar returns a component.

See Also

Other polarConversion: cart2polar(), polar2cart()

Examples

print(1+1)

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