Jmol/Quaternions

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
Line 72: Line 72:
Here is an example:
Here is an example:
-
<jmol><jmolButton><script>q0 = quaternion(); qr = quaternion({1 1 0}, 90); rotate @qr</script><text>rotate all the way</text></jmolButton></jmol>
+
<jmol><jmolButton><script>q0 = quaternion(); qr = quaternion({1 1 0}, 180); rotate @qr</script><text>rotate all the way</text></jmolButton></jmol>
<jmol><jmolButton><script>moveto 0 quaternion @q0</script><text>back to last orientation</text></jmolButton></jmol>
<jmol><jmolButton><script>moveto 0 quaternion @q0</script><text>back to last orientation</text></jmolButton></jmol>
Line 87: Line 87:
Relevant Jmol command examples:
Relevant Jmol command examples:
-
qr = quaternion({1 1 0}, 90) #define the overall rotation
+
qr = quaternion({1 1 0}, 180) #define the overall rotation
q10 = @qr / 10 #q10 is rotating only one tenth of the way
q10 = @qr / 10 #q10 is rotating only one tenth of the way
rotate @q10 # rotate the view by the given amount
rotate @q10 # rotate the view by the given amount

Revision as of 18:21, 25 July 2019

Drag the structure with the mouse to rotate

Resources

http://sacredsoftware.net/tutorials/quaternion.html

Proteopedia Page Contributors and Editors (what is this?)

Karsten Theis

Personal tools