Computes intersection point of two lines going through points [pa, qa] and [pb, qb]
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=FP), | intent(in), | dimension(2) | :: | pa |
x/y-coordinate of first point of first line |
|
| real(kind=FP), | intent(in), | dimension(2) | :: | qa |
x/y-coordinate of second point of first line |
|
| real(kind=FP), | intent(in), | dimension(2) | :: | pb |
x/y-coordinate of first point of second line |
|
| real(kind=FP), | intent(in), | dimension(2) | :: | qb |
x/y-coordinate of second point of second line |
|
| real(kind=FP), | intent(out) | :: | xi |
If info = 0: x-coordinate of intersection point If info /= 0: NaN |
||
| real(kind=FP), | intent(out) | :: | yi |
If info = 0: y-coordinate of intersection point If info /= 0: NaN |
||
| integer, | intent(out) | :: | info |
Returns info on intersection point info = 0: Unique intersection point found info = 1: Both lines are identical info = -1: Both lines are parallel and not identical info = -2: Some line is degenerate, i.e. pa = qa or pb = qb |
||
| real(kind=FP), | intent(out), | optional | :: | ta |
If info = 0: Parameter where intersection occurs w.r.t. first line, i.e. pa + ta * (pa - qa) If info /= 0: NaN |
|
| real(kind=FP), | intent(out), | optional | :: | tb |
If info = 0: Parameter where intersection occurs w.r.t. second line, i.e. pb + tb * (pb - qb) If info /= 0: NaN |