Seth,

Many thanks for your input/insights as well. The process you've outlined is 
actually exactly what I am executing. My Processing sketch is successfully 
drawing all agent movements and updating appropriately. It's the rendering 
of appropriate Links and Patches that have me confused. Earlier in this 
thread I gave a little snippet for how I'm iterating through the AgentSet 
of turtles, using .world( ).turtles( ).agents( );, and casting each as 
(Turtle) to allow use of the methods to pull out the information I need in 
the visualization. If I follow a similar method for Links, I know I can do 
as Jason suggested and pull down the AgentSet of links, using 
.world().links().agents()., but would I similarly need to cast each element 
as something to access the methods, such as (Link) or (Patch)? I had been 
intrigued by LinkManager because it seemed the most convenient where I 
could get an agent list of Turtles linked to/from a particular turtle and 
conceptually allow me to, in the Processing sketch, have an up-to-date list 
of turtles that each Java agent should draw link lines between.

I hope that makes sense. I'm not a programmer by trade and I appreciate the 
time you all are taking with me. And on that note, the response time on 
this forum is amazing; it truly enhances this community. Many thanks on 
behalf of all.

Brant


On Monday, May 19, 2014 6:19:41 PM UTC-4, Seth Tisue wrote:
>
> >>>>> "Jason" == Jason Bertsche <[email protected] <javascript:>> 
> writes: 
>
>  Jason> you just want to run NetLogo headlessly and provide your own 
>  Jason> version of the NetLogo view, which, of course, is kept in sync 
>  Jason> with the state of the model as it progresses.  Is that right? 
>  Jason> If so, and if you're dealing with the code from the 'headless' 
>  Jason> branch of NetLogo, then take of a look at 
>  Jason> 'org.nlogo.mirror.Mirroring 
>  Jason> <
> https://github.com/NetLogo/NetLogo/blob/headless/src/main/mirror/Mirroring.scala>'.
>  
> Using 
>  Jason> that and its `diffs` method, you can find out what variables 
>  Jason> have changed in the model since your last snapshot, and then 
>  Jason> update your visualization according to that diff. 
>
> Generally I second everything Jason has said in his posts.  But Brant, I 
> want to make sure it's clear to you that the simplest possible renderer 
> wouldn't use the mirroring stuff at all.  And in fact, NetLogo's own 
> built-in renderer does not use the mirroring code. 
>
> The simplest possible renderer would simply iterate over all of the 
> agents in the world and draw each one.  When it's time to render the 
> next frame, you just do it all over again. 
>
> There are some scenarios in which you might want to persist agent state 
> in the renderer between frames, and then use the mirroring code to 
> update that state.  But involving the mirroring code adds a layer of 
> complexity, so you shouldn't go that route unless you're confident that 
> it makes sense to do so in your scenario.  Involving mirroring is not 
> the shortest path to a working renderer. 
>
> -- 
> Seth Tisue | http://tisue.net 
>

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to