track.circle: Returns a list of x-values and y-values of points defined by...

View source: R/track.circle.R

track.circleR Documentation

Returns a list of x-values and y-values of points defined by the fractions 'w' along the partial circular path defined by the list or matrix of origin points 'origin', the vector of radii 'r' and the list or matrix of angles 'ang'. Cumulative lengths of the path are also returned.

Description

Returns a list of x-values and y-values of points defined by the fractions 'w' along the partial circular path defined by the list or matrix of origin points 'origin', the vector of radii 'r' and the list or matrix of angles 'ang'. Cumulative lengths of the path are also returned.

Usage

track.circle(
  origin,
  r,
  ang,
  w = NULL,
  dw = NULL,
  speed = NULL,
  normalized = FALSE,
  list.out = TRUE,
  plot = FALSE,
  ...
)

Arguments

origin

is the origin of the path, given as a list of two elements or a matrix of two columns, representing the x and y values of the origins.

r

is a vector of length 'n' holding the input radius-variable.

ang

is the input angle-variable as defined on the unit circle, given as a list of two elements or a matrix of two columns, representing the start and the end angles of the circle segments.

w

are the positions along the path (x,y), or along the x-axis if alongx==TRUE. If 'w' is a single integer, it is set to seq(0,1,length.out=w). If 'speed' is given 'w' is interpreted as time values.

dw

are the piecewise lengths along the path (x,y), or along the x-axis if alongx==TRUE, used only if w!=NULL. If 'dw' ihas length>1 it overrides 'w' by w=cumsum(dw).

speed

is a vector of sound speeds of each circle segment. If given, 'w' is interpreted as time values starting from dt=0 at the start of the path.

normalized

is TRUE if the positions given by 'w' (and 'speed') are or should be normalized to the set [0,1], where 1 represents the end of the path.

list.out

is TRUE if the output should be a data frame with the names "x", "y" and "l". Else a matrix with the same names is returned.

plot

is TRUE if a simple plot is to be drawn.

...

are parameters to be passed on to plot() if plot==TRUE.


arnejohannesholmin/sonR documentation built on April 14, 2024, 11:39 p.m.