swarm-support
[Top][All Lists]
Advanced

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

Re: Problems with Value2dDisplay


From: Alex Lancaster
Subject: Re: Problems with Value2dDisplay
Date: 30 Jul 1998 12:31:51 -0600

>>>>> "JM" == James Marshall <address@hidden> writes:

JM> Hi all, I hope someone can help me with this... I'm having
JM> problems with Value2dDisplay. I use a Value2dDisplay to convert
JM> population densities of agents into a grey scale range from 1 to
JM> 10.  In the code below, populationDisplay is a Discrete2d
JM> object. This code prints the correct result for each cell, which
JM> is 1 initially.  However when I call the display method of the
JM> Value2dDisplay, it displays colours distributed across the entire
JM> grey scale range.

JM> [populationDisplay putValue:
JM> (long)(((double)localPopulation/maxAgents)*10+1) atX: x Y: y];
JM> printf("%i\n",(int)[populationDisplay getValueAtX: x Y: y]);

JM> Does anyone have any ideas what's going on here?  James -- James

Can you post the code where you set up your Colormap as well?  I
suspect that's maybe where you are running into problems.  In fact try
and post all the relevant bits from your -buildObjects method in your
ObserverSwarm (assuming that's where you set up your GUI widgets).

Alex

-- 
  Alex Lancaster         |   e-mail: address@hidden
  Swarm Developer        |      web: http://www.santafe.edu/~alex
  Santa Fe Institute     |      tel: +1-(505) 984-8800 (ext 242)
------------------------------------------------------------------

                  ==================================
   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]