Rotation around molecular bonds

The following tool were created to help a user to rotate ‘about a bond’ when constructing molecular structures.
As you may have noticed, when building a molecule using a plastic ball and stick model, continuous rotations about bonds are carried out (by your hands). Such rotation happens as soon as you have two or more atoms in your molecule.
Test

Figure showing rotation about a molecular bond. When the user clicks on a bond, then a rod is created and placed piercing trough that bond. A bead, with the shape of a cylinder (transparent blue in the figure) is placed on the rod and can be manipulated by the mouse. As the bead is slid along the rod, the molecular structure is rotated about the actual bond.


There are still a few features missing:
  • Give option on what side of the bond to rotate
  • Reset all bonds to their initial state
  • Fix orientation of the rod – it is placed improper sometimes

You can check out the above prototype by downloading the zip archive file below. Unzip the file and just click on the executable. [download id=”1048″]