FABULOUS!!!!! This is a real winner, Miguel. I put JmolApplet.jar in the

http://www.stolaf.edu/people/hansonr/jmol/docs/

directory, and a simple way to test it is to run

http://www.stolaf.edu/people/hansonr/jmol/docs/examples/atoms.htm

and enter the moveTo command in the box.

Really nice, and 0 seconds does just that.

Oh, I'll find use for this!!!!


Bob


Miguel wrote:

Bob wrote:

I seem to be missing something. Don't you need more information to define
a view?


I also found it a little difficult to grasp :-)


I have the vector, I see that -- that's the orientation.


The vector is not the orientation of the molecule, it is the orientation
of the axis of rotation.


But how one moves to that vector would determine the
rotation angle, wouldn't it?


Imagine this:
1. the molecule is at the home position
2. the center of the molecule is the origin
3. define a vector that starts at the origin and points someplace in 3d
4. rotate the molecule around that vector

For example

If we define our axis vector to be (1, 0, 0) then the + x axis is the axis
of rotation. If we then rotate 90 degrees, then the top of the molecule
will rotate down to be in front of the user.

Visualizing anything more complicated that this quite difficult.


Maybe there's a standard.


AxisAngles are used in 3D graphics and robotics.


For example, if I have (0,1,0) for the vector, I presume I am
looking at the model from the "top" (bottom?).


Nope.

Per the discussion above, (0,1,0) for the vector means that you are going
to rotate around the y axis.

The following two things produce the same results:

1. reset; rotate y 90
2. moveTo 0 1 0 90 0 # 0 seconds means don't animate, like 'rotate'

The 'reset' is necessary because moveTo always goes from the home/reset
position.

I don't want to make things too complicated at this point, but I added
another parameter to the rotate command. Like the other rotate commands,
it is relative to the current position. So the following are equivalent:

1. rotate y 45
2. rotate axisAngle 0 1 0 45
3. rotate axisAngle 0 -1 0 -45



But how I got there would depend upon
orders of operations. No? Is (0,0,1,0) the default view?  What would
(0,0,0,0)


An axisAngle rotation does not have an order of operations, in the sense
of performing separate rotations about the x/y/z axes. Instead, you define
your own axis and rotate from there.

For purposes of the moveTo command, everything is defined from the
reset/home position. The important factor here is that the angle of
rotation is zero. And, since the angle of rotation is zero then it doesn't
matter what the vector is. The following are all equivalent:

1. reset
2. moveto 0 0 0 0 #except this is animated
3. moveto 1 2 3 0 # the vector values don't matter

The vector *is* important for anything other than a non-zero rotation. So
the following is INVALID:

moveto 0 0 0 45 # Do a 45 degree rotation, but what is the axis?

I chose to handle this case by having the molecule not move.


Terrific!

This is to the message callback function, I presume?


I didn't explicitly test it, but it should be.



Type 'moveto 1 2 3 45 2' and you will see it move to the axisAngle
(1, 2, 3, 45) over 5 seconds.

Or 2 seconds....


Uhh ... yeah ... 2 seconds :-)



I still have not gotten the CVS to work on my PC. Can you put the
JmolApplet.jar file somewhere I can just access it?


I have temporarily copied Jmol.jar and JmolApplet.jar to
  http://www.jmol.org/v10pre13d/

I *strongly* recommend that you play with this using the Jmol.jar
application. Open the scripting window and open the Jmol Console

File -> Scripting ...
Help -> Jmol Console



Another VERY useful aspect of this is that one could save the current view
and restore it.


Yes.


Miguel



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

--

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: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to