ROTATION OF OBJECTS ABOUT AN ARBITRARY AXIS

First edition 20/ 11/ 2008, last update 03/ 9/ 2014

in English/ in Esperanto/ in Portuguese

The updated application named GIRA7C on 03/ 9/ 2014 enables, on function panel Cv, the addition of 10 degrees over the rotation angle omega after two clicks. Please read on the lines below to get details of this new feature.
The updated application named GIRA7B on 21/ 8/ 2012executes rotation of objects about an arbitrary axis. The object can be a figure, chemical molecule or anything represented by up to 50 cartesian or not cartesian coordinates and the rotation axis defined by any two selected different points and the rotation angle defined by any selected number of degrees and presents its xy, xz and yz projections from the original position and after rotation. GIRA1, on 20/11/2008, could not show indices on the figure. GIRA7B enables indices on the figure with disks. After 05/11/2010 the user can opt to display the coeficients A, B, C and D for the equation Ax + By + Cz + D = 0 of the plane defined by any 3 points given by their respective index. GIRA7B enables figures with or without disks, with or without indices or figures with disks and with indices. The quality of the mathematical equations used by GIRA6E, on 16/8/2011 and any new updated application to change from oblique base to orthogonal base is evaluated on the bond angle section.
 
Seções
Procedure
Figures
For brginners
Appendix
Symbols
Equations
Bond angles
References

PROCEDURE

Every mouse click on button C as shown in figure 1 will select one in 7 different function panels as can be observed  in Ci in figure 1 through Cvii in figure 7. Figures 1 to 7 are static, a simple imitation of the program above.

All the acquired data and all the generated data after the last operation of this program can be observed on the blue pages numbered from 1 to 15, readable after repeated clicks on button B on the function panel Cvi, as shown in figure 6. Blue pages have characters in blue. Any blue page returns itself to the screen after 15 clicks on button B.

The available options to work with cartesian coordinates can be observed in figures 1 to 6. In this case the coordinate angles are already defined as =90.0o=90.0o and =90.0o.

To work with coordinates on oblique basis any angle among coordinates different from 90.0o must be defined before any other operation. To perform this click repeatedly on button Ci to reach Cvii as observed in figure 7. Next click on button  or  or , and on the numeric buttons to build the angle and on button E to acquire it. The original coordinates of the points will be displayed on blue pages B11 to B15. The original coordinates converted to the orthogonal base will be displayed on pages B1 to B5.

GIRA7B is limited to accept up to 50 points or 150 coordinates set to zero as it starts. Points can be connected by straight line segments limited to 200 lines.

Green and brown disks can be used to enhance points as observed in the button on figure 3. To enhance with a disk any point disconnected from line segment this point must be connected to itself, with the same respectively coordinates.

To rotate an object about an arbitrary axis or a figure or a chemical molecule or a polyhedron or any sequence of points the rotation axis must be defined by point S and T given by their coordinates Sx, Sy, Sz, Tx, Ty and Tz separated by a distance greater than zero acting on the buttons observed in figure 4. Point S or T or both may be points of the object. GIRA7B accepts the rotation angle in radians or in degrees after a click on button R or D respectively, as in figure 5.

Select a suitable scale factor N, see figure 6, in order to have a proper dimension of the obtained projection to be transferred to a report after a screenshot and paste action available on any graphic editor of good quality.

For Bginners

GIRA7B has an example object on xy projection visible after a click on button ai on panel functions Cvi as shown in figure 6, but attention please: any data stored before will be lost. The original coordinates of the points can be observed on blue page B=1. The original coordinates of points indexed from 0 to 9 are listed on the left side of the page. The coordinates of the first point belonging to the example object are x[0]=-18.6004; y[0]=10.2671; z[0]=4.1667. The next column on the same page displays the coordinates Sx, Sy, Sz, Tx, Ty and Tz, defining the rotation axis, the rotation angle omega=0.0o,  the total number of points pop=46 in the figure ai, bonded by L=39 line segments with scale factor N=10.0. This means that in any projection of the figure the coordinates of the cursor given on the status bar whet it points to any location of the projection are equal to the coordinates in the original scale muliplyed by the scale factor. Next can be oserved the first line segment P[1]=0 Q[1]=1, next segment P[2]=1 Q[2]=2 and P[3]=2 Q[3]=3, next P[4]=3 Q[4]=0. This means the first line segment with index [1] bonds point indexed [0] with point indexed [1], the second line segment bonds point indexed [1] with point indexed [2], the third segment bonds point indexed [2] to point indexed [3], the fourth segment bonds point indexed [3] to point indexed [0], respectively and so on. Coordinates of points indexed from [40] to [45] can be observed on page B=5. Coordinates on pages B=6 to B=10 have zero value because there was not defined any rotation angle up to now.

