On Mar 22, 2006, at 4:48 PM, Bob Hanson wrote:
Frieda Reichsman wrote:

Question 1:  If you turn on the internal spin around a line, for  example using these commands on your test page:
draw line1 250 (atomno=1) (atomno=2);color draw yellow
spin INTERNAL $line1 30
what is going on with the center of rotation for manipulation with  the mouse? Rotating with the mouse either while the structure is  spinning
around its "line-axis" or after turning spin off, it seems  that the structure is now rotating about a point that is unrelated to  either the original center of rotation, or line1, and in fact the  center of rotation is now a point outside the structure.
I think it would be good if the center of rotation for mouse rotation  became a point on line1, perhaps the mid-point of the line. If not,  then IMO it should revert to the original or better yet to the  previous center of rotation (for example if a subset of atoms had  been centered).

It's a tricky issue. There is a general XY position on the applet window around which rotation appears to occur. Then, in addition to that, there is an x,y,z molecular coordinate point that sits at that position and does not move. When you spin the molecule, while the XY position stays fixed, the x,y,z coordinate on top of that position DOES change.

OK, it took me a while to process that but I think I am with you. So I assume that "When you spin the molecule," above means "when you spin the molecule around a line axis you have created" (and the line axis does not coincide with the "regular" external x, y or z axis of rotation)? Because otherwise I do not see how the xyz coordinate changes...


My implementation assumes that the XY position rotation center, usually but not always the center of the applet window, should not change.

Makes total sense. If the XY position is not at the center of the applet, we do not want the molecule to suddenly snap to the center. This has been an issue in authoring movies--I often want to designate an atomset as the center of rotation without snapping it to the center of the applet. This is one reason that what you have developed is fantastic, because of the lack of 'snapping'.

It allows the x,y,z molecular coordinate point to change, though.

OK

Is that what you are observing?

I think so, but would like to know if you agree...

It's critical that the model not "jump" when spinning starts or ceases.

Yes, as above.

But we may need some different or at least explicit mechanism to reset it after spinning, we should add that.

I think this is needed. Let's say that in the context of an interactive exercise, I script a spin of the molecule around a line, and then stop the spin and expect the student to then rotate the structure, do some exploring-- it should rotate sensibly.

Let's play with it a bit more

Is it possible at this point to make a downloadable package of this version? Seems like there have been some hangups


and see if there is an obvious, natural solution to this new problem. But whatever that solution is, it should consist of two parts:

a) defining the XY position in the window around which rotation is to occur.

b) defining the xyz position in molecular coordinates that should be the center of rotation.

My first approach would be that both points should be specified at the same position along the axis that has just been (or is being) used for spinning. My intuition says use the midpoint of the line, but I am really not sure yet. And I am not sure how to set the center of rotation to a point on the line, any suggestions? I will look around on the interactive scripting pages and at some of the messaging output on your spin test page to see if I can get some clues.

Question 2:  What does
spin off;rotate INTERNAL $line1 10;
do compared to a simple "spin off"? I cannot tell the difference...  

Well, it rotates once 10 degrees around $line1.

OK, thanks, I missed that, did not know the significance of the 10. And somehow missed seeing the rotation of 10 degrees.

spin off itself would not do that. I just put the spin off in there to make sure that spinning was off so it didn't complicate seeing the rotation.

Right, very sensible.

I have to think about what would  happen if you are spinning the model and then while doing that apply a rotation. Probably not a good idea.

I agree, not a good idea.

Test it and tell me what it does.

Not sure it is necessary to test.

Frieda



///////////////////////////////////////////


Frieda Reichsman, PhD

Molecules in Motion

Interactive Molecular Structures

http://www.moleculesinmotion.com


///////////////////////////////////////////



Reply via email to