From: E.L. W. <eg...@sc...> - 2002-12-23 13:20:38
|
On Sunday 22 December 2002 14:02, mth wrote: > I just checked in some new bond rendering code ... once again. ;) > This set of changes introduces the following: > - bonds correctly connect with the surfaces and edges of the atoms > this was especially a problem with double/triple bonds in the past > - bonds now use 3d perspective > each individual bond gets narrower as it gets further away > formerly the bond width was the average of the two widths It looks good. I did not really identiy the difference... Anyway, I just had a closer look, and saw that the inner bond color is also painted on the "wrong" side of the dark bond border... Screenshot attached of the antialiasing screenshot... in the aliased draw during rotation it also happens, but could not make a shot of that, because Gimp mentioned "can't open file as XWD file"... but the idea is the same. > This was a good learning experience for me. (In other words, it was very > painful.) I did at least a half dozen different implementations. The > problem was the rendering of double bonds during rotations. Because of > aliasing effects as things were converted into integers, the bonds would > seem to wiggle and jump around, even though they are supposed to be > parallel. As expected I did not see wiggling and jumping around during rotation. > In any case, I am now quite satisfied with the results. Even with the above (small) issue... I also notice another problem... the bonds seem to be bend. see second attachment. > Please let me know what you think. And let me know if/when you find any > bugs. Egon PS. Miguel, I love the work you have done, and thus I am a bit wary to ask... but I'll take my chances: Do you think you could refactor the displaying stuff into a CDK renderer? The API would resemble that of Renderer2D: http://cdk.sourceforge.net/api/org/openscience/cdk/renderer/Renderer2D.html That would be a great move forward for the CDK integration, as we could then have Jmol switch between 2D and 3D viewing... If you have your (Jmol) priorities elsewhere: no problem! I appreciate the work you have commited very much anyway. |