Closed thisisvaze closed 5 years ago
@aadityavaze to reset the nodes position and restart the simulation over, you just have to pass a fresh data set to .graphData(<new data>)
. Just make sure you use a fresh array for nodes
that have not been annotated with the x
, y
and z
attributes, added by the running simulation.
Thanks for your answer, actually I wanted to ask if I could set alpha=1, basically, I want to restart the custom forces that I've implemented on the same set of nodes.
Refeeding the data causes alpha to be reset to 1
. So you could simply do this, to preserve the nodes coordinates:
myGraph.graphData(myGraph.graphData())
That's exactly what I was looking for. Thanks a lot.
I need to restart the simulation at a certain point of time, it would be of great help if anyone could help me with that. Thanks in advance.