View source: R/geom_l2lIntersect.R
l2lIntersect | R Documentation |
Compute line intersects based on line equation coefficients This function is not meant to be called directly.
l2lIntersect(l1, l2)
l1 |
2D line coefficients |
l2 |
2D line coefficients |
A vector with 2D intersection coordinates or NA if lines are parallel
translated from rook at http://stackoverflow.com/questions/20677795/how-do-i-compute-the-intersection-point-of-two-lines-in-python
Cornel M. Pop
l1 <- rbind(c(1,5), c(3,2))
l2 <- rbind(c(2,3), c(4,4))
# 2.250, 3.125
Lithics3D:::l2lIntersect(Lithics3D:::lineCoefs(l1[1,], l1[2,]),
Lithics3D:::lineCoefs(l2[1,], l2[2,]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.