I'm currently implementing a new version of the visualization module which will work quite differently than the current one. I'm working on the rendering system now, but mouse interaction will be implemented in the future. The new system works entirely in 3D, so real 3D layouts and navigation is in theory possible. The Gephi graph system has some restrictions though, so the reality may be different.
In 2D I will surely use something like your solution. In practice though the code might be easier than that since the z=0 plane will always face the camera. In 3D I think Gephi navigation has to be completely rewritten. Suggestions are welcome in this regard.
> representation:
> - graph layout in 2D only (this is what Gephi has right now)
> - graph layout in the x-y plane (z=0) with 3D tilt (this is the 3D mode of Gephi)
> - arbitrary 3D layout; no restriction to a plane (is this planned for future versions of Gephi?)
While arbitrary 3D layouts will be supported by the new visualization engine I'm working on, I don't know if they are planned to be released soon. The layout is currently constrained to a plane.
> navigation:
> - Translation of the layout (referred to as right mouse button dragging)
> - Tilt in 3D (Gephi's 3D mode)
> - Zooming: essentially camera movement aligned with camera direction (Gephi mouse wheel interaction)
> - Rotation of the layout around arbitrary axes (is this planned for Gephi?)
> - Orbit: rotation of the camera around a point in the layout (is this planned for Gephi?)
Are you interested in having all of them? If 3D layouts will be supported, the translation can be tricky. I think I will play with some 3D modelers to see how they solved this problem. With the current layout problem I can probably simply limit the angle between the camera and the plane and use a solution like yours. This will probably also solve some of the other problems you are experiencing.
> in case of tilted 3D display, when moving nodes, node and mouse pointer are out of sync
There are limits to the position of the nodes. This might be the reason nodes and mouse become out of sync when the angle is wide. We can probably display the limits to the position of the nodes in the visualization window to make this behaviors less strange.
> using mouse wheel zoom can screw up the camera when zooming in too much.
You are right. I don't know what's the problem.
> How to proceed? Could you explain a bit more your suggestion of projecting to the plane perpendicular to the camera and
> containing the graph center? Isn't it that the graph center could be behind the camera?
You are probably right and it would probably look strange anyway. So I think it is better to simply use your solution and restrict the angle to the {z=0} plane (there is no reason to see the graph from a very wide angle anyway).
I'm currently implementing a new version of the visualization module which will work quite differently than the current one. I'm working on the rendering system now, but mouse interaction will be implemented in the future. The new system works entirely in 3D, so real 3D layouts and navigation is in theory possible. The Gephi graph system has some restrictions though, so the reality may be different.
In 2D I will surely use something like your solution. In practice though the code might be easier than that since the z=0 plane will always face the camera. In 3D I think Gephi navigation has to be completely rewritten. Suggestions are welcome in this regard.
> representation:
> - graph layout in 2D only (this is what Gephi has right now)
> - graph layout in the x-y plane (z=0) with 3D tilt (this is the 3D mode of Gephi)
> - arbitrary 3D layout; no restriction to a plane (is this planned for future versions of Gephi?)
While arbitrary 3D layouts will be supported by the new visualization engine I'm working on, I don't know if they are planned to be released soon. The layout is currently constrained to a plane.
> navigation:
> - Translation of the layout (referred to as right mouse button dragging)
> - Tilt in 3D (Gephi's 3D mode)
> - Zooming: essentially camera movement aligned with camera direction (Gephi mouse wheel interaction)
> - Rotation of the layout around arbitrary axes (is this planned for Gephi?)
> - Orbit: rotation of the camera around a point in the layout (is this planned for Gephi?)
Are you interested in having all of them? If 3D layouts will be supported, the translation can be tricky. I think I will play with some 3D modelers to see how they solved this problem. With the current layout problem I can probably simply limit the angle between the camera and the plane and use a solution like yours. This will probably also solve some of the other problems you are experiencing.
> in case of tilted 3D display, when moving nodes, node and mouse pointer are out of sync
There are limits to the position of the nodes. This might be the reason nodes and mouse become out of sync when the angle is wide. We can probably display the limits to the position of the nodes in the visualization window to make this behaviors less strange.
> using mouse wheel zoom can screw up the camera when zooming in too much.
You are right. I don't know what's the problem.
> How to proceed? Could you explain a bit more your suggestion of projecting to the plane perpendicular to the camera and
> containing the graph center? Isn't it that the graph center could be behind the camera?
You are probably right and it would probably look strange anyway. So I think it is better to simply use your solution and restrict the angle to the {z=0} plane (there is no reason to see the graph from a very wide angle anyway).