From: Bob Hanson <hansonr@st...> - 2007-04-18 12:52:17
I've successfully built a stand-alone app, Jvxl.jar, that reads CUBE
files and creates JVXL files from them. Not ready to call it releasable,
but feel free to play with it.
As part of this endeavor I was able to abstract out the Marching Cubes
and Marching Squares algorithms as separate classes today. They can be
found at SourceForge. The Jvxl directory now contains subdirectories
calc, data, readers, and util. There's a "MarchingReader" interface
there that shows the three necessary methods a reader must have to work
with the algorithms.
Basically you give these classes a set of 3D scalars and information
about axes and dimensions (class VolumeData), right now as a CUBE file,
and they give you back vertices, triangles, and JVXL code.
It's actually kind of neat. If anyone can give me some help making it
work as a stand-alone app, that would be nice. I think Nico started in
on that; it works in Eclipse debug mode but not from the command line.
What am I missing?
I think if you look you will see that it is not exactly straightforward
how these algorithms work, but at least they are in one place now. So if
anyone really wants to figure them out, it should be simpler than
looking through 100 pages of Isosurface code.
At some point I'll try to integrate this into Jmol along with separate
classes for solvent/molecular-related surfaces and probably a class for
generalized shapes (spheres, ellipses, lobes). But we'll see...