line_common_normal Function

public pure function line_common_normal(ln1, ln2) result(rst)

Returns the common normal line between two lines pointing from ln1 to ln2. In the event that the two lines are parallel within the specified tolerance, there exist an infinite number of common normals; therefore, a line will be chosen that runs from ln1 to ln2 with the point at t = 0 coincident with the point at t = 0 on ln1.

Arguments

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

The first line.

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

The second line.

Return Value type(line)

The common normal line. The distance along this line between t = 0 and t = 1 defines the length of the common normal connecting ln1 to ln2. In the event that ln1 and ln2 intersect, the length of this line is zero.


Contents