NAME
	Menger sponge - produce a Menger Sponge (Sierpinski Sponge) as a byte volume 

AUTHOR
	Larry Gelberg, Advanced Visual Systems Inc. (larryg@avs.com)
SUMMARY
	Name	Menger sponge
	Type	Input
	Inputs	NONE
	Outputs	output - 	field 3D 3-space 1-vector uniform byte

	Parameters
	Name		Type	Default	Choices
	flip	toggle	off	off	on
	levels	islider	1	1	5

DESCRIPTION
A Menger Sponge (sometimes known as a Sierpinski Sponge) is a
recursively defined volume.  It is the 3D analog to a Sierpinski
Carpet which is can be poorly defined as a recursive 3x3 grid where
the center square of each level of the recursion is missing.  A more
formal definition can be found in Benoit Mandelbrot's book "The
Fractal Geometry of Nature" on page 144.

You can see a Sierpinski Carpet if you orthoslice the sponge and look
at slice 0 (any direction).

PARAMETERS
  flip (toggle) - this says whether to color the "on" voxels 0 or 255.

  levels (islider) - this defines the levels of recursion. 
	1 is a 3x3x3 cube (27 nodes)
	2 is a 9x9x9 cube (729 nodes)
	3 is a 27x27x27 cube (19,683 nodes)
	4 is a 81x81x81 cube (531,441 nodes)
	5 is a 243x243x243 cube (14,348,907 nodes and takes a while to compute!)

OUTPUTS
	output - field 3D 3-space 1-vector uniform byte

This can be rendered with tracer, or orthosliced

EXAMPLE NETWORKS
This is stored as menger.net in this directory.

	Menger sponge
              |
        compute shade
              |
           tracer
              |
       display tracker

RELATED MODULES

CURDLE (at the IAC) is another example of a module which produces
recursively defined "fractal" data sets.