[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thinking of coloring my heatbugs
From: |
Paul E. Johnson |
Subject: |
Thinking of coloring my heatbugs |
Date: |
Wed, 4 Feb 1998 10:58:20 -0600 (CST) |
If this has been covered before, I apologize.
I'm thinking of changing the heatbugs program so that the bugs are color
coded by their ideal temperature. Instead of all green, suppose the ones
with the lowest ideal temperatures are blue and the highest are white, and
in between we have a gradient. To do this, I'm looking at the swarm
source and various features. Tell me about this plan.
1. In HeatbugObserverSwarm, colors are set aside already for green, white,
and 1-63 are shades of red. Could I set aside colors 66-129 for my
green/white color scale? If that's feasible, I understand I've got to
master the setColor: To... method. From looking at it, I'm not quite
sure, but I guess I can set Red and Blue any way I like and let green
vary? (why is 63 the magic number in the setColor for the heatscale?)
2. Once I've got numbers set for colors, I need to fix the Heatbug.m.
After the idealTemperature is set, I just fix the variable c to be
a variable in the heatbug object that reflects the color assigned.
>From looking at it for a while, I wonder what I'm missing.
Oh, incidentally, what does this code do??? (from HeatbugObserverSwarm):
CREATE_ARCHIVED_PROBE_DISPLAY (heatbugModelSwarm);
CREATE_ARCHIVED_PROBE_DISPLAY (self);
Is this necessary for the macro to save window positions, as in:
worldRaster = [ZoomRaster createBegin: [self getZone]];
SET_WINDOW_GEOMETRY_RECORD_NAME (worldRaster);
worldRaster = [worldRaster createEnd];
Paul E. Johnson address@hidden
Dept. of Political Science Office: (913) 864-9086
University of Kansas FAX: (913) 864-5700
Lawrence, Kansas 66045 Home: (913) 842-9916
==================================
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.
==================================
- Thinking of coloring my heatbugs,
Paul E. Johnson <=