Hi Tilman That's great! Your derivation for the 'rotating axes' case is essentially the same as one I derived for myself and also agrees with that of Jorge Navaza (ITC Vol F, sect A13.2.1.1 p.273), but it's nice to have it all readily accessible on a webpage. BTW I note that you hide the full horror of the complexity of the matrix algebra for the rotating axes case with a link which some people may not have noticed at first glance:
http://www.biozentrum.unibas.ch/personal/schirmer/modtrafo_html/analogou s.html . Personally I would show the gory details all up front to let people know what they are letting themselves in for if they insist on using this description, i.e. a concatenated matrix product of no less that *thirteen* simple axial rotations if written out in full, compared with only *three* for the 'fixed-axes' description! Personally I avoid the 'moving axes' description like the plague, simply because it's the source of so much complexity and confusion! A similar derivation is also given in Wikipedia: http://en.wikipedia.org/wiki/Euler_angles#Equivalence_of_the_movements (note that this page is currently in a state of flux, and do check everything because some of it is just plain wrong - these facts are probably not unconnected!). However there's still a problem, and it's by no means a trivial one! Most sources on this subject give a different result but are all consistent with each other, e.g. see here: http://mathworld.wolfram.com/EulerAngles.html and here: http://www.sp.uconn.edu/~ch351vc/pdfs/euler2.pdf and here: Goldstein, Classical Mechanics (this is the original 'gold' standard on this subject, pun not intended!), and most surprising of all here: ITC Vol. B, sect. 2.3.6.2, p.252-3 (Rossmann). Note that Rossmann's matrix here is identical to the MathWorld one. Note also that the matrix given on the Wikipedia page is completely wrong and not consistent with anywhere else (e.g. for ZYZ it seems to have alpha & gamma swapped in the matrix even though they are defined identically - unless someone has fixed it by the time you read this), so ignore it! On the MathWorld page we see the rotations phi (= our alpha) around z, theta (= beta) around *rotated* x, psi (= gamma) around *rotated* z and the product matrix is given as: A = B . C . D or R(a,b,g) = Rz(g).Rx(b).Rz(a) where note the matrices B=Rz(g), C=Rx(b) & D=Rz(a) are axial and therefore rotations around the old *fixed* axes. This is clearly different from the CCP4 convention (even taking into account that CCP4 uses ZYZ): R(a,b,g) = Rz(a).Ry(b).Rz(g) So we have two completely different answers using apparently identical definitions, except that some people use the ZYZ convention, and some use ZXZ: but that doesn't account for the inconsistency (though it does tend to obscure the fact that there is an inconsistency!). What's more, I can assure you that CCP4 and the ROTW (rest of the world) are BOTH correct - so how is that possible? I believe the answer goes to the root of all the historical confusion about Eulerian angles. The answer is that people are assuming an absolutely fundamental convention (without usually even taking the trouble to state it explicitly!), which is different for CCP4 and the ROTW. Actually this is not quite true: in fact computer gaming software seems to use the same convention as CCP4 - e.g. see here: http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml (this of course puts us in a clear majority by far over ROTW!). A clue to the answer actually lies in the apparently trivial change of sign in the axial matrix used, e.g. CCP4 and OpenGL uses for rotation about z: [ cos(a) -sin(a) 0 ] [ sin(a) cos(a) 0 ] [ 0 0 1 ] whereas the ROTW uses: [ cos(a) sin(a) 0 ] [ -sin(a) cos(a) 0 ] [ 0 0 1 ] However this is much more than a simple change of sign of the angles. In fact if anyone cares to read Goldstein (thoroughly!) he makes it quite clear: there are actually two fundamental conventions for describing rotating bodies in use, one we can call the "physicists' convention" (particularly quantum mechanicists), where the object whose co-ordinates are to be transformed is nevertheless considered to be stationary and the observer is imagined to move around the object instead (you can understand why non-physicists have trouble with this!). Obviously this convention has been used by people who have traditionally been able to comprehend what they're doing purely via the equations of motion and who therefore apparently don't need graphical visualisation aids(!). Goldstein writes the equation: (r)' = Ar (the brackets indicate that the vector r *doesn't* move, only its components change value). The other convention we can call the "chemists' convention" since it is used by people who do need to visualise things, where the observer is considered to be stationary and the object is moved, but note in the opposite direction which explains the changes of sign in the matrix, so the net result is the same. Also it's pretty obvious why you have to use this convention for computer graphics! Goldstein writes this as: r' = Ar (now the vector r does move and becomes the vector r'). So one could call this a fixed vs. moving object convention, but note that it is completely separate from the fixed vs. moving axes convention we have all been talking about, and I believe that mixing up these two concepts has caused additional confusion in the past. Cheers -- Ian > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tilman Schirmer > Sent: 13 December 2007 18:47 > To: CCP4BB@JISCMAIL.AC.UK > Cc: Tilman Schirmer > Subject: Re: CCP4 rotation convention > > Dear all, > > I was not aware of this discussion, when I also ran into > confusion. Finally, I figured it out myself and > wrote a summary. Perhaps it is useful for somebody: > http://www.biozentrum.unibas.ch/personal/schirmer/modtrafo_htm > l/rotation.html > > I fully agree with the final comments by Ian and Sacha. > > The comment is part of the documentation for my program > MODTRAFO, a collection of jiffy programs > dealing basically with models and transformations. The > platform allows e.g. to create easily rotation > matrices from polar or Eulerian angles or, vice versa, to > analyze a transformation for its angular > components. > > Best, > Tilman > > > Disclaimer This communication is confidential and may contain privileged information intended solely for the named addressee(s). It may not be used or disclosed except for the purpose for which it has been sent. If you are not the intended recipient you must not review, use, disclose, copy, distribute or take any action in reliance upon it. If you have received this communication in error, please notify Astex Therapeutics Ltd by emailing [EMAIL PROTECTED] and destroy all copies of the message and any attached documents. Astex Therapeutics Ltd monitors, controls and protects all its messaging traffic in compliance with its corporate email policy. The Company accepts no liability or responsibility for any onward transmission or use of emails and attachments having left the Astex Therapeutics domain. Unless expressly stated, opinions in this message are those of the individual sender and not of Astex Therapeutics Ltd. The recipient should check this email and any attachments for the presence of computer viruses. Astex Therapeutics Ltd accepts no liability for damage caused by any virus transmitted by this email. E-mail is susceptible to data corruption, interception, unauthorized amendment, and tampering, Astex Therapeutics Ltd only send and receive e-mails on the basis that the Company is not liable for any such alteration or any consequences thereof. Astex Therapeutics Ltd., Registered in England at 436 Cambridge Science Park, Cambridge CB4 0QA under number 3751674