On 22.05.2017 15:46, Dirk Reiners wrote:
s there a fundamental problem with it, or is it just something that has not been a priority? In general force-directed layouts are pretty agnostic concerning dimensionality, do you think it would be difficult to add? If I understand the code correctly (big if ;) positions are just vector<double> properties, and the 2D part is more a convention than anything else. This is obviously only partially true for the QuadTree part in SFDP, which would have to be an octree for 3D, but it might still work at reduced efficiency. Are there other limitations that you can think of from the top of your head that would make 3D layouts infeasible?
Modifying sfdp_layout() to n-dimensions is indeed straightforward. The issue is modifying the actual drawing (i.e. graph_draw()) to 3D. We use cairo in the backend, which is strictly 2D. Implementing 3D would require the use of something else entirely, like OpenGL. I have no desire of ever implementing 3D drawing, because I think it is not really helpful in the majority of cases. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>