Previous: hlpuic Up: ../plot79_h.html Next: hzncv
SUBROUTINE HZNBO (TOP, BOTTOM, MAXHZN, X, Y, P, N1, N2,
X MAXXYP, IDIR, PL2)
C$ (Bounds)
C$ This routine updates and plots the top and bottom horizons
C$ for a hidden-line view. Unlike VISBO, which maintains a
C$ variable spaced horizon with a complicated update
C$ algorithm, HZNBO divides the horizon into "MAXHZN"
C$ equally-spaced vertical strips, so that updating merely
C$ involves a quick determination of which part of the horizon
C$ is involved. The horizon arrays must be initialized before
C$ the hidden-line process begins, using large negative and
C$ positive values for the top and bottom horizons,
C$ respectively. The arguments are:
C$
C$ TOP(MAXHZN)...........Top horizon array.
C$ BOTTOM(MAXHZN)........Bottom horizon array.
C$ MAXHZN................Number of points in horizon
C$ (e.g. 200..1000).
C$ X(MAXXYP),Y(MAXXYP)...Coordinates on function curve.
C$ P(MAXXYP).............Visibility of function points.
C$ N1,N2.................Range of indices in function arrays
C$ X(*), Y(*), P(*). These may be in
C$ either order.
C$ MAXXYP................Maximum dimension of X(*), Y(*), P(*).
C$ IDIR..................Pen direction flag. It should be set
C$ to +1 before the first call and left
C$ unchanged thereafter, since it is
C$ updated internally each time a
C$ visible sweep is made.
C$ PL2...................2-D pen movement routine, usually
C$ PL2CA.
C$
C$ In order for this routine to work properly, the number of
C$ points on the horizon must be rather large, so that the
C$ histogramming provides a satisfactory representation of the
C$ surface. Obviously, the number of horizon points need not
C$ exceed the plotter resolution. In practice, about 100/inch
C$ (40/cm) will often give acceptable results.
C$
C$ (19-MAR-83)