-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdegrees.py
More file actions
50 lines (37 loc) · 1.08 KB
/
Copy pathdegrees.py
File metadata and controls
50 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from functions import *
#TODO: if name
name = input("Enter the type of polyhedra:")
numOfNets = 0
if name == 'Tetrahedron':
numOfNets = 2
k = 1
elif name == 'Cube':
numOfNets = 11
k = 2
elif name == 'Octahedron':
numOfNets = 11
k = 2
elif name == 'Dodecahedron':
numOfNets = 43380
k = 5
else:
numOfNets = 43380
k = 5
distLog = np.zeros((30, 5)).astype(int)
quantityLog = np.zeros((30, 1)).astype(int)
indexLog = [None for i in range(21)]
for i in range(0, numOfNets):
dist = giveDegDist(name, str(i).zfill(k))
if dist in distLog.tolist():
my_index = distLog.tolist().index(dist)
quantityLog[my_index] += 1
indexLog[my_index].append(i)
if dist not in distLog.tolist():
my_index = distLog.tolist().index([0, 0, 0, 0, 0])
distLog[my_index] = dist
quantityLog[my_index] = 1
indexLog[my_index] = [i]
zero_index = distLog.tolist().index([0, 0, 0, 0, 0])
for i in range(0,zero_index):
print(str(distLog.tolist()[i]) + " Quantity = " + str(quantityLog.tolist()[i][0]))
#print(indexLog)