Welcome to use this small program for drawing three-dimensional Bulk and Surface Brillouin Zones.
Directly download the Jupyter notebook/Python file and use it! Require numpy and matplotlib
Class: BZ
Initial input: Vectors of bulk Brillouin zone, with unit A^-1 and written in the Cartesian coordinates. eg: np.array([[1,0,0],[0,1,0],[0,0,1]]).
*To calculate the Bulk BZ, just run method self.bulkBZ(), then you can get attributes: self.hs_lines_f: sides of the bulk BZ; self.hs_points: corner of the bulk BZ.
*Similarly, for obtaining surface BZ, run method self.surfaceBZ(dis,direc), where dis = an arbitrary positive number repsenting the distance between Bulk BZ center and surface BZ canter for plotting purpose, direc: surface normal direction written in Fractional coordinates with BZ vectors as basis. Then you can get attributes: self.hs_lines_pro_f and self.hs_pro_points.
!Make sure call bulkbZ before calling surfaceBz.
Example: