plotting online trajectory #2434
-
|
Hi, could you please help? I am attaching my flow where a circle is plotted in each frame representing the center mass of the animal |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
|
This request is harder than it sounds like in reactive programming. How about dragging the centroid back to the video nodes so that you can visualise its location in real time. Is that something you were hoping for?
|
Beta Was this translation helpful? Give feedback.
-
|
Have you tried the Bonsai.Gui.ZedGraph library? (https://bonsai-rx.org/gui/) I managed to do something similar using the LineGraph node. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @ReemyAliNasser thought this would be a fun exercise for me to try, and it turns out you can create a trajectory with the You almost got there with your own try, all that was missing was a If you want a longer trajectory, you can adjust the Here is what it looks like
Attached zip file of the example: |
Beta Was this translation helpful? Give feedback.


@ReemyAliNasser Ah, I missed out that most important bit! I have something for you, but I am not sure if it's the most straightforward or efficient way to do it, as I just kinda mashed a few things together. If anybody knows of a simpler/more efficient/more bonsaic way, please let me know!
The basic principle I used to modify the workflow is that, in this case, we want each point that is generated to get appended to a list or an array, and then to send the updated list or array every time a point is created as a Point [][]
input toPolyLines`.Unfortunately, I could not figure out how to do something with that with the core bonsai operators, but I found an
AccumulateToImmutableListoperato…