|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This may be a little off topic but I was wondering how it might be possible
to implement a stack in povray? Over the past few days I've been thinking of
developing a maze algorithm for pov. I've done some searching on the net and
from what I can see "depth first search" is a promising algorithm to use.
Unfortunately I have almost no programming ability so it's going to be a
little tricky to implement this. I was thinking of using 2 arrays to create
the maze, one would keep track of the visited cells in the maze and the
other would keep track of the walls. I might then be able to use a depth
first search like method to step through the cells randomly, knocking down
walls as I went. When it was finished I could then build the maze using the
wall array. This would require a stack I believe though. Does this sound
like a promising approach? I really don't know how I'm going to go about
this though, I guess I've got to just jump in and see what happens.
I've got this idea for a maze scene where all the walls of the maze are
lined with outdoor vendor stalls. There would be stalls selling fruit,
trinkets, and anything I could come up with, something reminiscence of the
streets of morocco, I think.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Sun, 1 Jul 2001 22:31:22 -0700, Thomas Lake wrote:
>This may be a little off
[snip]
For p.b.i yes, pobably well suited to povray.general as it is
a POV related subject. This group is for binary posts.
--
Cheers
Steve email mailto:ste### [at] zeroppsuklinuxnet
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
8:08am up 6:01, 2 users, load average: 1.02, 1.02, 1.00
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Thomas Lake" <tla### [at] homecom> wrote in message
news:3b400622@news.povray.org...
> This may be a little off topic but I was wondering how it might be
possible
> to implement a stack in povray? Over the past few days I've been thinking
of
> developing a maze algorithm for pov. I've done some searching on the net
and
> from what I can see "depth first search" is a promising algorithm to use.
> Unfortunately I have almost no programming ability so it's going to be a
> little tricky to implement this. I was thinking of using 2 arrays to
create
> the maze, one would keep track of the visited cells in the maze and the
> other would keep track of the walls. I might then be able to use a depth
> first search like method to step through the cells randomly, knocking down
> walls as I went. When it was finished I could then build the maze using
the
> wall array. This would require a stack I believe though. Does this sound
> like a promising approach? I really don't know how I'm going to go about
> this though, I guess I've got to just jump in and see what happens.
>
> I've got this idea for a maze scene where all the walls of the maze are
> lined with outdoor vendor stalls. There would be stalls selling fruit,
> trinkets, and anything I could come up with, something reminiscence of the
> streets of morocco, I think.
Probably shouldn't have posted this in a binary images group, actually. ;-)
Anyway, if you're looking for a method for creating mazes, look here:
http://www.donovansweb.com/~chaffe/
rc
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Thomas Lake" <tla### [at] homecom> wrote in message
news:3b400622@news.povray.org...
> This may be a little off topic but I was wondering how it might be
possible
> to implement a stack in povray? Over the past few days I've been thinking
of
> developing a maze algorithm for pov. I've done some searching on the net
and
> from what I can see "depth first search" is a promising algorithm to use.
If you want to do what I think you want to do, you're on the right lines
with a depth first algorithm, but, you don't need to implement the stack in
the POV scene description language. I take it you want a stack so that you
can implement a recursive algorithm ?
Well, the POV scene description language supports recursion ! You just
need to do something like this :
//////////////////////////////////////
#macro recursive(count)
#debug "."
#if(count>0)
recursive(count-1)
#end
#debug "\n"
#end
recursive(10)
/////////////////////////////////
This is untested, but if you stick it into a .pov file and run it you
should see 11 periods appear in the debug window/on screen...
BTW, I implemented a similar algorithm when I was at Uni, only my program
had to solve a maze rather than build one, but the principle is basically
the same...
--
Scott Hill.
Software Engineer.
E-Mail : sco### [at] innocentcom
Pandora's Box : http://www.pandora-software.com
*Everything in this message/post is purely IMHO and no-one-else's*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|