POV-Ray : Newsgroups : povray.binaries.images : Rectangular Mazes : Rectangular Mazes Server Time
26 Apr 2024 18:29:28 EDT (-0400)
  Rectangular Mazes  
From: Robert McGregor
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


 

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