Previous: dem81 Up: ../plot79_d.html Next: dem86
SUBROUTINE DEM82 (NIN,NOUT)
C$ (DEM82 - Hilbert Curves)
C$ This routine demonstrates the translation of the recursive
C$ Hilbert curve into a non-recursive stack-based algorithm in
C$ SFTRAN3. The code follows DEM81 (Sierpinski Curves) very
C$ closely.
C$
C$ Apart from its geometrically interesting shape, tending
C$ toward space filling, the principle interest of the Hilbert
C$ curve here is that it can be made arbitrarily long by
C$ simply increasing the order, and it therefore may serve as
C$ a useful test of plotter speed.
C$
C$ A Hilbert curve of order N has 4**N vertices. Unlike the
C$ Sierpinski curves, the Hilbert curves are not closed. They
C$ can be used as a test of a polygon flood fill algorithm
C$ which fills up to, but not including, the boundary color;
C$ the flood fill should then completely cover the display
C$ surface, except for the single Hilbert curve marking its
C$ boundary.
C$
C$ For amusement, the curves are plotted in five different
C$ coordinate systems.
C$ (19-SEP-85)