A a click on button  aii will show a xz projection of the same object after a rotation of omega= 9.2o. about the axis defined by points S and T with coordinates Sx=0.0000, Sy=0.0000, Sz=0.0000, Tx=10.0000, Ty=12.0000 and Tz=10.0000. Check on blue page B=6, the first point of the object has actual coordinates X[0]=-17.9150; Y[0]=12.0881 and Z[0]=1.2960 after the rotation. The original coordinates are still in pages B=1 to B=5.

A click on button aiii will show the xy projection of the same object with no change on its relative orientation to the base x, y and z. The original coordinates continue on pages B=1 to B=5 and the actual coordinates are the same of the previous item because there was no change on the rotation angle nor change in the coordinates of the two points defining the totation axis.

Resources

GIRA7B can calculate the equation Ax + By + Cz + D = 0 of the plane passing through 3 points. To obtain the coeficients A, B, C and D go to panel Cvi and give the index of each respective point: click on the little button I, then click to compose the index number then click on E. In a similar way give the index for the second point with button II and third point with button III. The respective index of the 3 points can be observed on bottom left corner of page B=1 as pa; pb and pc. The coeficients of the equation are given as PL:A=...; B=...; C=...; D=...

A click on button F, figure 3, enables GIRA7B to acquire the index number of the line segment to be erased. Any line segment can be erased from the projection.  If the enter is F=201 GIRA7B will draw all the line segments, including any one erased in a previous action.

A click on the little button W, figure 6, erases any previous stored data and freezes buttons ai, aii and aiii eliminating the possibility to loose data on next work section.

After the selection of any numerical value with a click it will be readable on the white display, as in figure 2.

A click in button E after a selected numerical value will acquire: the point coordinate or the index of a point to be connected by a line segment or the index of a line segment to be erased or the angle of rotation or the scale factor.

Any coordinate or angle value input can be negative signed. If this is the case, the negative sign must be pushed before any numerical value. For example D=-45.7.

The function panel can be moved to a new position on the screen by a push and drag mouse action on the blue button, see figure 1.

What can be done if a click on the wrong number occurs? The program can get rid of it after a series of clicks on button C to return and then select the right number. Check in the blue pages as soon as possible and continue if it is all right, either start again. This work requires attention. It is strongly recommended to prepare a ordered printed list containing the input data before the work with GIRA7B and it is not recommended to work in hurry, tired and nervous. If only a point is visible on the projection after some connections by straight line segments among points are done, please try the acquisition of another suitable scale factor, adequate to the screen dimensions.

Figures
 
(Blue Button)
y[1]=-12.5
       
Ci 
 [ 
 ] 
 Y   Z 

Figure 1. Panel Ci.

 
0 (White display)
 
       
Cii
 P 
 Q 
XY  XZ   YZ 
E
.
0
1 2 3
4 5 6
7 8 9

Figure 2. Panel Cii.

 
 
i
     
Ciii
 F 
XY  XZ   YZ 
E
.
0
1 2 3
4 5 6
7 8 9

Figure 3. Panel Ciii.

 
0
-
       
Civ
 S 
 T 
X  Y   Z 
E
.
0
1 2 3
4 5 6
7 8 9

Figure 4. Panel Civ.

 
0
-
     
Cv
 R 
 D 
XY  XZ   YZ 
E
.
0
1 2 3
4 5 6
7 8 9

Figure 5. Panel Cv.

 
0
 
W
I
II
III
Cvi
 N 
 B 
ai  aii   aiii 
E
.
0
1 2 3
4 5 6
7 8 9

Figure 6. Panel Cvi.

 
0
 
       
Cvii
   
E
.
0
1 2 3
4 5 6
7 8 9

Figure 7. Panel Cvii.

 

APPENDIX

Figure 1
Example 1. Acquisition of first coordinate x[0]=-1.1234: click on button X , on button [, on 0, on ], click to build the number, click on button E.
Example 2. Coordinates of the very last point could be: x[49]=2.0, y[49]=3.7 e z[49]=5.2.

