We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have data consisting of a list of nodes (all with unique ID) and a list of links between nodes. How can I draw the network of linked nodes in Processing?
Answers
draw all the nodes in a circle. remember where they are.
draw lines between the linked nodes.
In addition: Make a class node with position and text and connection
Make an ArrayList of that class
There are a LOT of different network layout algorithms. You can play around with many of them on your data using e.g. yEd to try out what a layout approach might look like. A circle is one easy way, but it depends on what you are trying to visualize.
Is this a directed graph (digraph) or an undirected graph? Is there a first / root node?
Do you want a heirarchical layout moving in one direction, or an organic layout spreading in every direction?
Do the links have weights -- are there multiple links between some pairs, or are should some links be shorter / thicker / stronger than others?
Thanks for guidance. A lot to explore! John.
Hi Chrisir, Thanks heaps for what you have done. This will help me a great deal and gives me something to build on! Much appreciated. John.
;-)