W:Algorithms to cut a surface from a crystal



Hi,
 I am trying to write some code which takes the unit cell of a crystal (both the
 cell vectors and the coordinates of the atoms) and creates a "cell"
 for a surface of the crystal (for a given set of Miller indices). I am having a
 little bit of a problem getting the coordinates of the atoms in the
 "surface cell" right.
 I thought that this should be a standard problem, but I can't find anything
 about a suitable algorithm for doing this neither on the Web nor in standard
 crystallography text books. If anybody has any pointers either to code or text
 books on this subject I would appreciate it.
 Best Regards,
 Jrg-Rdiger Hill