Geometry routines.
Compute the distance between the point X and the line defined by the two points X1 and X2.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | x1 | ||
real(kind=wp), | intent(in), | dimension(3) | :: | x2 | ||
real(kind=wp), | intent(in), | dimension(3) | :: | x |
Compute the distance between a line segment and a point.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x1 | ||
real(kind=wp), | intent(in), | dimension(:) | :: | x2 | ||
real(kind=wp), | intent(in), | dimension(:) | :: | x |
Compute the distance between a point and a polygonal path. Given a point (x0,y0), and a path (x(n),y(n)), the distance to the path is the distance to the closest line segment (x(i),y(i)).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x0 | |||
real(kind=wp), | intent(in) | :: | y0 | |||
real(kind=wp), | intent(in), | dimension(n) | :: | x | ||
real(kind=wp), | intent(in), | dimension(n) | :: | y | ||
integer, | intent(in) | :: | n |
given a polygonal line connecting the vertices (x(i),y(i)) (i = 1,...,n) taken in this order. it is assumed that the polygonal path is a loop, where (x(n),y(n)) = (x(1),y(1)) or there is an arc from (x(n),y(n)) to (x(1),y(1)).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x0 | |||
real(kind=wp), | intent(in) | :: | y0 | |||
real(kind=wp), | intent(in), | dimension(n) | :: | x | ||
real(kind=wp), | intent(in), | dimension(n) | :: | y | ||
integer, | intent(in) | :: | n | |||
integer, | intent(out) | :: | l | |||
integer, | intent(out) | :: | m |