![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4f36a9c2be81e7d194d713cc0%40news.povray.org%3E/maze_test_samples.jpg?ttop=443866&toff=1850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4f36ad097cb043df94d713cc0%40news.povray.org%3E/maze_test100x100.jpg?ttop=443866&toff=1850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4f36ae1c7cb043df94d713cc0%40news.povray.org%3E/maze_test1.jpg?ttop=443866&toff=1850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4f36af627cb043df94d713cc0%40news.povray.org%3E/maze_test2.jpg?ttop=443866&toff=1850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4f36b0517cb043df94d713cc0%40news.povray.org%3E/hedge_maze1.jpg?ttop=443866&toff=1850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4f36b19b7cb043df94d713cc0%40news.povray.org%3E/fibonnaccimazecubes_ao.jpg?ttop=443866&toff=1850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4f36b2237cb043df94d713cc0%40news.povray.org%3E/fibonnaccimazecubelamps.jpg?ttop=443866&toff=1850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Robert McGregor" <rob### [at] mcgregorfineart com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Robert McGregor" <rob### [at] mcgregorfineart com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |