POV-Ray : Newsgroups : povray.binaries.scene-files : Hexagon Maze Macros : Hexagon Maze Macros Server Time
2 Sep 2024 20:15:40 EDT (-0400)
  Hexagon Maze Macros  
From: Robert Chaffe
Date: 5 Mar 2000 22:38:31
Message: <38c32837@news.povray.org>
Attached is another .inc file containing macros for generating mazes.
This time they produce hexagonal cells.

Maze generation is split into two parts.  The first macro is named
GenHexMaze.  This is used to generate the direction data for the maze.
This data is written to an ASCII file.  The second macro is named
HexMaze.  This one reads that file and creates the maze object.

The HexMaze declares a solution path object named
HexMazeSolutionDots.

There is also a HexPipeMaze macro that uses the same data.

Parameters are explained in the attached file.

Here is a simple example:
----------
GenHexMaze( 15, 19, 1, off, "htest.dat" )
object {
   HexMaze( "htest.dat", 1, 0.15, 0.5 )
   pigment { rgb <0,1,0> }
}
object { HexMazeSolutionDots pigment { rgb <0,0.7,1> } }
----------

rc


Post a reply to this message


Attachments:
Download 'amazehex.inc.txt' (28 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.