POV-Ray : Newsgroups : povray.binaries.images : Rectangular Mazes Server Time
14 Jun 2025 17:18:39 EDT (-0400)
  Rectangular Mazes (Message 8 to 17 of 37)  
<<< Previous 7 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Stephen
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 13:56:05
Message: <4f36b9c5@news.povray.org>
On 11/02/2012 5:51 PM, Robert McGregor wrote:
> Hi all,

You are going mad with this, Robert. :-D
I really like the maze with trees and the boxes too.


-- 
Regards
     Stephen


Post a reply to this message

From: Samuel Benge
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 15:00:01
Message: <web.4f36c80f7cb043df4f79afa40@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> Here's a 100x100 unit maze (union of 60,000 boxes), also rendered with an
> orthographic camera.

Pretty cool, Robert. It passes the flood fill test ;) The solution is very
convoluted, though quite linear in the sense that it's easy to determine where
to go. The branches along the way often terminate abruptly or are bounded by the
path already taken. I might have had a problem at the very bottom if I hadn't
known that the exit was on the right wall... but don't feel bad, many of my
previous attempts had obvious solutions too (more so than yours) :)

Care to give an overview of the algorithm?

Last spring I was experimenting with mazes myself, the subject being something I
go back to from time-to-time. I was investigating the use of large point sets
and nearest neighbor searches (using Voronoi diagrams), and using POV as a major
step. The results were satisfactory, but my designs were confined to cases where
the perimeter wall was easy to define, such as circular mazes.

Sam


Post a reply to this message

From: Samuel Benge
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 15:50:02
Message: <web.4f36d42c7cb043dfd11d3a070@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> For this image I used my 100x100 unit orthographic example as an image pattern
> mask to specify target boundaries for tracing 1.3 million tree instances down
> onto a plane, assembling a huge hedge maze.

I really like this version. Is the tree a mesh, and if so, did you use a utility
to generate it? Just started playing with Arbaro yesterday. Great program, but a
bit difficult to use.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 17:28:15
Message: <4f36eb7f$1@news.povray.org>
On 11/02/12 19:15, Robert McGregor wrote:
> For this image I used my 100x100 unit orthographic example as an
> image pattern mask to specify target boundaries for tracing 1.3
> million tree instances down onto a plane, assembling a huge hedge
> maze.

   The whole maze thing is impressive, but this application is awesome...
and knowing how well you do with poser characters, I was expecting to
see someone lost there. ;)

--
Jaime


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 19:21:45
Message: <4f370619$1@news.povray.org>
Samuel Benge wrote:

> Care to give an overview of the algorithm?

I don't know what Robert used, but generating a maze was one of the
exercises in the introduction to computer science course I took way
back when I was young ;) There we were to apply a strategy called
union-find, a general way to manage disjoint partitions of sets.

The application here was to imagine a grid where each tile could
either be free or filled with a wall, and start out with a with a
"maze" consisting of completely disconnected rooms (or, in the
language of the data structure, one-element subsets).

######...
# # #
######...
# # #
######...
...

You can then randomly merge two rooms by removing a common wall,
if available. In the union-find structure they are replaced by a
two-element subset, so that basically manages the list of already
connected component. Repeat the process until only one subset is
left (this generates a maze where every two rooms are connected
by exactly one path).


Post a reply to this message

From: nemesis
Subject: Re: Rectangular Mazes
Date: 12 Feb 2012 04:10:00
Message: <web.4f3780cd7cb043dfc83ceb410@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> To play with maze shadows I turned the maze boxes into "maze lamps" for this
> version. The floor also uses my original 100x100 unit orthographic example as a
> bump map.
> -------------------------------------------------
> www.McGregorFineArt.com

I hope you get stressed more often. :)

That goes to Sam and Jaime too...


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rectangular Mazes
Date: 12 Feb 2012 04:31:29
Message: <4f3786f1$1@news.povray.org>
On 11-2-2012 19:23, Robert McGregor wrote:
> To play with maze shadows I turned the maze boxes into "maze lamps" for this
> version. The floor also uses my original 100x100 unit orthographic example as a
> bump map.
> -------------------------------------------------
> www.McGregorFineArt.com

You cant stop, can you? :-)

Impressive maze work indeed. Lamp mazes and tree mazes are my favourites.

Thomas


Post a reply to this message

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 12 Feb 2012 16:20:00
Message: <web.4f382cf57cb043df94d713cc0@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> "Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> > For this image I used my 100x100 unit orthographic example as an image pattern
> > mask to specify target boundaries for tracing 1.3 million tree instances down
> > onto a plane, assembling a huge hedge maze.
>
> I really like this version. Is the tree a mesh, and if so, did you use a utility
> to generate it? Just started playing with Arbaro yesterday. Great program, but a
> bit difficult to use.

Yes, it's a low-poly mesh I made in Wings3d, with image maps and image pattern
masking for the branches. I got the idea for the tree from this Wings3d video
tutorial:

http://www.pxleyes.com/video-tutorial/daz-studio/10005/Making-a-CG-Christmas-Tree.html
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 12 Feb 2012 16:30:00
Message: <web.4f382e377cb043df94d713cc0@news.povray.org>
Stephen <mcavoys_at@aoldotcom> wrote:
> You are going mad with this, Robert. :-D
> I really like the maze with trees and the boxes too.

Thomas de Groot <tho### [at] degrootorg> wrote:
> You cant stop, can you? :-)
>
> Impressive maze work indeed. Lamp mazes and tree mazes are my favourites.

Thanks guys, I was feeling a bit out of sorts after my drive crashed last week
and I lost much of the work I'd done on my 2nd Japanese shot for TC-RTC, so I
got sidetracked on (and a bit obsessed with) mazes...
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 12 Feb 2012 17:15:01
Message: <web.4f38394b7cb043df94d713cc0@news.povray.org>
Samuel Benge wrote:
> Care to give an overview of the algorithm?

My algorithm is similar to Christian's. I start with a 2d array of cells with
all 4 walls up in each cell. Each cell is a 4D vector <x,y,z,t> representing
<N,E,S,W>. Calculate total number of cells, randomly pick entrance and exit
cells from the borders, and make the entrance cell the current cell. Keep a
tally of each cell visited.

For the current cell check neighboring cells to find any with all walls still
up. Pick one of those at random and remove the wall between them, move to that
cell make it the current one, and loop until you've visited all cells or hit a
dead end (no more neighbors with all walls up) In that case, back track until
you find some valid neighbors and continue.

I just uploaded my maze include file and a few sample scenes to p.b.s-f for
anyone that wants to have a go at it.
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

<<< Previous 7 Messages Goto Latest 10 Messages Next 10 Messages >>>

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