Figure 2
Example 1. First straight line segment connecting points: click on button P, button 0 and button E, click on button Q, button 4 and button E. Blue page B=1 contains the information: P[1]=0 Q[1]=4. This means connection number 1 or [1] by a straight line segment from point with index 0 to point with index 4. After any connection the XY or XZ or YZ projection can be observed,  if desired.

 Figure 3
Example 1. Connection number 2 erased: click on button F, on button 2 and on Button E. Blue page B=1 contains the information: F=2. To restore any connection make F=201 and click on E.

Example 2. To add a disk on each connected point: click on the button with the disk. A green point will appear on the white display. To remove disk click on the button with the disk. To add indices: click on button i, i in black turns to white on gray button and a letter i will appear on the white display. To remove indices: click on button i, i in white turns to black and the letter i will vanish from the white display.

Ecample 3. Click on XY or Xz or YZ to observe the projection with the original coordinates.

Figure 4
Example 1. For the first coordinate: click on S, on X, click to make the numeric value, click on E. Any new coordinate value can be defined any time.

Figure 5
Example 1. For a rotation angle in radians click on button R, click to build the number, click on button E.
Example 2. For a rotation angle in degrees click on button D, click to build the number, click on button E.
Example 3. Click on button XY or XZ or YZ to observe the projection after the last rotation.

Figure 6
Example 1. Click on button N, click to build the number to be defined as the scale factor, click on button E.
Example 2. Click on button B to observe blue page B=1, more clicks to see other pages.
Example 3. Click on ai, to observe the example object, next on aii and next on aiii.
Example 4. Click on W to clean any previous data and freeze buttons ai, aii and aiii.

Figure 7
Example 1. Click on button   on panel Cvii, click to copmpose 120, click on E for hexagonal system as used in the first four bond angle calculations.

SYMBOLS
 
Symbol Description
On panel function Ciii, to add or remove colored disks from segment end points. 
i On panel function Ciii, to add or remove indices.
On panel function Cvii, for the angle among y and z referential.
On panel function Cvii, for the angle among x and z referential.
On panel function Cvii, for the angle among x and y referential.
ai Projection on xy plane for example of connected points.
aii Projection on xz plane for example of connected points.
aiii Projection on xy plane for example of connected points after rotation of 120.0 degrees about axis defined by Sand T.
al on blue pages.
B On panel function Cvi, to observe blue pages.
be on blue pages.
Ci, Cii,...Cvii  Button on panel function number 1, 2, ...7.
D On panel function Cv, for rotation angle omega in degrees. 
On function panel Cv, to add 10 degrees over the rotation angle omega after two clicks.
E Button for the acquisition of numeric values.
F On panel function Ciii, to define the index of the connection to be erased from the projection.
ga on blue pages.
L On blue pages, total number of connections. 
N On panel function Cvi, scale factor for the projection.
omega On blue page, rotation angle in degrees, even if acquired in radians.
ox[0],...oz[0] On blue page, initial coordinates of first point in not cartesian coordinates.
On panel function Cii,  first of the couple of points to be connected by a straight line segment.
pop On blue page, number of acquired points. 
Q On panel function Cii, second of the couple of points to be connected by a straight line segment.
R On panel function Cv, for rotation angle omega in radians. 
S On panel function Civ, point to define rotation axis, click before button X or Y or Z on the same panel function.
sX, sY, sZ On blue page, not cartesian coordinates of a point defining rotation axis.
Sx, Sy, Sz On blue page, cartesian coordinates of a point defining rotation axis.
T On panel function Civ, point to define  rotation axis, click before button X or Y or Z on the same panel function.
tX, tY, tZ On blue page, not cartesian coordinates of a point defining rotation axis.
Tx, Ty, Tz On blue page, cartesian coordinates of a point defining rotation axis.
W On panel function Cvi, cleans all data and freezes buttons ai, aii e aiii.
x[0],..., z[0] On blue page, initial cartesian coordinates of the first point.
X[0], ... Z[0] On blue page, cartesian coordinates of the first point rotated by omega degrees.
X, Y, Z On panel function Ci to acquire cartesian coordinates x[j], y[j] and z[j] or not cartesian coordinates ox[j], oy[j] and oz[j], j=0, 1, ..., 49.
X, Y, Z On panel function Civ to acquire cartesian coordinates Sx,...Sz or Tx,...Tz or not cartesian coordinates sX,...sZ or tX,... tZ.
XY, XZ ,  YZ On panel function Cii and Ciii to show projection of the points on plane xy or xz or yz, respectively.
XY, XZ,  YZ On panel function Cv to show projection of the points on plane xy or xz or yz, respectively after the last omega rotation.

