GraphStream Users

Archives de la liste Aide


Re: Tracking Example - Need some help


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>, Carina Oliveira <carinacapelao AT gmail.com>
  • Subject: Re: Tracking Example - Need some help
  • Date: Wed, 20 Jul 2016 04:21:57 +0200

Hi Carina,

Please note that this code is a quick & dirty made creature which has only been used to generate the video. We made sources available "just in case" someone could find something interesting in it.

I can not say why you images are empty. It could be a lack of coordinates. But I need more informations about how you are using the FileSinkImages.

About magic numbers : it represents the count of produced images. The video has been generated at 25 fps. Since the output policy of the FileSinkImages is set to STEP_POLICY, images are produced at each call to graph.stepBegins(...). When passing such number to DynamicAttribute, we are telling it how many steps there will be for the animation. It is a bit too far to remember but I guess that 925 (ie. 37 seconds) is the length of the sequence.

Hope it helps.
Cheers.

Guilhelm

2016-07-19 15:47 GMT+02:00 Carina Oliveira <carinacapelao AT gmail.com>:

Hi all,


First of all, congratulations for your API ! This is great and it helps so much !


My name is Carina, I'm studying Information Systems on Federal University of Minas Gerais (UFMG) in Brazil and I’m a Research Assistant on Compilers Laboratory, UFMG. I'm currently in a project that involves the design and implementation of an information flow system, which involves the creation of graphs and involves some interactions on this graphs. I'm using your API.


At this moment, what I need to do is: given a graph, and a set of connected nodes, that are considered tainted and that form a path, I need to do how you did in the "tracking example" ((https://www.youtube.com/watch?v=XX5rRF6uxow#t=115)). I want to zoom the first tainted node and walk through the graph, showing the tainted nodes that are on this path, and, in the end, create a video with this animation.


I saw the LeHavre class, that you provided, and I adapted my code to use this class. Nevertheless, my graph doesn’t work. The generated images are empty. So, I thought that maybe you could help me. I didn't understand very well some particularities of the LeHavre class.

->For example, at this part of the code:


MoveCenterView move = new MoveCenterView(images, g.getNode("LH.9921_0"), 75, true);

DynamicCenterViewZoom zoom = new DynamicCenterViewZoom(images, 0.1, 75, true);


I didn't understand the meaning, the role, of the value 75.


->At this slices:


for (int i = 0; i < 20; i++)

       rwalk.compute();


and


for (int i = 0; i < 75; i++) {

rwalk.compute();

updateGraph(g, rwalk);

g.stepBegins(step++);

}


I didn't understand the meaning, the role, of the values 20 and 75, as well as the other bounds of the 'for' (20, 75, 100).


->At this part:

double byStepLength = fullLength / 925.0;

I didn't understand what the value 925 represents.


I would like to understand what the values means so that I can adapt this functionalities to create a video on my graph, which is a MultiGraph, that isn't in a DGS file.


Thanks in advance and  I await your reply.

Regards,

Carina



--
Guilhelm Savin
PhD of Computer Science



Archives gérées par MHonArc 2.6.16.

Top of page