inters
(inters from_pt1 to_pt1 from_pt2 to_pt2 [flag])
The inters function computes the intersection of two lines in the current drawing space.
Arguments
The two lines are defined by the four points that are passed to the function. The first line is defined by the from_pt1 and to_pt1 points. The other line is defined by the from_pt2 and to_pt2 points. The points are evaluated as 3D points; the intersection is calculated in 3D space.
The function accepts an optional argument flag. If set, the function assumes the lines to be infinite and returns the intersection even if the lines do not cross (virtual intersection); otherwise, the intersection must be on both lines (real intersection).
Return Value
The function returns the computed intersection in a point list. It returns nil, if no intersection point has been found.
: (inters '(1 0) '(2 0) '(1 1)'(0 0) T)
nil
: (inters '(1 0) '(2 0) '(1 1)'(0 0) nil)
(0.00 0.00 0.00)