POV-Ray : Newsgroups : povray.off-topic : Vector flood fill? : Re: Vector flood fill? Server Time
3 Sep 2024 15:16:31 EDT (-0400)
  Re: Vector flood fill?  
From: andrel
Date: 16 Nov 2010 03:17:28
Message: <4CE23E1A.1000409@gmail.com>
On 16-11-2010 4:35, Darren New wrote:
> Darren New wrote:
>> I'm thinking you could probably triangulate all the areas between
>> verticies.
>
> FWIW, it looks like
> http://en.wikipedia.org/wiki/Delaunay_triangulation
> is getting me on the way.

I was thinking about that too,but you can not guarantee that existing 
walls are part of the triangles. You need an additional program to flip 
edges until all are in the correct order.

I think this may also work:
(first close the exit in order to get one graph)
create a list by a depth first search over the entire tree and note 
every node number going down and up.

make an emty list of triangles
repeat
- find three consecutive points that form a triangle with a positive area
- add that triangle to your list of triangles
- remove middle point from list
until list contains 2 elements (both sides of the entrance)


Post a reply to this message

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