Learn R Programming

R2G2 (version 1.0-2)

curvy: curvy - internal function to compute spherical coordinates of points along an arc

Description

An arc is defined by startDD and stopDD, the coordinates of its limit points (decimal degrees). New points are computed according to f, i.e. the fraction at which the desired point is located along the arc (f varies between 0 -> startDD to 1 -> stopDD)

Usage

curvy(f, startDD, stopDD)

Arguments

f
Fraction of arc at which the desired point is located. f varies between 0 and 1, to generate points located between startDD and stopDD)
startDD
Geographical location of starting point of the arc (longitutde, latitude in decimal degrees).
stopDD
Geographical location of stoping point of the arc (longitutde, latitude in decimal degrees).

Value

The geographical coordinates of the desired point (longitude, latitude in decimal degrees).

References

The original function was actually proposed by Rod Page on http://iphylo.blogspot.com/

Examples

Run this code
startDD = c(1, 5)
stopDD = c(5, 1)
curvy(0.5, startDD, stopDD)

Run the code above in your browser using DataLab