View source: R/geom_l2lIntersect.R
lineCoefs | R Documentation |
Computes line equation coefficients This function is not meant to be called directly.
lineCoefs(pt1, pt2)
pt1 |
a vector with 2D coordinates of a point on the line. Additional dimensions are ignored |
pt2 |
a vector with 2D coordinates of a second point on the (direction). Additional dimensions are ignored |
A vector with computed line equation coefficients
Translated from rook at http://stackoverflow.com/questions/20677795/how-do-i-compute-the-intersection-point-of-two-lines-in-python
Cornel M. Pop
l <- rbind(c(1,5), c(3,2))
Lithics3D:::lineCoefs(l[1,], l[2,]) # 3, 2, 13
l <- rbind(c(1,5,2), c(3,2,0))
Lithics3D:::lineCoefs(l[1,], l[2,]) # 3, 2, 13
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.