Miguel, Okay, with Sascha making it look so easy, I couldn't resist playing around with g3d a bit tonight in order to explore just how feasible it would be to use PyMOL as an optional JNI extension to generate molecular geometry inside Jmol (or g3d).
Here's what I've been able to accomplish in a few hours, simply by having PyMOL directly write out Java source code to message Jmol (contrived yes, but nevertheless a quick way to test the concept without creating any real glue). >From the original geometry in PyMOL... http://delsci.com/jmol/pymol040104.jpg The following can be obtained inside of Jmol (well, actually just org.jmol.g3d.Graphics3D inside a JPanel). http://delsci.com/jmol/jmol040104.jpg No color yet, and the lighting is different, but otherwise it is remarkably close. However, the spheres aren't clipping each other quite right and the triangles are flat shaded. Questions: 1) I've set the slab and depth values to 1000 & 4000 respectively, which covers the full Z range of the scene, but still the spheres aren't intersecting one another correctly. The fillSphereCentered method is used to draw them one by one. If that's okay to do, then what's missing? 2) Is there a way to provide a normal vector for each triangle vertex? That's pretty much essential for HQ surface rendering. Clearly Jmol can do smooth shading correctly with the ribbons, but unless I'm overlooking something obvious, that isn't possible right now for individual triangles. What's the outlook for this? By the way, when you said that g3d was clean and standalone...you weren't kidding! It took me just 15 minutes to get that first 3D sphere drawn in a simple Java app, sans OpenGL. Fantastic work! I've also discovered a convenient little coincidence: PyMOL's built-in ray tracer uses input geometry in almost exactly the same form as g3d. So while I am currently taking PyMOL ray tracing geometries into Jmol, the reverse should also be quite easy: with just a few changes, PyMOL could be used as a photorealistic rendering engine for Jmol -- though of course only in cases where Jmol has access to native extensions, such as when running under WebStart. Cheers, Warren -- Warren L. DeLano, Ph.D. Principal Scientist . DeLano Scientific LLC . 400 Oyster Point Blvd., Suite 213 . South San Francisco, CA 94080 . Biz:(650)-872-0942 Tech:(650)-872-0834 . Fax:(650)-872-0273 Cell:(650)-346-1154 . mailto:[EMAIL PROTECTED] > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Miguel > Sent: Monday, January 03, 2005 11:02 PM > To: [email protected] > Subject: Re: [Jmol-developers] what creates the image? > > Sascha wrote: > > Starting with getting shapes rendering with just the g3d > package was > > an excellent suggestion. > > Check this out: > > http://www.cs.brown.edu/~sab/pub/first-jmol-net.png > > That's 100% C#, using org.jmol.g3d and javax.vecmath > > Very good! > > > The whole process wasn't all that hard, once I found the > place to start. > > My NET3d sublcass of Platform3d builds an image from > > Platform3d.pbuffer, and puts it in Platform3d.imagePixelBuffer. I'm > > copying the pixels over one at a time, which is of course > the slowest > > possible way, but I'm pretty sure I can reduce that to a > single call > > to a .NET function that will build the image directly from memory. > > Yes > > > Miguel > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Jmol-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jmol-developers > ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
