Skip to content

Instantly share code, notes, and snippets.

@akira093
Created September 25, 2012 23:52
Show Gist options
  • Save akira093/3785163 to your computer and use it in GitHub Desktop.
Save akira093/3785163 to your computer and use it in GitHub Desktop.
from __future__ import division
import pylab
h_max,k_max,l_max = 4,4,4
L = pylab.zeros((h_max,k_max,l_max))
M = []
for h in range(h_max):
for k in range(k_max):
for l in range(l_max):
F = sum(
pylab.exp(
pylab.pi * 1j
* pylab.array([0,h+k,h+l,k+l])
)
) * sum(
pylab.exp(
pylab.pi * 1j / 2
* pylab.array([0,h+k+l])
)
)
L[h][k][l] = F
M.append("{0},{1},{2}".format(h,k,l))
L = L.real
L.resize(1,h_max * k_max* l_max)
#print L
#print M
pylab.plot(*L,marker="*")
pylab.show()
#for i in range(len(M)):
#print L[0][i]," ",M[i]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment