do_lines_intersect Subroutine

public pure subroutine do_lines_intersect(ln1, ln2, intersect, t1, t2, tol)

Tests to see if two lines intersect.

Arguments

Type IntentOptional Attributes Name
class(line), intent(in) :: ln1

The first line.

class(line), intent(in) :: ln2

The second line.

logical, intent(out) :: intersect

True if the two lines intersect within the specified tolerance; else, false if they do not intersect.

real(kind=real64), intent(out), optional :: t1

The parametric value associate with ln1 defining the intersection point.

real(kind=real64), intent(out), optional :: t2

The parametric value associate with ln2 defining the intersection point.

real(kind=real64), intent(in), optional :: tol

The intersection tolerance. If not supplied, the default value is 10x machine epsilon.


Contents