POV-Ray : Newsgroups : povray.binaries.animations : Maze generation - maze-10x10.gif : Re: Maze generation - maze-10x10.gif Server Time
19 Jul 2024 07:18:52 EDT (-0400)
  Re: Maze generation - maze-10x10.gif  
From: Peter Popov
Date: 23 Apr 2003 08:45:24
Message: <4i1davcfjfertr5qe7qq3uhanag0g9ou05@4ax.com>
On Wed, 23 Apr 2003 11:38:22 GMT, mca### [at] aolcom (S McAvoy) wrote:

>It's very good Peter, but there are no entry or exit points.

That's right, you're doomed to seek forever :)

Seriously, it's all a single maze so the entry and exit points can be
any two points in the maze or on the walls.

>How are the paths determined?

"Prim's Algorithm

"1. Maintain three sets of cells: IN, OUT, and FRONTIER.  Initially,
choose one cell at random and place it in IN.  Place all of the cell's
neighbors in FRONTIER and all remaining cells in OUT.

"2. While FRONTIER is not empty do the following:  Remove one cell at
random from FRONTIER and place it in IN.  If the cell has any
neighbors in OUT, remove them from OUT and place them in FRONTIER.
The cell is guaranteed to have at least one neighbor in IN (otherwise
it would not have been in FRONTIER); pick one such neighbor at random
and connect it to the new cell (ie knock out a wall)."


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

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