Julio, Benjamim e Antônio Tabela Periódica - fabrica-escola/artes-2o-ano-carmem-silva GitHub Wiki
import csv
def setup():
size(900, 700)
background(0)
with open('data/tp.csv') as tp:
linhas = list(csv.reader(tp))
# for linha in linhas[1:4]:
# print(linha)
elementos = [(li[0], li[1], li[2])
for li in linhas[1:119]
# if li[2][0].isdigit() # remove series L & A
]
for el in elementos:
print(el)
translate(10, 50)
for tZ, S, tG in elementos:
Z = int(tZ)
if tG[:3] == "Lan":
G = 2.3
elif tG[:3] == "Act":
G = 2.6
else:
G = float(tG)
textSize(15 + Z / 7.0)
colorMode(HSB)
fill(G * 40, 150, 240)
text(S , G * 70, Z * 3)