This old version of Proteopedia is provided for student assignments while the new version is undergoing repairs. Content and edits done in this old version of Proteopedia after March 1, 2026 will eventually be lost when it is retired in about June of 2026.


Apply for new accounts at the new Proteopedia. Your logins will work in both the old and new versions.


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