Jason,
When you say "send the triangles" how are you saying you do that? Is that as
some data type such as EFVET, that describes the triangles directly? Or do
you mean something like a PMESH? Jmol can read such files, but those formats
don't allow for explicit description of contours. If you have a simple
format for this that you want to use, that would be fine.
JVXL 2.0 has the capability of encoding the triangle data directly and also
encoding exactly what you are describing in terms of arbitrary lines through
the triangles. So yes, I think the JVXL method is still the best. I think
you will find the triangle compression is reasonably good -- about 25:1 over
EFVET xml. Although I suppose in your case you don't particularly need
compression.
I'll have to write up some documentation for you for that. I'm not satisfied
with my blend of non-XML and XML in JVXL 2.0; this could provide an
opportunity to clean that up. But let me know if you have a simpler solution
for this.
Bob
On Thu, Oct 22, 2009 at 1:28 AM, <jason-s...@creativetrax.com> wrote:
> Robert Hanson wrote:
> > Jason -- I forgot that you are creating your own JVXL files. Though
> > not yet documented, the JVXL 2.0 format does allow specification of
> > exactly what you want -- an arbitrary number of lines of arbitrary
> > color through the triangle set. Let me know if that interests you.
> >
>
>
> Thanks for your responses. I've been out of town and haven't seen them
> until now.
>
> A while ago, we decided to draw and send the triangles instead of JVXL
> so that the same code could create identical figures in several other
> backends that we have (for example, the tachyon raytracer, a new html5
> canvas backend, a java3d backend, etc.). We could put the JVXL code
> back in if that was the best solution, though.
>
>
> > Bob
> >
> >
> > On Fri, Oct 16, 2009 at 10:56 AM, Robert Hanson <hans...@stolaf.edu
> > <mailto:hans...@stolaf.edu>> wrote:
> >
> > Jason, more thoughts on this on the plane last night....
> >
> > What you suggest might be possible -- even now -- but I suggest we
> > start talking about a new object type. Maybe a "plot3d" that is an
> > extended isosurface. We already have that for molecular orbitals,
> > LCAO cartoons, and pmesh. The way it works is that the extended
> > object has more capabilities -- in this case, to map more than
> > just contours onto an isosurface. Like you say, a totally variable
> > mesh, which would just be a set of lines of variable width, color,
> > and translucency. Possibly annotations. In addition, possibly,
> > automatic scaling. Right now you have to do some transforms that
> > are oblivious to Jmol. I'd like the oblivious part to be in the
> > use interface and let Jmol take care of anisotropic scaling.
> >
> > As for access to the triangles, if I tell you a few secrets, will
> > you promise me not to spread it around too much? (yeah, yeah,
> > that's a joke...)
> >
> > After creating a surface on a web page (say, for example,
> > http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm
> > with
> >
> > load 1crn.pdb;isosurface molecular
> >
> > then issue from the address line of the browser:
> >
> >
> javascript:alert(jmolGetPropertyAsJavaObject("JmolViewer").getModelSet().getShape(22).getMesh("isosurface1").vertices)
> >
> > or, for example:
> >
> >
> javascript:alert(jmolGetPropertyAsJavaObject("JmolViewer").getModelSet().getShape(22).getMesh("isosurface1").polygonIndexes)
> >
> > That "22" is subject to change at the whim of the developer. But
> > that's all the information you are looking for, I think. So you
> > could, in principle, draw any lines now using the DRAW LINE
> > command (which draws any number of connected segments)
> >
> > But that's not necessarily that efficient, and we should talk
> > about what you think would be really great to have. The way we
> > would do this would be to create a new package called "math" and
> > load it up with the coolest Java you can find. It would not be a
> > load on any other user, because unless you accessed the "plot"
> > object or whatever we call it, that package would not be delivered.
> >
> > Bob
> >
> >
> >
> >
> >
> > On Wed, Oct 14, 2009 at 4:51 PM, <jason-s...@creativetrax.com
> > <mailto:jason-s...@creativetrax.com>> wrote:
> >
> > I've been using jmol quite a bit lately in Sage for drawing 3d
> > mathematical surfaces. One thing I really miss is the ability
> > to have
> > nice meshes (including arbitrary meshes) on a surface.
> > Currently Jmol
> > allows a mesh option to pmesh surfaces, but that only draws a
> > specific
> > grid that is hard to see (it is the same color as the surface,
> but
> > lighter or something).
> >
> > Probably the easiest change would be to make the mesh default
> > to black
> > lines (like the black lines for contour plots on cut planes).
> > That
> > would make the mesh lines much easier to see. Seeing the mesh
> > lines
> > often really helps us mathematicians (especially those of us
> > teaching).
> >
> > A very nice functionality to add would be the ability to draw
> > arbitrary
> > meshes on surfaces, similar to what is implemented here (but
> > as black
> > lines on the surface, rather than the crude approximation
> > constructed
> > here):
> >
> http://trac.sagemath.org/sage_trac/attachment/ticket/5511/mesh_function.jpeg
> .
> > I think Mathematica has a nice interface to these sorts
> > of things:
> > http://reference.wolfram.com/mathematica/ref/MeshFunctions.html
> >
> > We (Sage) can take care of the interface to draw meshes. What
> > we'd need
> > from jmol is the ability to draw a line *on* a surface and
> > have it look
> > like the contour lines look like on a plane. Maybe for each
> > triangle in
> > the surface, we could give a list of lines to draw on that
> > triangle by
> > specifying (for each line) the two edges the line crosses and the
> > fraction of the distance along the edge to make the
> > intersection between
> > the line and the edge of the triangle.
> >
> > What do you think?
> >
> > Thanks,
> >
> > Jason
> >
> >
> >
> ------------------------------------------------------------------------------
> > Come build with us! The BlackBerry(R) Developer Conference in
> > SF, CA
> > is the only developer event you need to attend this year.
> > Jumpstart your
> > developing skills, take BlackBerry mobile applications to
> > market and stay
> > ahead of the curve. Join us from November 9 - 12, 2009.
> > Register now!
> > http://p.sf.net/sfu/devconference
> > _______________________________________________
> > Jmol-users mailing list
> > Jmol-users@lists.sourceforge.net
> > <mailto:Jmol-users@lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/jmol-users
> >
> >
> >
> >
> > --
> > Robert M. Hanson
> > Professor of Chemistry
> > St. Olaf College
> > 1520 St. Olaf Ave.
> > Northfield, MN 55057
> > http://www.stolaf.edu/people/hansonr
> > phone: 507-786-3107
> >
> >
> > If nature does not answer first what we want,
> > it is better to take what answer we get.
> >
> > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
> >
> >
> >
> >
> > --
> > Robert M. Hanson
> > Professor of Chemistry
> > St. Olaf College
> > 1520 St. Olaf Ave.
> > Northfield, MN 55057
> > http://www.stolaf.edu/people/hansonr
> > phone: 507-786-3107
> >
> >
> > If nature does not answer first what we want,
> > it is better to take what answer we get.
> >
> > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
> > ------------------------------------------------------------------------
> >
> >
> ------------------------------------------------------------------------------
> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and stay
> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> > http://p.sf.net/sfu/devconference
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Jmol-users mailing list
> > Jmol-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jmol-users
> >
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users