I'm told by a colleague who really does know how to do this that "his favorite way" to do rotations is to use quaternions. See

http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

Does this help?

Bob


Miguel wrote:

I'm volunteering, but I need a very specific goal. Exactly what is

being

asked?
Are we trying to do smooth animation or a sudden jump? Does the current

user-influenced rotation status need to be a starting point? (Miguel, have you

An elegant and smooth rotation from the current position is ideal. A

suddent jump is a good alternative to the current 'no option' status.

Certainly when we implement it the rendering will be smooth. It seems to
me that we should allow the user to specify either a time or a rotation
rate in degrees per second.

Here is the way that I have been thinking about it ...

We have a transformation matrix that represents the current rotation
state, A.

We need to go from the transformation matrix in state A to the
transformation matrix in state B.

Therefore, what matrix operation do we perform on A to get to B

A * ? = B

I don't know what this is called ...

Q: What is this called?

Once we get this matrix, then I can convert it to an AxisAngle rotation.
This will tell us what axis to rotate about and how many degrees to
rotate. At that point the animation is easy.

Now, let's look for a simple case. Let's say that we want to be able to
rotate from the current position (after some arbitrary set of rotations),
back to the startup state. When the molecular model is first loaded the
transformation matrix is the identity matrix, I. So we are saying

A * ? = I

In this case I think that we just need to calculate the inverse of A ...

Q: Is that correct?

The Java3D vecmath library will calculate the inverse of a matrix. So
maybe this part isn't that difficult.

Q: In the more general case, what are the operations required to calculate
A * ? = B  ?


I have more questions, but that is enough to get us started.



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