points2line: Points to Line

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

Description

Given a point and a matrix of lines, calculate the projection of the vector of the point to the first coordinate of each line and the perpendicular distance.

Usage

1
points2line(Lp, VL)

Arguments

Lp

Point list (x,y)

VL

Matrix of points, N by 4 as X1, Y1, X2, Y2

Details

The first point in the matrix is considered the base.

Value

list:

rat

cosine projection

srat

sine projection

Author(s)

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

See Also

REplane

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
S= stressSETUP()
      pstart()
PLOTbox(S$Rax, S$Rbox, axcol= 'green', boxcol= 'purple')
      PLOTplane(S$Rp, planecol="brown")

 basepoint = 3

        legpoints = c(7,4,2)

   

        VL =   cbind( rep(S$Rbox[basepoint,1] , length(legpoints)),
     rep(S$Rbox[basepoint,2] , length(legpoints)),
          S$Rbox[legpoints,1], S$Rbox[legpoints,2])

      Lp=list() 
Lp$x=c(40.0180732557)
Lp$y=c(40.4847345741)

 G = points2line(Lp, VL )

geophys documentation built on May 1, 2019, 9:26 p.m.