swarm-support
[Top][All Lists]
Advanced

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

Multiple Value2dDisplay's on a single Raster


From: Rick Riolo
Subject: Multiple Value2dDisplay's on a single Raster
Date: Tue, 21 Apr 1998 15:37:07 -0400 (EDT)

I have a student who is extending the SugarScape that
Nelson Minor provided.   One issue is how to display
on a single Raster both the sugar and spice values.

It would be best would be if these were displayed in two different colors,
though the SugarScape book just displays them as one color
(because the hills are in different parts of the world).
I suppose if there was overlap (ie some cells with some of each
resource...I don't know if this happens in the SugarSpace book
examples or not), one color could overwrite the other.

As far as I can see, this can't be done directly with
the current Value2dDisplay (at least in version 1.0.5).
In this case if one sets up 2 Grid2D's to hold the different
kinds of values, and has 2 Value2dDisplays mapping those
to the same raster, whatever gets written second over-writes
*all* of the Raster, ie., the zero values are not transparent
so that in effect only the second to be written values
are seen in the Raster.

Is there any way to do this easily in the current Swarm?
Are there any plans for this?

(One hack: have a combined Grid2d for the values,
combine the two types of values in that one object, and have one 
Value2dDisplay map from there to the Raster.  This would
work ok I imagine, but the resources would be the same color.)

Another solution would be to do the writing to the Raster
without using Value2dDisplays, I suppose.
Sounds like lots of work to me.

One solution might be to write a Values2dDisplays,
which would accept multiple sources of data, and
allow the user to specify that a certain value is
"transparent".  

Any other solutions or ideas about this?
Thanks.

 - r

Rick Riolo                           address@hidden
Program for Study of Complex Systems (PSCS)
4068 Randall Lab                
University of Michigan         Ann Arbor MI 48109-1120
Phone: 313 763 3323                  Fax: 313 763 9267
http://www.pscs.umich.edu/PEOPLE/rlr-home.html


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