|
![](/i/fill.gif) |
Attached is my .inc file containing my new macros for generating mazes.
They're a bit more complex, but I hope not overly so. Parameters are
explained in the file.
The original macro was split into two parts. The first part is the macro
named GenSquareMaze and is used to generate the direction data for
the maze. This data is written to an ASCII file. The second part is a
macro simply named Maze that reads that file and creates the maze
object. This maze object has been changed from a difference CSG to
a simpler union CSG which renders faster.
The general idea behind the split was to allow an animation sequence
to generate the maze data only on the first frame and use the same data
on all frames. Parsing time becomes quite long for the GenSquareMaze
macro the larger the dimensions are set for the maze.
Added to the Maze macro is a declaration of two solution path objects:
MazeSolutionDots and MazeSolutionSolid.
The PipeMaze macro was also added. It also creates one solution path
object named PipeMazeSolution.
Here is a simple example:
--------------------
GenSquareMaze( 21, 27, 3, no, "ptest.dat" )
object {
PipeMaze( "ptest.dat", 1, 0.65, no )
pigment { rgb <1,0.5,0> }
finish { specular .5 }
}
object { PipeMazeSolution pigment { rgb <0,0.7,1> } finish { specular .5 } }
--------------------
Experiment. Enjoy!
rc
Post a reply to this message
Attachments:
Download 'amaze.inc.txt' (26 KB)
|
![](/i/fill.gif) |