Physics 674, Winter 2011, Homework

About the program, if you want to take a look at the code. Most of the lines are for "administration" and for creating a "platform" for a dialog with the user. The commands for doing actual calculations take just seven lines located close to the end, between the "ss=0.0;" and "f2=ss*ss+sc*sc;" statements. The program does not use complex numbers, it makes calculations separately for the real and the imaginary part of the structure factor, using sine and cosine functions. Telling the truth, it's an incredibly simple program. But nothing more sophisticated is needed for calculating structure factors. They are quite simple mathematical objects!