swarm-support
[Top][All Lists]
Advanced

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

how to make phase plot in swarm?


From: Paul Johnson
Subject: how to make phase plot in swarm?
Date: Tue, 16 Nov 1999 17:04:52 -0600

I want a graph that shows where a creatures start out in a 2D space and
where they travels during the run of a model.  So far, I've been using a
zoom raster and writing on it every time without erasing, so the
movements are traced out. But it doesn't look so pretty.  

So I'm thinking about changing the "drawSelf" method to write the pixmap
at the initial time step and then draw a line from where the creature
has been to where it ends up, at each step.  This requires a little book
keeping to save the old position, but I think I can manage it.  Would
you do it that way?  

The underlying positions I'm trying to graph lie in the continuum from 0
to 100, and I map them onto the grid of the Raster by casting them as
integers.  

This would be more fun if I could put floats, but that's not a
necessity.

I am getting the idea I could use the swarm Canvas for this kind of
thing, but don't know the first thing about it.  So if you could point
me at some example to see how this gets used, I'd be grateful.  

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

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