Previous: utrma Up: ../plot79_u.html Next: utrp10
SUBROUTINE UTRNR2 (NORMAL,X,INCX,Y,INCY,N) C$ (Make Normals - 2-D) C$ Given a 2-D polygon of N vertices, no adjacent pair of C$ which are coincident, construct and return the inward C$ pointing unit normal vectors, possibly for use by one of C$ the polygon clipping algorithms. The polygon is assumed to C$ be ordered such that in visiting the vertices 1..N in C$ order, the interior always lies to the left of the C$ direction vector between any vertex pair. The arguments C$ are: C$ C$ NORMAL(3,N)....Array of 2-D unit normals returned. C$ X(*)...........Array of X vertex coordinates. C$ INCX...........Increment between successive vertex entries C$ in X(*). C$ Y(*)...........Array of Y vertex coordinates. C$ INCY...........Increment between successive vertex entries C$ in Y(*). C$ N..............Number of vertices. C$ C$ If INCX or INCY is negative, the starting point is taken as C$ (1-N)*INC + 1, so that the corresponding array is stepped C$ through in reverse order. C$ (21-MAR-83)