I
Little button on panel function Cvi to acquire the index of the first point to calculate the coeficients for the plane equation.
II Little button on panel function Cvi to acquire the index of the second point to calculate the coeficients for the plane equation.
III Little button on panel function Cvi to acquire the index of the third point to calculate the coeficients A, B, C and D for the plane equation on orthogonal base to be shown on the bottom left corner of blue page B=1.

Equations to convert coordinates of oblique base tx, ty and tz into coordinates of orthogonal base cx, cy and cz

cx = tx + ty * cos(  ) + tz * cos( )

cy = ty * sen(  ) + tz * (cos(  ) - cos(  ) * cos(  )) / sen(  )

cz = tz * (1 - cos2 ) - cos2 ) - cos2 ) + 2 * cos(  ) * cos(  ) * cos(  ))0.5 / sen(  )

Equations to convert coordinates of monoclinic base mx, my and mz into coordinates of orthogonal base cx, cy and cz
cx = mx - mz * sen(  - 90o)

cy = my

cz = mz * cos(  - 90o)
 

Equations to convert coordinates of hexagonal base hx, hy, hz and  = 120o into coordinates of orthogonal base cx, cy and cz
 

cx = hx - hy * sen( - 90o)

cy = hy * cos( - 90o)

cz = hz

Bond angles in references compared with bond angles obtained with coordinates in othogonal basis calculated with GIRA7B
 
Reference Formula Constants Bond Angle Bond Angle on Orthogonal Basis
Z. Kristallogr.,212, (1997), 355-361 AgC18H36N2O6ClO4 a = b = 8.589 A
c = 27.553 A
= 120o
N(1)-Ag(1)- O(1) = 66.9o N(1)-Ag(1)- O(1) = 66.5o
Z. Kristallogr.,210, (1995), 93-95 KBe2BO3F2 a = b = 4.427 A
c = 18.744 A
= 120o
B(1)-O(1)-Be(1)= 121.04o B(1)-O(1)-Be(1)= 121.05o
Z. Kristallogr.,209, (1994), 961-964 C16H25N3OSSn a = b = 33.723 A
c = 9.090 A
= 120o
S(1)-Sn(1)-O(1) = 158.8o S(1)-Sn(1)-O(1) = 158.8o
Z. Kristallogr.,209, (1994), 961-964 C16H25N3O2Sn a = b = 33.059 A
c = 9.085 A
= 120o
O(1)-Sn(1)-N(1) = 83.1o O(1)-Sn(1)-N(1) = 83.02o
Z. Kristallogr.,212, (1997), 742-744 C12H12MgN2O8 a = 21.183 A
b = 3.667 A
c = 10.357 A
= 117.227o
O(1)-N(1)-C(1) = 119.4o O(1)-N(1)-C(1) = 119.4o
Z. Kristallogr.,212, (1997), 679-681 [Li(OEt2)]2Ni(CH2NMe2)4 a = 9.100 A
b = 11.721 A
c = 13.773 A
= 93.47o
C(1)-Ni(1)-C(4) = 96.2o C(1)-Ni(1)-C(4) = 96.2o
Z. Kristallogr.,212, (1997), 115-120 Ni(py)4F2.2H2O a = 13.199 A
b = 10.815 A
c = 15.353 A
= 108.08o
F(1)-Ni(1)-N(7) = 90.18o F(1)-Ni(1)-N(7) = 89.83o
 Z. Kristallogr.,211, (1996), 622-625 C13H10FNO3 a = 9.032 A
