Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


geophys (version 1.4-1)

Sect2vex: Intersect 2 Vectors

Description

Finder intersection point of two vectors in a plane

Usage

Sect2vex(V1, V2)

Arguments

V1

vector of 2 points

V2

vector of 2 points

Value

x-y location of intersection

Details

if vectors are parallel return NULL

See Also

AXB.prod

Examples

Run this code
# NOT RUN {
v1 = matrix(runif(4), ncol=2)
v2 =  matrix(runif(4), ncol=2)


pt = Sect2vex(v1, v2)

plot(c(v1[,1],v2[,1],pt[1] ) , c(v1[,2],v2[,2],pt[2]) , asp=1)

arrows(v1[1,1], v1[1,2], v1[2,1], v1[2,2])
arrows(v2[1,1], v2[1,2], v2[2,1], v2[2,2])

points(pt[1], pt[2], col='red', cex=2, pch=3)






# }

Run the code above in your browser using DataLab