Serio (2001-07-15)

Maze generator.

Serio generates solvable mazes like many others, but different in that
Serio works on nonuniform triangles instead of uniform squares.

Program options

   -x <minx> <maxx>
   -y <miny> <maxy>

      Set X/Y range values.  The default is 72-540 for X and 72-720
      for Y.  This matches the default 8.5in x 11in x 72dpi grid size
      in Ghostscript.

      If only one value is specified (e.g. -x 35 -y 56), it's taken to
      be the difference, and lower bound defaults to 72.

      Serio has problems with negative values, so both numbers should
      be positive.

      For OpenGL mode, only the difference between those values are

   -d <seed>

      Seed the random number generator using <seed> instead of current


      Send output to an interactive Glut window instead of PostScript
      files.  Only available if compiled with OpenGL, see below.

   -o <output1> [output2]

      Set output PostScript file name to <output1>.  Maze will be
      written to this file instead of standard output.  If a second
      parameter [output2] is specified (i.e. next argument does not
      start with '-'), maze with solution is written to the second
      file, and the first file will not have the solution path

Point options

   These options add points to the grid, and can be used more than
   once.  Minimum numerical value for all parameters is 3.  The higher
   the values, the longer it takes to generate a maze.

   -i <file>

      Add points to grid using data from <file>.

      <file> contains real numbers in plain ASCII text, alternating
      between x/y values.  Separator between fields is anything that
      can't be parsed as part of a number, e.g. ',', ' ', '()', etc.

   -u <column> <row>
   -b <column> <row>
   -t <column> <row>

      Add uniform grid points.  The output looks more or less
      rectangular, where -u generates points spaced in rectangular
      fashion and -t generates triangles.  -b is similar to -u except
      the grid is distorted.

      Note that because Serio operates on triangles, it's unlikely
      that you will ever get a maze with only square cells, even if
      you use -u.

   -c <ring> <div>

      Add circular grid points.  <ring> is the number of concentric
      circles, and <div> is number of points per circle.

   -s <spoke> <step>

      Add spiral grid points.  <spoke> is the number of spikes, <step>
      is the number of points per spike.

   -r <count>

      Add random points.

About OpenGL

   OpenGL support is optional and disabled by default.  To compile
   with OpenGL, pass USE_OPENGL=1 to make.  For the two included
   executable, serio.exe does not have OpenGL compiled in (and
   therefore does not depend on opengl32.dll, glu32.dll and
   glut32.dll).  serio_gl.exe is compiled with OpenGL support.

   The OpenGL enabled executable is a strict superset of the plain
   executable, that does more of everything, including leaking memory
   (neither memprof or memusage reported memory leaks before, but
   happened as soon as I make any glut calls).

   Note that you still have to specify all options to generate the
   maze.  The GL thing is an interactive maze viewer, not an
   interactive maze generator.

   After starting Serio in OpenGL mode, left click in window will show
   a path from start node (marked in red) to selected node.  The exit
   node is marked in green.

   Pressing 'a' toggles antialiasing.  May not make any difference
   depending on your graphics hardware.

   'q' ends the program.

About PostScript

   Serio was intended to be a PostScript only program in the
   beginning.  That's why the GL viewer is only a viewer and doesn't
   let you generate new mazes there.

   In the PostScript output, both start and end node are colored red
   (as opposed to red and green in the GL output).  This is because it
   doesn't matter much to the solver, since it always have to draw the
   complete path from one to the other.  It matters to the GL viewer
   because it's often asked to draw a partial path.

   Only LanguageLevel 1 commands are used by Serio, so most viewers
   should be fine.  Ghostview and Ghostscript both displays the result
   as expected.

   PostScript is a really cool language :)  I would have written the
   entire program in PostScript instead of C, but I guess it's not
   *that* cool...  I actually tried to do it, and Ghostscript gave me
   stack overflow for any grid bigger than 4 by 6 cells.  So I guess
   that's that.

About Serio

   Serio is named after another To Heart character (one of two robots
   in the game/anime, the other one is Multi).  I believe she can
   connect to satellites and stuff so that she will never get lost.
   Other than that, the character bears no relation to my program,
   it's just my convention to use those names ^_^;;

-- -