|
Thank you so much for the answers and advice. I had to put the port aside for a few days, but I got back to it tonight and had some exciting results. 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 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. Then I just have a Windows Forms Control with an overriden paint method; that paint method just says... g3d.beginRendering() short colix = g3d.getColix(Color.PowderBlue); Sphere3d sphere = new Sphere(g3d); sphere.render(colix, 100, 40, 40, 77) .... g3d.endRendering // this is where I push the g3d image onto the screen e.Graphics.DrawImage(g3d.ScreenImage, 0, 0, panel.Width, panel.Height); My next steps are... * build the image from memory, not copying pixel by pixel * convert org.jmol.viewer and start drawing some chemistry! * evaluate//improve performance if necessary * Echange data with the non-Jmol parts of the system I checked with my advisor (Andy van Dam) about the GPL issue -- we're going to explore it with our local GPL expert (you were right, the CS dept is already quite familiar with the GPL). Andy is willing to go with the idea that my C# port of Jmol will be released as open source; we'll do some more research on our end to figure out what this means about using the C# port in a larger application whose source we might not want to release. best, sascha Miguel wrote: Sascha wrote:
It *almost* did -- just a bit of trouble with java.io.Serializable, whose .NET analog is a bit different, and a few places where I have to be careful about casting floats and doubles to ints. Also trouble with the conversion tool's insistence on making *methods* named Rotation when there are is also a field named Rotation. Aha! Excellent. Cool -- I'll take a look at this when I start doing data exchange with the other components of our application. 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 |
- Re: [Jmol-developers] what creates the image? sascha becker
- Re: [Jmol-developers] what creates the image? Miguel
- [Jmol-developers] PyMOL geometry in Jmol Warren DeLano
- Re: [Jmol-developers] PyMOL geometry in Jmol Miguel
- RE: [Jmol-developers] PyMOL geometry in ... Warren DeLano
- RE: [Jmol-developers] PyMOL geometr... Miguel
- RE: [Jmol-developers] PyMOL geo... Warren DeLano
- Re: [Jmol-developers] PyMOL... E.L. Willighagen
- [Jmol-developers] https://j... Rzepa, Henry
- [Jmol-developers] PyMOL sphere intersections Miguel
