Python 3 package for illustrating crystallography

Geometry

PyCrystallography contains many 3D geometries that can be loaded and viewed interactively. The models can then have there normals identified and converted to Stereographic Projections.

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from PyCrystallography.geometry import *
fig = plt.figure()
ax = fig.add_subplot(111,projection='3d')
######################################
# which ever 3d model you want to load
cuboid(ax,5,5,5)
######################################
plt.show()

Cuboids

def cuboid(ax,h,w,d):


Pyramids

def pryamid(ax,h,num_of_side):


Bipyramids

def bipryamid(ax,h,num_of_side):


Prisms

def prism(ax,h,num_of_side):


Biprismid

(not sure what its proper name is)

def biprismid(ax,h,num_of_side):


Tetrakis

def tetrakis(ax,h,dh):