ROTATION OF OBJECTS ABOUT AN ARBITRARY AXIS

Last Update 7/ 9/ 2009

in English/ in Esperanto/ in Portuguese

With this application named GIRA2 a figure can spin about any axis. It  performs a rotation of any object, chemical molecule or any thing represented by up to 50 cartesian or not cartesian coordinates about an axis defined by any two selected different points of 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. GIRA2 enables indices on the figure with disks.
 
Sections
Procedure
Figures
Appendix
Symbols
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.

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 al=90.0, be=90.0 and ga=90.0 degrees.

To work with not cartesian coordinates any angle among coordinates different from 90.0 degrees 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 alpha or beta or gamma and on the numeric buttons to build the angle and on button E to acquire it.

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

GIRA2 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, figure, chemical molecule , 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 have same coordinates as points of the object. GIRA2 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 sequence of copy and paste actions available on any graphic editor of good quality.

For beginners GIRA2 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. Next a click on button  aii will present a xz projection of the same object. Next a click on button aiii will show the same object on xy projection after a rotation of 9.2 degrees about the axis defined by points S and T with coordinates Sx=0.0, Sy=0.0, Sz=0.0, Tx=10.0, Ty=12.0 and Tz=10.0, as can be observed  in the blue pages. Check in blue page B=1, on the upper left corner original points  with indices from 0 to 9. On the next column in the same page are reported Sx, Sy, Sz, Tx, Ty and Tz, including omega=9.2 degrees, the point population pop=21, the number of line segments L=33, the scale factor N=1.0. The first point in this example is defined by the cartesian coordinates x[0]=0.0; y[0]=-113.0; z[0]=0.0 and the first line segment P[1]=0 Q[1]=1 connects point with index 0 to point with index 1. The second line segment  P[2]=1 Q[2]=2 connects point with index 1 to point with index 2. The third line segment P[3]=1 Q[3]=3 connects point with index 1 to point with index 3, next P[4]=2 Q[4]=3, the fourth line segment connects point with index 2 to point with index 3, and so on. Observing the top left corner in blue page B=6 after a click in ai, aii and aiii, the first point of the example object rotated 9.2 degrees about the axis defined by S and T given above has cartesian coordinates generated by GIRA2 equal to X[0]=-10.2479; Y[0]=-112.1548 and Z[0]=9.2337. This point was originally at cartesian coordinates x[0]=0.0; y[0]=-113.0; z[0]=0.0 as observed in blue page B=1.

A click on button F, figure 3, enables GIRA2 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 GIRA2 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, the index of a point to be connected by a line segment, the index of a line segment to be erased, the angle of rotation or the scale factor.

Any coordinate or angle value input can be negative signed.

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? It can be discarded after a series of clicks on button C and 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 GIRA2 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 a larger scale factor, adequate to the screen dimensions.
 
(Blue button)
Y[1]=-1.1234 
-  
Ci
[
]
X
Y
Z
E
.
0
1 2 3
4 5 6
7 8 9

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.

 
0
 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 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
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: 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 on disks: click on button i, i in black turns to white on gray button and a green letter i will appear on the white display. To remove indices from disks: click on button i, i in white turns to black and the green letter i will vanish from the white display.

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.

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 3. Click on W to clean any previous data and freeze buttons ai, aii and aiii.

SYMBOLS
 
Symbol Description
On panel function Ciii, to add or remove colored disks from connections. 
i On panel function Ciii, to add or remove indices on disks.
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 9.2 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. 
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.

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.

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