POV-Ray : Newsgroups : povray.off-topic : Vector flood fill? Server Time
3 Sep 2024 21:13:57 EDT (-0400)
  Vector flood fill? (Message 21 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: andrel
Subject: Re: Vector flood fill?
Date: 21 Nov 2010 14:22:50
Message: <4CE9718A.4080802@gmail.com>
On 15-11-2010 7:23, Darren New wrote:
> Say you have something like this, as a list of endpoints, not as a raster:
>
> http://www.puz.com/sw/amorphous/theory/amz1.jpg
>
> Any idea how one would go about finding the paths amongst this? I.e.,
> given just the endpoints of the line segments as floats, and without
> rasterizing it, how would you find your way from any point in the maze
> to any other point?
>
> In a raster-based maze, you can just flood fill out from your goal,
> incrementing the distance for each step, and then trace back along
> descending distances. (I.e., use a flood-fill to set the value in each
> room to be the distance to the exit, then always turn towards lower
> numbers.)
>
> But that technique assumes you have a fixed set of positions to test.

I almost forgot that this threat started with this question.

Attached is your a-mazeing planet.  All 'mountains' (grey) and all 
'rivers' (blue) are connected. There is also exactly one path between 
two mountain-nodes and between two river-nodes. (I think the last two 
lines are equivalent, but I don't feel like proving that ATM.)
If your maze is the rivers, walk over the mountain ranges. If the 
mountains are the maze use the boat.
Both are simple connected trees, so to find your way around any tree 
traversal routine will do.
I hope this answers your question ;)


Post a reply to this message


Attachments:
Download 'darrenworld.png' (491 KB)

Preview of image 'darrenworld.png'
darrenworld.png


 

From: Darren New
Subject: Re: Vector flood fill?
Date: 21 Nov 2010 19:04:41
Message: <4ce9b399$1@news.povray.org>
andrel wrote:
> I almost forgot that this threat started with this question.

Very cool. Thank you. :-)

> I hope this answers your question ;)

No, but the rest of the thread did. :-)

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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