[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with Value2dDisplay
From: |
James Marshall |
Subject: |
Problems with Value2dDisplay |
Date: |
Wed, 29 Jul 1998 12:36:33 GMT |
Hi all,
I hope someone can help me with this... I'm having problems with
Value2dDisplay. I use a Value2dDisplay to convert population
densities of agents into a grey scale range from 1 to 10.
In the code below, populationDisplay is a Discrete2d object. This
code prints the correct result for each cell, which is 1 initially.
However when I call the display method of the Value2dDisplay, it
displays colours distributed across the entire grey scale range.
[populationDisplay putValue:
(long)(((double)localPopulation/maxAgents)*10+1) atX: x Y: y];
printf("%i\n",(int)[populationDisplay getValueAtX: x Y: y]);
Does anyone have any ideas what's going on here?
James
--
James Marshall - Postgraduate Research Student (MPhil/PhD)
Artificial Intelligence Group - Department of Computer and Information Sciences
De Montfort University - Milton Keynes Campus
Web:- http://www.mk.dmu.ac.uk/~jmarshall/
==================================
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.
==================================
- Problems with Value2dDisplay,
James Marshall <=