POV-Ray : Newsgroups : povray.binaries.scene-files : Enhanced Maze Macros 26K bu Server Time
2 Sep 2024 18:19:52 EDT (-0400)
  Enhanced Maze Macros 26K bu (Message 1 to 1 of 1)  
From: Robert Chaffe
Subject: Enhanced Maze Macros 26K bu
Date: 1 Mar 2000 23:29:16
Message: <38bdee1c@news.povray.org>
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)

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