[UP]


Manual Reference Pages  - poly_intercept (3)

NAME

poly_intercept(3f) - [M_math:geometry] intersection of a straight line and polygonal path

CONTENTS

Synopsis
Description
Options
Returns
Example
Pedigree

SYNOPSIS

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)   :: n

REAL, INTENT(OUT) :: u(:) REAL, INTENT(OUT) :: v(:)

INTEGER, INTENT(IN) :: m

INTEGER, INTENT(OUT) :: num INTEGER, INTENT(OUT) :: ierr

DESCRIPTION

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.

OPTIONS

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

RETURNS

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.

EXAMPLE

PEDIGREE

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


poly_intercept (3) October 17, 2020
Generated by manServer 1.08 from 7df6daf0-1a99-4596-b038-4a79542c505a using man macros.