line_from_point_and_vector Function

public pure function line_from_point_and_vector(pt, x, nx) result(rst)

Constructs a new line from a point (defines the point where t = 0) and a direction vector.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: pt(3)

The point at which t = 0 on the line.

real(kind=real64), intent(in) :: x(3)

The direction vector defining the orientation of the line.

logical, intent(in), optional :: nx

An optional parameter that defines if x should be normalized to a unit vector (true), or left as-is (false). The default is true such that x is normalized to a unit vector.

Return Value type(line)

The resulting line.


Contents