yes, that should be fine.

pim schravendijk wrote:

>Didn't check it yet in povray, but I think this goes in the right
>direction, and most important, without having to convert to integer
>coordinates at some point (ouch!):
>
>  public void renderAtom(Atom atom, short colix) {
>    Point3f point1 = new Point3f();
>    String color = rgbFractionalFromColix(colix, ',');
>    float r = atom.getMadAtom() / 2000f;
>    // both arguments to transformPoint are float therefore:
>    //   going from angstrom to floating point screen value (= using
>perspective)
>    viewer.transformPoint(atom,point1);
>    // (float) is superfluous here then:
>    float x = (float)point1.x;
>    float y = (float)point1.y;
>    float z = (float)point1.z;
>    output.append("atom("+x+","+y+","+z+","+r+","+color+")\n");
>    nBalls++;
>  }
>
>
>  
>

    Point3f point1 = new Point3f();

  public void renderAtom(Atom atom, short colix) {
   ....

(no need to create a new Point3f for every atom)

//unncec.    float x = point1.x;
//unncec.    float y = point1.y;
//unncec.    float z = point1.z;
(Point3f is float already)

  if(point1.z > 1)  //because that means it's clipped by internal slabbing
    
output.append("atom("+point1.x+","+point1.y+","+point1.z+","+r+","+color+")\n");


This should be fine. We're transforming the points twice, but the issue 
won't be efficiency the way it is in actual rendering.


>On 9/20/07, pim schravendijk <[EMAIL PROTECTED]> wrote:
>  
>
>>On 9/20/07, Bob Hanson <[EMAIL PROTECTED]> wrote:
>>    
>>
>>>No, because when you generate the Povray image you want the perspective
>>>you see in Jmol, not something that you would later have to manipulate.
>>>The main problem is the multiple bond issue.
>>>      
>>>
>>Well, to be honest, I need povray exports from jmol exactly for
>>manipulation later on (combining and aligning several molecules in one
>>image, adding a background, fancy lighting effects, etc.
>>
>>http://www.molmod.com/~schraven/povray-example1.jpg
>>http://www.molmod.com/~schraven/povray-example2.jpg
>>
>>As long as with 'perspective off' in jmol it still gives me the pure
>>xyz coordinates, I am happy though.
>>    
>>
>
>  
>
right. We might turn off perspective depth temporarily automatically.



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to