b = 10.111 A
c = 14.625 A
= 121.3o
C(3)-C(2)-O(6) = 128,0o C(3)-C(2)-O(6) = 127,8o
Z. Kristallogr.,211, (1996), 895-899 (NH4)4[Mo4O12(O2)2].2H2O a = 8.401 A
b = 8.819 A
c = 12.802 A
= 100.01o
O(4)-Mo(2)-O(7)= 163.4o O(4)-Mo(2)-O(7)= 163.4o
Am. Mineral., 65, (1980), 1270-1276 Ca3Si6O15.7H2O a = 7.588 A
b = 9.793 A
c = 7.339 A
= 111.77o
= 103.50o
= 86.53o
O(9)-Si(3)-O(11)= 114.0o O(9)-Si(3)-O(11)= 114.0o
Z. Kristallogr.,212, (1997), 874-877 [C12H14N2]3[BiCl6]2.2H2O a = 797.0 pm
b = 1215.8 pm
c = 1303.9 pm 
= 88.76o
= 83.01o
= 63.86o
Cl(11)-Bi(1)-Cl(12)=92.18o Cl(11)-Bi(1)-Cl(12)=92.19o
Chem. Mater. 11,
(1999), 1546-1550
Co4(OH)2(H2O)2(C4H4O4)3.2H2O a = 10.181 A
b = 10.668 A
c = 12.857 A
= 112.97o
= 91.24o
= 117.96o
Co(2)-O(2)-Co(1)=92.60o Co(2)-O(2)-Co(1)=92.59o
Z. Kristallogr.,211, (1996), 247-250 [SnCl4(phenantroline)].0.25C6H6 a = 13.162 A
b = 16.719 A
c = 7.818 A
= 93.50o
= 101.89o
= 89.76o
Cl(1)-Sn(1)-Cl(2) = 100.8o Cl(1)-Sn(1)-Cl(2) = 101.6o
Z. Kristallogr.,211, (1996), 247-250 [Cp2Fe]2I16 a = 11.558 A
b = 11.877 A
c = 18.754 A
= 102.13o
= 100.99o
= 107.72o
I(2)- I(1)- I(4) = 98.85o I(2)- I(1)- I(4) = 99.02o

To rotate a point about an arbitrary axis this Java Applet uses the method presented on internet page http://local.wasp.uwa.edu.au/~pbourke/geometry/rotate/, from Prof. Dr. Paul Bourke, paul.bourke@uwa.edu.au, accessed on 20/11/2008.

To find the location of a point in space: Trilateration, http://en.wikipedia.org/wiki/Trilateration

Reference: C. Giacovazzo, H.L. Monaco, G. Artioli, D. Viterbo, G. Ferraris, G. Gilli, G. Zanotti and M. Catti, Fundamentals of Crystallography, International Union of Crystallography, Oxford University Press, 2002, 825p.

Please send your comments.

Table of subjects.
Presentation
Chemistry Analytical Chromatography
Elemental organic analysis
Volumetric analysis, simulation
Crystallography 3 fold screw axis
4 fold inversion axis on tetrahedron
5 fold rotation axis absent in crystallography
Binary axis and reflection plane in stereographic projection
Bravais lattices
Conic sections under symmetry operators
Converting from spherical coordinates to stereographic projection
Crystal lattice and unit cell
Determination of unit cell
Elements of symmetry in action - animation
Elements of symmetry in action - cube game
Elements of symmetry in action - dodecahedron game
Elements of symmetry in action - icosahedron game
Elements of symmetry in action - octahedron game
Elements of symmetry in action - tetrahedron game
Ewald sphere and crystal measurements
Extinctions
Five classes in the cubic system
Five classes in the rhombohedral system
From tetrahedron to prism
Gnomonic projection
Improper symmetry axis
Miller indices
Miller indices - animation
Miller indices - cube game
Miller indices - octahedron game
Miller indices - rhombic dodecahedron game
Miller indices - tetrahedron game
Mirror plane
Orientations of the cube
Plane symmetry groups
Question on point group
Rotation axis in octahedron and Werner compounds
Rotation axis on tetrahedron and organic molecules
Rotation of objects about an arbitrary axis
Rotation of the parallel and stereographic projections of the cube
Rotation of the stereographic and parallel projection of the cube III
Seven faces in stereographic projection
Seven classes in the hexagonal system
Seven classes in the tetragonal system
Six elements of symmetry in seven orientations
Spherical projection of the octahedron
Stereographic projection
Stereographic projection of six polyhedra in different orientations
Straight line equations and symmetry elements
Symmetry, 2 fold axis
Symmetry, 2, 3 and 6 fold axis in benzene
Symmetry, 3 fold axis in the cube
Symmetry, 4 fold axis in the cube
Symmetry, 4 fold axis in the unit cell of gold
Symmetry elements and Miller indices game
Symmetry elements and Miller indices game - octahedron
Symmetry in art and in crystallography
Three classes in the monoclinic system
Three classes in the orthorhombic system
Twin crystals
Two classes in the triclinic system
Unit cell in hexagonal net
General Butane conformations
Density
Electrochemical cell
Ethane conformations
Resources of chemical-ICT: water, health and symmetry
Solid and liquid gold