swarm-support
[Top][All Lists]
Advanced

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

Re: Heatbug related inquiries...


From: bleydorf
Subject: Re: Heatbug related inquiries...
Date: Tue, 05 Aug 1997 11:08:15 -0400

Ken Cline wrote:
> 
> On Fri, 1 Aug 1997 address@hidden wrote:
> 
> > Would it be possible to have another heatspace window, up showing
> > another varible spatially (ie. unhappiness)?
> 
> Our first model had 4 views of the "world" for 4 separate
> types of data (eg altitude, vegetation, risk, etc).  The
> type of data determines which structure (eg discrete2d,
> diffusion2d, etc.) you choose to hold the data.
> 
> > And how does the various gradations of red get displayed for the heat.
> > That is, how are various levels of heat actually drawn in the code?
> 
>    Red(x,y)   = Heat(x,y) / 512 + 0, Note: integer division
>    Green(x,y) = 0
>    Blue(x,y)  = 0
> 
> >From HeatbugObserverSwarm.m
> 
>   // Colours [0,64) are assigned to the range Red [0, 1), for heat display.
>   for (i = 0; i < 64; i++)
>     [colormap setColor: i ToRed: (double)i / 63.0 Green: 0 Blue: 0];
> 
> and
> 
>   [heatDisplay setDisplayMappingM: 512 C: 0]; // turn [0,32768) -> [0,64)
> 
> Also see Value2dDisplay.

I think I know what's going on here.  The various values of heat are
being converted to the 64 levels of red used in the heat map.  So
heatvalues 0-512 = red level 0, heatvalues 513-1026 = red level 1, and
so on.  But what does the parameters in setDisplayMappingM:C: mean? 
What does the M and C mean? 

And speaking of "M" why didn't they call that macro M something more
descriptive instead of M?

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

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