views:

613

answers:

9

Hello coders! So I'm not sure how stackoverflow friendly this question is since it doesn't have a quick clear cut answer but here we go...

I have a java program that generates data for a directed graph. Now I need to render this graph. The data needs to be laid out in 3D, and I want to be able to define which plane an edge lives in. (Each edge will only need to occupy 1 plane of the 3D space). I also need the ability to navigate around the graph. Since I know that this kind of stuff is hard, I'm going shopping.

So far I've looked into (In no particular order):

  • JUNG: lacks 3D support
  • Cytoscape: not sure how much I'll be able to define edge drawing, haven't seen a non bio-informatics application of it yet
  • JGraph: I didn't see any 3D applications yet
  • Perfuse: looks promising, does anyone know anything else about it?
  • Gephi: Documentation looks scarce
  • Processing: does this play well with java?

I'm also considering doing some combination of opengl + swing rendering to create a 3D graph from multiple 2D graphs.

I am also not adverse to the idea of linking from another language

Any Ideas? Thank you.

A: 

Quick search finds this Java 3D library.

JRL
Are there any examples of using Java 3D to layout a graph?
Sandro
+1  A: 

you might want to consider python. matplotlib from python. You will probably have to output your data to an intermediate format and run a python script on the data because matplotlib has cpython bindings, but the library have some great features for graphing and reporting.

Jeremy Petzold
Thanks, I was thinking about using matplotlib, do you know off the top of your head if it has support for custom layouts? (As I'll probably need)
Sandro
as far as I know it allows for any kind of layout you like but I might be using it "inside the box" so perhaps I have just not encountered any layout issues that you might run into.
Jeremy Petzold
A: 

Hello Sandro,

I've played with Processing and OpenGL last term. Not sure if drawing 2D planes is the best approach. But you can make certainly draw your graph points in 3d using Processing if you want to. Here is an applet from openprocessing.

We studied signal processing a bit and we used Octave and GNUPlot to plot signals in 2d(using plot, stem, etc.) and 3d(using mesh)

octave mesh

I've googled for java gnuplot and seemed to found some handy links...

Check out the Java links on GnuPlot Programming Interfaces, like: this,javaplot, jgnuplot, etc.

For some hardcore graphin' be it 2d or 3d, gnuplot seems to be a pretty powerful choice.

George Profenza
The problem is that I don't have coordinate data. Instead I just have a list of which nodes are pointing to which other nodes. Do you know if any of those tools will do that for me?
Sandro
Sorry, I understood something else by 3d graph rendering :)Is this closer to what you're looking for? http://www.openprocessing.org/visuals/?visualID=2049
George Profenza
A: 

hi

take a look at Java vtk. vtk is a complex beast, but very powerful.

aaa
+2  A: 

I would recommend using Java3D for the visualization part

To do the layout of your graph you could look for an algorithms in JUNG and check whether the can be easily extended to 3D.

JUNG layout demo

stacker
I ended up going a different route but this is the closest. Since we're doing a lot of custom stuff, we're going to be combining a couple different techs.
Sandro
A: 

There are a few 3D graph visualizers out there.

The 3D viewers I know of are:

  1. UBIGraph - the demos page has some nice animations on it.
  2. Wilmascope - opensource and written in Java3D

Since wilmascope is opensource if the layouts don't suit you you could extend it to meet your requirements maybe. Laying out a graph in 3D is not easy however.

You could also take a look at Cuttlefish on sourceforge. There's a video on YouTube showing an example of it being used.

Binary Nerd
A: 

NAViGaTOR lets you fix nodes in different 3D planes. So if you fix the adjacent nodes of an edge in the same plane, then the corresponding edge will be in that plane too. However, it doesn't support directed edges - you'll just get an undirected representation of your graph.

Alinium
A: 

I suggest you try http://code.google.com/p/jzy3d, which will really help you to do what you want. It's a java library for rapidly plotting surfaces, scatters and 3d primitives (spheres, lines, points, etc). Regards, Martin

Martin
A: 

VisAD

Julien Chastang
This looks more like a plotting library.
ziggystar