Graph animations

Hello,

I’m trying to create a Graph Drawer that is supposed to be able to draw all kind of graphs while also being able to animate changes of the nodes and edges.

I’ve started thinking about how to do this and the first problem that I ran into is that I can’t decide how to implement the animations.
Initially I was thinking of just implementing the simple animations like “move node X from position 1 to position 2” using some custom movement scripts. The same can be done to animate the color of the nodes. The problem with this method is that I’m not sure how I would animate changing the shape of the nodes. For example making a square into a triangle or a circle.

Another method would be to use the Unity Animations. I could create animations that transform a square node into a triangle node. But then would I require an animation for everything? Like would I require an animation to transform a node from red to blue? Can I create animations dynamically? How do I blend them in the scripts?

I’m still new to Unity and I’m not sure if I made myself very clear. If any parts need clarification please let me know.

Thank you

P.S. By graphs I mean the graphs from graph theory not charts.

Privacy & Terms