Welcome to nodes3D, a 3D graph visualization program written by Issac Trotts in the labs of Edward G. Jones.
Starting nodes3d on Windows
To get started, just double click nodes3d.exe. This will download
a graph of gross neuroanatomical connectivity from the MySQL database at
To view graphs stored in Lua files, just drag them and drop them onto
the nodes3d.exe icon.
Starting nodes3d on Linux and Mac OS X
First, compile the application by typing
at the command prompt.
To display neural connectivity from brainmaps.org,
To display the graph described in dodecahedron.lua,
$ ./nodes3d tests/dodecahedron.lua
It is possible to run multiple Lua files to combine their effects.
For example, to get the colors from colorscheme1.lua and a 2D layout, do this:
$ cd tests
$ ../nodes3d K6.lua colorscheme1.lua 2D.lua
The following sections tell how to navigate through the 3D graph scene and
adjust the display parameters.
Click/drag with the left mouse button to rotate.
Click/drag with the middle mouse button up and down to move the camera
closer to or farther away from its pivot point.
0 : Reset camera
2 : Enable quasi-2D mode
3 : Disable quasi-2D mode and go back to pure 3D
9 : Toggle full screen mode
b/B : Increase/decrease line thickness by a factor of 1.3
c : Randomize node color
C : Randomize background color
d/D : Increase/decrease animated optimization step size by a factor of 1.1
e : Randomize edge color
E : Toggle display of edge weights
f : Focus the camera on the node currently under the mouse, and zoom in
F : Focus the camera on the node currently under the mouse
h/H : Increase/decrease the arrow head size by a factor of 1.05
i/I : Increase/decrease node repulsion intensity by a factor of 1.1
l : Randomize label color
m : Set the maximum iteration count for optimization
n : Toggle display of only the focused node and its neighbors
o : Run fast optimization
O : Toggle animated optimization
p : Randomize node positions
P : Export Encapsulated Postscript (EPS) file ("graph.eps")
r/R : Increase/decrease repulsion scale by a factor of 1.05
s/S : Increase/decrease node radius by a factor of 1.1
t/T : Increase/decrease node transparency by 0.04 (max is 1.0)
w : Toggle highlighting of nodes and edges on mouse hover
W : Toggle consideration of edge weights in layout optimization
q : Quit
Lua file format
Here are all the functions that can be called in the .lua files.
See the files in the tests/ directory for examples.
n3d.set_line_color(r,g,b,[a]) -- r, g, b, and a should be 0..255
n3d.set_line_thickness(t) -- scale factor
n3d.set_doing_2d(tf) -- has to come after n3d.end_graph()
n3d.set_should_initially_optimize(tf) -- default is true
n3d.set_fovy_deg(fovy) -- set the y field of view
n3d.set_znear(znear) -- dist of near clipping plane from camera
n3d.set_zfar(zfar) -- dist of far clipping plane from camera
n3d.set_step(s) -- step size in animated optimization, e.g., 0.1
n3d.set_sphere_scale(s) -- default is 0.04
n3d.set_node_radius(node_id, r) -- (set r to zero to get auto size)
n3d.set_max_iter(i) -- max # iterations in fast optimization
n3d.set_should_consider_weights(tf) -- in optimization
How to get out of bad layouts (sometimes)
Sometimes the layout optimizer gets stuck in a bad configuration.
In these situations, it is sometimes possible to get an improvement
by first hitting 'O' to start animated gradient descent and then
holding down 'd' until the step size is large enough to jump out of
the rut where the optimizer was stuck. After that it will still be jumping
around wildly, so you can either hold down 'D' to reduce the steps or
hit 'O' again to stop the animation, followed by 'o' to do a final fast
gradient descent optimization.
If that doesn't work, there is another thing to try. Hit 'p' to randomize
the node positions and then hit 'o' to optimize. It sometimes helps to
hit 'o' a few times. If the results aren't good enough, try again a few
times to see if you can get lucky.
Nodes3D has been downloaded a total of 7086 times.