Re: pathing.

new topic     » goto parent     » topic index » view thread      » older message » newer message

I had similar problem once. I had many polylines instead of maze and had to
get regions (polygons) from them.
I don't see any faster way but to simply go into all directions from 1 and
where 5's are. On every "crossroad, that's where there are more than 1 5's
you have to remember path till then and into which direction you will have
to look later. You can save this into a todo sequence. When you get to
dead-end of one path you get next "todo" path.


----- Original Message -----
From: <mistertrik at hotmail.com>
To: "EUforum" <EUforum at topica.com>
Subject: pathing.


>
> example of problem:
>
> sequence maze = {
> {5,5,5,5,5,5,5,5,5,5,5,5},
> {5,0,0,0,0,0,0,0,0,0,0,5},
> {5,0,0,0,0,5,0,0,0,0,0,5},
> {5,1,0,0,0,5,0,0,0,0,0,5},
> {5,0,0,0,0,5,0,0,0,9,0,5},
> {5,5,5,5,5,5,5,5,5,5,5,5}}
>
> How do I find a path to go from the 1 to the 9, avoiding all non-5
elements?
> (assume that there is only 1 1 and only 1 9, and their locations are known
> in advance)
> =====================================================
> .______<-------------------\__
> / _____<--------------------__|===
> ||_    <-------------------/
> \__| Mr Trick
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu