Miguel wrote:


We should visualize the rotation of the molecule as though there were a
robotic arm that was anchored at the origin.

The arm has a universal joint at each end. One universal joint is anchored
at the origin. The other universal joint is attached to the molecule.

The arm is extendible in that its length can change. Length of the arm may
be zero.

The arm attaches to the molecule at the center of rotation of the
molecule. If we move the center of rotation of the molecule, we:
 1. hold the molcule still in space
 2. detach the arm from the old center
 3. reattach the arm at the new center of rotation.

I don't think that we need any elbows in our arm. The arm and the molecule
will never collide.

The univeral joint on the arm and the extendible arm length mean that we
can position the arm wherever we want in 3 space ... covering arbitrary
translations.

The universal joint at the molecule means that we can orient the molecule
however we want ... covering orientations.

We can detach the arm from one location and reattach it at another
location while holding the molecule still and changing the arm length +
angle ... covering changes in rotation center.

This means that we can change the center of rotation of the molecule in a
smooth manner, including incrementally sliding the rotation center from
one spot to another, making for smooth animations.


I think this is a good model.

If it sounds good to you, then we should try to implement it.

OK, except for the translation business, this is precisely what I've implemented -- in internal rotation center independent of a fixed rotation center.

What this involves is four coordinate systems, two independent matrix transformations, and one perspective adjustment.

Take a look at http://www.stolaf.edu/people/hansonr/jmol/test/Jmol-rotation.gif

Coordinate systems:

(x,y,z) "internal" molecular coordinates determined by data file, Angstroms.

(x',y',z') "fixed frame" coordinates, still Angstroms.

(X,Y,Z) "screen" coordinates, in pixels.

{X',Y',Z} "perspective-adjusted coordinates" in pixels.


(a) fixed molecular frame {x',y',z'} = transformPointInternal(x,y,z)

(b) fixed screen frame {X,Y,Z} = transformPointFixed(x',y',z')

(c) perspective adjusted {X',Y',Z} = applyPerpsective(X,Y,Z)


This might work.

--Spinning and rotating and translating on an internal axis would involve changes to (a).

--"set picking spin" mouse click action would also be in relation to (a).

--Standard mouse action and Rasmol rotations/translations would drive rotation and translation based on (b).

--Zoom applies at (b).

--Perspective would be applied only at the end.

The trick in switching between rotation center A and rotation center B will be to find the equivalent rotation/translation for center B that is EXACTLY IDENTICAL to the rotation/translation based on center A. Then there will be no jump.

An additional need will be to address a fixed rotation "at an internal position" -- in other words, the user must always work in the context of the internal (file-based) coordinates. The user should never be aware that there is this {x',y',z'} system. In fact, the user should only ever know about that one original file-based coordinate position and never be troubled about ANY of the others. (This is true now.)

This involves allowing the user to place the fixed molecular frame center at any position he/she chooses to do so. (This is possible now.)

Bob

Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr

"Imagination is more important than knowledge."  - Albert Einstein


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to