bend: To Bend lines

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Used in order to interpolate between points so that teh path of the line will be bent and not straight

Usage

1
bend(loc1, loc2, bend = 0.1, n=100)

Arguments

loc1

vector of length 2 of the first location

loc2

vector of length 2 of the second location

bend

porportion of distance between loc 1 and loc 2 to bend the line

n

number of points

Value

This function returns a matrix in which the first column is the x coordinates of n points, while the second column is the y coordinates

Note

Used to bend lines between two points, to reduce overlap

Author(s)

Connor F. White

See Also

transBub

Examples

1
2
3
4
5
6
7
8
first<-c(1,1)
second<- c(2,3)

l<-bend(first,second,bend=.1)

plot(first[1],first[2],xlim=c(0,3),ylim=c(0,4))
points(second[1],second[2])
lines(l[,1],l[,2])

ConnorFWhite/AssFunc documentation built on May 20, 2019, 4:07 p.m.