angstep2xy | R Documentation |
The x-y-coordinates of a position in 2-D space is calculated from the angle between that position and the 2 previous ones in the trajectory and the distance between that position and the previous one.
angstep2xy(angle, steplength, prevp1, prevp2)
angle |
numeric value of the turn angle or a
|
steplength |
numeric value giving the distance between the position and the previous one. |
prevp1 |
numeric vector holding the x and y coordinates of the previous position. |
prevp2 |
numeric vector holding the x and y coordinates of the position before the previous one. |
The function returns a numeric vector holding the x and y coordinates of the position
angstep2xy(1.5*pi, 2, prevp1 = c(1, 4), prevp2 = c(2, 7.5)) angstep2xy(-0.5*pi, 2, c(1, 4), c(2, 7.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.