Because I wanted to be able to do quick Mie calculation without needing to compile Mie code each and every time, I created an interactive web page that allows me (and you!) to do your own Mie scattering calculations!
This does not help you much if you need to run many simulations, or you actually want to numbers from the simulation. Let me state that the best Mie codes are in Fortran. Period. The C versions have not been validated nearly as rigorously. Go to the ScatterLib for a complete selection of codes.
I particularly recommend Wiscombe's code for homogeneous spheres. You might also start at his home page and find other useful light propagation codes and papers.
This will have links to various Mie scattering codes as well as references.
If you must have C code, then you can either use a the Fortran code with a Fortan-to-C converter, or write your own. I am embarrassed to say that I wrote my own. I have used Wiscombe's Mie testing data to validate this code and I can say that it only fails in a few extreme cases. This is the code that is used with the interactive calculator above.
The source code is written in CWEB, which allows excellent documentation of scientific programs. Unfortunately, the C source has comments, but since I never look at the C source, it does not bother me.
Documentation | CWEB source | C source
© 2007 Scott Prahl