CRYSTOSIM
Introduction
Determination of the crystal structure is an integral part of material characterization and a student taking an introductory course in material science finds it very difficult to visualize the actual crystal structure, voids, dislocations in 3-dimensions when the structure is a complex one and it is not always possible to create a physical model once all the parameters relating the structure are known. A good solution to this is an “Interactive simulation of 3-D crystal structures on a computer”.
The presented project is an attempt to developing such software, which once given the parameters relating the structure in the form of a file would simulate the structure in 3 dimensions on the screen.
With the emerging technology, and internetworking it is desirable that people all over the world use the product. Thus Java applets offer a good option when you are trying to develop a platform independent application to be put online. This is very easy to use software as one does not have to install the software and the only requirement to run this software is the web browser.
To develop platform independent software which is capable of simulating 3D crystal structures, voids, and dislocations using java applet programming.
To develop the project we’ve used a very structured approach, in which we are treating each atom or lattice point as a physical object, having the properties such as its miller indices and it’s position with respect to world coordinate system. This way we can keep track of every atoms and this makes the project extensibility very good. We use 3-D image rendering to display the atoms, which makes them very realistic.
In order to implement the above things we have chosen JAVA as the suitable language.
It’s platform independent so a person having any operating system would be able to run the software, this increases the accessibility of the project. It’s a web-based project with an idea that any person can have access to this from a remote location. We have used the
Matrix transformations in order to rotate the crystal and lattices have been used.The following section describes the matrix transformations in brief.
Transformation Matrices
In 3x3 dimension the following conventional orthogonal transformation matrices may be used to rotate a general system (right handed) by an angle q about the axis x, y and z respectively,
|
|
|
Translation-Here tx ,ty and tz denote translation parameters in x , y and z directions respectively.
Scaling -Here sx ,sy and sz denote scaling parameters in x , y and z directions respectively.
We have completed the part of simulating 3D crystal structures and bravais lattices and it is fully functional now. It takes the input data i.e. data relating the crystal structure or the bravais lattice in form of a file and displays the specified structure in a java enabled web browser when requested by the user. A typical input file looks like this:
The tags are self-explanatory.
/NaCl CRYSTAL PARAMETERS
CRYSTALNAME NaCl
LATTICE cubic
TYPE fc
PARAMETERX 1
PARAMETERY 1
PARAMETERZ 1
PARAMETERALPHA 90
PARAMETERBETA 90
PARAMETERGAMMA 90
COLOR 0 0 200
SIZE 11.6
ELEMENTNAME Na
BASIS 0.5 0 0
color 255 0 0
size 16.7
ELEMENTName Cl
basis 0 0 0
END
At present the following features are there:
In an attempt to render the project extendable at each point the project has grown to be a bit bulky with 12 java classes each containing about 150-300 lines of java code.