Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

anglePoint

Calculate coordinates at specific angle and distance.


Description

A function calculating the coordinates of the point that is at a specific radian angle in a specific distance from a source point. Internally called by smoothArc.

Usage

anglePoint(A, angl, len)

Arguments

A

Vector of length two with the coordinates of the source point.

angl

Radian angle indicating into which direction the new point is to be calculated.

len

The distance at which the new point is situated from the source point.

Value

A vector of length two with the coordinates of the new point.

Note

Another pretty superfluous helper function...

Author(s)

Lutz P Breitling <l.breitling@posteo.de>

See Also

Examples

round(anglePoint(c(0,0),      0, 0.5), 2);
round(anglePoint(c(0,0),   pi/2, 0.5), 2);
round(anglePoint(c(0,0),     pi, 0.5), 2);
round(anglePoint(c(0,0), 1.5*pi, 0.5), 2);

dagR

R Functions for Directed Acyclic Graphs

v1.2.0
GPL-2
Authors
Lutz P Breitling
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.