POV-Ray : Newsgroups : povray.binaries.images : Rectangular Mazes Server Time
1 Nov 2024 22:16:48 EDT (-0400)
  Rectangular Mazes (Message 1 to 10 of 37)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Robert McGregor
Subject: Rectangular Mazes
Date: 11 Feb 2012 12:55:00
Message: <web.4f36a9c2be81e7d194d713cc0@news.povray.org>
Hi all,

Last week I started pondering the creation of random, perfect rectangular mazes
(single entrance & exit with a single correct path between them, and no loops or
orphaned/unused areas) using only the POV-SDL. It's probably been done before
but, since I often use POV-Ray as a de-stressing agent, as a personal challenge
I spent a couple of evenings writing a set of maze macros. At parse time the
mazes are randomly "discovered" and maze data is stored in a 2d array. In a
nested loop each wall is assembled using 3 boxes (2 corner boxes connected by a
wall box).

After I got it all working properly I started thinking about what I could
actually /use/ this for (pigments, bump maps, image patterns, height fields,
etc.) and began experimenting with various scene ideas. Here are some basic
example mazes rendered with an orthographic camera; 8x8, 16x16, and 32x32 units
respectively.

Cheers,
Rob
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'maze_test_samples.jpg' (102 KB)

Preview of image 'maze_test_samples.jpg'
maze_test_samples.jpg


 

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 13:05:02
Message: <web.4f36ad097cb043df94d713cc0@news.povray.org>
Here's a 100x100 unit maze (union of 60,000 boxes), also rendered with an
orthographic camera.
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'maze_test100x100.jpg' (587 KB)

Preview of image 'maze_test100x100.jpg'
maze_test100x100.jpg


 

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 13:10:02
Message: <web.4f36ae1c7cb043df94d713cc0@news.povray.org>
This maze is the same 60,000 unioned boxes (100x100 units) rendered in
perspective with camera near the ground instead of directly above.
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'maze_test1.jpg' (613 KB)

Preview of image 'maze_test1.jpg'
maze_test1.jpg


 

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 13:15:02
Message: <web.4f36af627cb043df94d713cc0@news.povray.org>
This image uses the orthographic 100x100 unit maze image (blurred slightly) as a
height field.
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'maze_test2.jpg' (1069 KB)

Preview of image 'maze_test2.jpg'
maze_test2.jpg


 

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 13:20:02
Message: <web.4f36b0517cb043df94d713cc0@news.povray.org>
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.
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'hedge_maze1.jpg' (364 KB)

Preview of image 'hedge_maze1.jpg'
hedge_maze1.jpg


 

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 13:25:01
Message: <web.4f36b19b7cb043df94d713cc0@news.povray.org>
Using random mazes to form the faces I built a set of boxes for this image (a
total of 67,105 unioned boxes). The maze proportions are 3, 5, 8, 13, 21, and 34
units respectively (yes, Fibonacci). This version uses my fake ambient occlusion
technique.
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'fibonnaccimazecubes_ao.jpg' (275 KB)

Preview of image 'fibonnaccimazecubes_ao.jpg'
fibonnaccimazecubes_ao.jpg


 

From: Robert McGregor
Subject: Re: Rectangular Mazes
Date: 11 Feb 2012 13:25:02
Message: <web.4f36b2237cb043df94d713cc0@news.povray.org>
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


Post a reply to this message


Attachments:
Download 'fibonnaccimazecubelamps.jpg' (340 KB)

Preview of image 'fibonnaccimazecubelamps.jpg'
fibonnaccimazecubelamps.jpg


 

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

Goto Latest 10 Messages Next 10 Messages >>>

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