Saturday 26 November 2022

Spherical Graph Layout in Python

Objective

Target:

enter image description here

State of work

  • Input data as given factor
  • NetworkX for position calculation
  • Handover to VTK methods for 3D visualisation

Problem

3 years ago, I had achieved the visualisation as shown above. Unfortunately, I did a little bit of too much cleaning and I just realized, that I dont have these methods anymore. It is somehow a force-directed graph on a sphere surface. Maybe similar to the "strong gravity" parameter in the 2D forceatlas. I have not found any 3D implementation of this yet.

I tried again with the following algorithms, but none of them has produced this layout, neither have parameter tuning of these algorithms (or did I miss an important one?):

  • NetworkX: Spherical, Spring, Shell, Kamada Kawaii, Fruchterman-Reingold (the 2D fruchterman-reingold in Gephi looks like it could come close to the target in a 3D version, yet gephi does not support 3D or did I oversee something?)
  • ForceAtlas2
  • Gephi (the 2D fruchterman-reingold looks like a circle, but this is not available in 3D, nor does the 3D Force Atlas produce valid Z-Coordinates (they are within a range of +1e-4 and -1e-4)
  • Found this online one (https://observablehq.com/@fil/3d-graph-on-sphere) but however it seems like it is not completely achieving the target, nor do I know how to transfer this to python/coordinates

Researching for "spherical graph layout" has not brought me to any progress (only to this view which seems very similar https://observablehq.com/@fil/3d-graph-on-sphere ).

How can I achieve this spherical layout using python (or a third party which provides a positioning information)

Update: I made some progress and found the keywords non-euclidean, hyperbolic and spherical force-directed algorithms, however still not achieved anything yet. Or Non-Euclidean Riemann Embeddings (https://www2.cs.arizona.edu/~kobourov/riemann_embedders.pdf)



from Spherical Graph Layout in Python

No comments:

Post a Comment