glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

documentation for gradients (was: [glob2-devel] More Map code improvemen


From: Joe Wells
Subject: documentation for gradients (was: [glob2-devel] More Map code improvements)
Date: Wed, 05 Sep 2007 22:33:54 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

"Kai Antweiler" <address@hidden> writes:

>> I might look into algorithmic improvements next; I just hope that I've
>> understood the purpose correctly. Oh, lookit that, there's some
>> documentation on gradients - I'd better go read that then.
>
> We use the words "field", "area" and "circuit" synonymously.
>
> gradient values:
> 0:     inaccessable area
> 1:     lowest (real) gradient value
> 2:     lowest gradient value that can spread to an adjacent area
> 255: resource (i.e: source of the gradient for a specific resource)
> and highest value
>
> We have two gradients for each resource: one for the globs that can swim and 
> one
> for those who can't.  Same is true for other gradients
>
> A gradient map is filled with 0's 1's and 255's depending of what kind
> of field we are
> looking.  The sources (255) we write into a queue.
>
> We pull from the queue a field.  For every adjacent field with
> positive gradient value
> we check whether its value is at least as high as the value of the
> field we pulled
> minus 1.  If it is not this value is written to that field an it is
> pushed to the queue.
> Now, pull the next field.
>
> That is the simplest algorithm.
> The others use geometric structures, but of course produce the same result.

This is lovely documentation.  Can you please put it somewhere more
official?  That would be great!

-- 
Joe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]