Maze generation: Difference between revisions

m
→‎{{header|POV-Ray}}: Explanation added about iterative approach
m (→‎{{header|POV-Ray}}: Removed some unnecessary debugging code)
m (→‎{{header|POV-Ray}}: Explanation added about iterative approach)
(One intermediate revision by the same user not shown)
Line 7,279:
 
=={{header|POV-Ray}}==
This POV-Ray solution uses an iterative rather than recursive approach because POV-Ray has a small stack for recursion (about 100 levels) and so the program would crash on even quite small mazes. With the iterative approach it works on very large mazes.
<syntaxhighlight lang="pov">
#version 3.7;
Line 7,293 ⟶ 7,294:
#declare Wall = prism {
0, 0.8, 7,
<0, -0.5>, <0.05, -0.45>, <0.05, 0.45>, <0, 0.5>, <-0.05, 0.45>, <-0.05, -0.45>, <0, -0.5>
<-0.05, 0.45>, <-0.05, -0.45>, <0, -0.5>
texture {
pigment {
Line 7,436 ⟶ 7,438:
 
light_source {
<-0.1*Cols, Rows, 0.5*Rows>, colour rgb <1, 1, 1>
area_light
x, y, 3, 3
12

edits