poly_intercept(3f) - [M_math:geometry] intersection of a straight line and polygonal path
Synopsis
Description
Options
Returns
Example
Pedigree
SUBROUTINE Poly_Intercept(a,b,x,y,n,u,v,m,num,ierr)
REAL, INTENT(IN) :: a(2) REAL, INTENT(IN) :: b(2) REAL, INTENT(IN) :: x(:) REAL, INTENT(IN) :: y(:) INTEGER, INTENT(IN) :: nREAL, INTENT(OUT) :: u(:) REAL, INTENT(OUT) :: v(:)
INTEGER, INTENT(IN) :: m
INTEGER, INTENT(OUT) :: num INTEGER, INTENT(OUT) :: ierr
Calculates the points <U(1:num),V(1:num)> at which a line <A,B> crosses a polygon <X(1:n),Y(1:n)>, provided that number of points found (NUM) is less than or equal to the storage given the output vector <U,V>.Based upon routine PFIND from the NSWC Mathematics Library.
a,b points ( a(1),a(2) ) and ( b(1),b(2) ) defining a line x,y the set of points ( x(i),y(i) ), i=1,2,3,....n define a polygon n the size of the x(:) and y(:) arrays
u,v the arrays U and V contain the number of points at which the line m the size of the U and V arrays num number of intersection points found at which the line crosses the polygon in order (provided that m < size(u)) ierr N where N is ...
o 0 no error detected o 1 if a = b o 2 U and V require more storage, i.e. num > m. o -i if the ith segment of the polygon is coincident with part of the line.
o Based upon routine PFIND from the NSWC Mathematics Library. o Code converted using TO_F90 by Alan Miller, Date: 2000-07-04 Time: 12:24:01 o Update Sun, Mar 5, 2017 8:04:46 AM
Nemo Release 3.1 | poly_intercept (3) | February 23, 2025 |