Last: visws Up: ../plot79_v.html Next: viscb
SUBROUTINE VISBO (X1, T1,B1, M, X0, T0,B0, N0, X,Y,P, N, X IDIR, PL2) C$ (Bounds) C$ This routine does almost all the work required by all of C$ the horizon-based hidden-line routines to compute the upper C$ and lower bounds (near and far horizons) of the surface C$ being graphed. The arguments are: C$ C$ X1(M)..........Temporary workspace for new arguments. C$ T1(M)..........Temporary workspace for new upper bounds. C$ B1(M)..........Temporary workspace for new lower bounds. C$ M..............Maximum dimension of X1, T1, and B1. C$ X0(N0).........Array for argument of old bounds. C$ T0(N0).........Array for old upper bounds. C$ B0(N0).........Array for old lower bounds. C$ N0.............Number of points currently in X0, T0, and C$ B0. It is not permitted to exceed M. C$ X(N)...........Array of arguments. C$ Y(N)...........Array of function values. C$ P(N)...........Array of visibility flags. C$ IDIR...........Direction of pen movement (1 = forward, -1 = C$ backward) This should be set to +1 before C$ the first call, and left unchanged C$ thereafter. It will be updated internally C$ each time a horizon sweep does any plotting. C$ PL2............2-D pen movement subroutine. C$ C$ On return, the new bounds are copied into X0, T0, and B0. C$ The Arrays X1, T1, and B1 are thus purely scratch areas C$ which need not be preserved by the caller. C$ C$ The version of 10-MAY-75 resulted in the array indices J C$ and J0 sometimes running out of range, and then being used C$ in an array reference. This caused visibility errors, C$ particularly in the demonstration program DEM07, which lost C$ the function "curtains" on the edges of the figure drawn. C$ The indices are now checked with the LOGICAL function C$ RANGE(LOW,J,LIMIT), which is .FALSE. if J is not in the C$ range (LOW,LIMIT) (including the endpoints). In addition, C$ under certain conditions, U(2) may be referenced before C$ initialization. The array U(*) is therefore zeroed at C$ entry. C$ (09-APR-82)