exact-segment-intersect
Exactly computes the intersection of a pair of line segments as a homogeneous vector of non-overlapping increasing sequences.
Example
var exactIntersect = var a = -10var b = 10var c = 0-1var d = 01 console
Output:
0 0 1
Install
npm install exact-segment-intersect
API
require("exact-segment-intersect")(a,b,c,d)
Exactly computes the intersection of the line segments [a,b]
and [c,d]
a,b
are the vertices of the first segmentc,d
are the vertices of the second segment
Returns A homogeneous 3 vector encoding the exact point of intersection
Credits
(c) 2014 Mikola Lysenko. MIT License