EMdrawcell - EMsoft-org/EMsoft GitHub Wiki
Program: EMdrawcell
This is a very simplistic command line program to illustrate how one can draw crystal unit cells. It is really not meant to produce high quality plots (you should really use CrystalMaker to do that) but the source code might serve as an example for how to do this sort of thing. The program produces a PostScript file that can then be viewed by other programs.
Start the program from the command line with the EMdrawcell command and enter the crystal structure file name when prompted. We'll use the SrTiO3.xtal file for this example. The program then asks
Number of unit cells in a, b and c direction ?:
We'll pick 2,2,2 for this example. Then the program asks:
Viewing distance [nm] :
This parameter sets the level of perspective present in the rendering; a large distance will produce less perspective. Let's pick a viewing distance of 2 nm.
Enter viewing direction indices [uvw] :
For the viewing direction, at this point you can only use integer numbers, so let's pick the 3,2,0 direction. Then enter a PostScript file name at the prompt, e.g., test.ps. The program then asks:
Use ionic radii (1) or metallic (2) :
and we pick ionic in this case. The resulting PostScript file looks like this: