Ian Jauslin
summaryrefslogtreecommitdiff
blob: 4b1ba3c1cc730e70b4e5f00c254ffb491b40795b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python3

from math import *
import random
import sys

# size of lattice
N=5

# configuration
config=[]
for i in range(N):
    for j in range(N):
        for k in range(N):
            config.append([2*i+((j+k)%2),sqrt(3)*(j+(k%2)/3),2*sqrt(6)/3*k])


for i in range(len(config)):
    print(str(config[i][0])+"+cos(u)*sin(v)", end=",")
    print(str(config[i][1])+"+sin(u)*sin(v)", end=",")
    print(str(config[i][2])+"+cos(v)", end=" ")
    print("with pm3d", end="")
    if i<len(config)-1:
        print(", \\")