PointsAlong: Find spaced Points along a line

PointsAlongR Documentation

Find spaced Points along a line

Description

find evenly spaced points along a line

Usage

PointsAlong(x, y, spacing = NULL, N = 1, endtol = 0.1)

Arguments

x

x-coordinates

y

y-coordinates

spacing

spacing of points

N

number of points

endtol

indent on either ends

Details

The total length is returned: this is the line integral along the trace.

Value

List:

x

x-coordinates

y

y-coordinates

rot

angle at the points

TOT

total length along the trace

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu

Examples


plot(c(-5,5), c(-5,5), asp=1, type='n' )
ff=list()
ff$x=c(-4.850,-4.700,-3.934,-2.528, 0.603, 2.647, 3.861, 2.626)
ff$y=c(-4.045,-2.087,-0.710, 0.172, 1.291, 2.087,-0.753,-4.131)

g = PointsAlong(ff$x, ff$y, N=20)

lines(ff$x, ff$y)
points(g$x, g$y)


GEOmap documentation built on Sept. 1, 2023, 5:09 p.m.