Learn R Programming

dagR (version 1.1.1)

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.

See Also

smoothArc

Examples

Run this code
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);

Run the code above in your browser using DataLab