FireStar/fivecolor.py

49 lines
1.4 KiB
Python
Raw Normal View History

### firestar show based on the most symmetric five-coloring
### by John M. Sullivan
2019-09-28 15:24:38 +00:00
sfive = fivecs[0]
def somecolors(x, n=5, wh=False):
colors = []
2019-09-28 15:24:38 +00:00
for i in range(0,5):
if i < n:
2019-09-28 15:24:38 +00:00
colors.append(vivid(fshue(x+i/5)))
elif i == n and wh:
colors.append(white)
else:
colors.append(black)
return colors
jmscolorings1 = [
somecolors(0,0), somecolors(0,0,True),
somecolors(0,1), somecolors(0,1,True),
somecolors(0,2), somecolors(0,2,True),
somecolors(0,3), somecolors(0,3,True),
somecolors(0,4), somecolors(0,4,True),
somecolors(0)
]
jmssettings1 = [(fivecs[0], col) for col in jmscolorings1]
2019-09-28 15:24:38 +00:00
jmssettings1 = [thevoid]
for i in range (0,5):
jmssettings1.append(([sfive[i]], [white]))
jmssettings1.append(([sfive[i]], [black]))
jmssettings1.append(([sfive[i]], [vivid(fshue(i/5))]))
jmsshow1 = (jmssettings1,
2019-09-28 15:24:38 +00:00
[(0,1,5),
(1,1,5),(2,1,5),(1,1,5),(3,1,30),
(4,1,5),(5,1,5),(4,1,5),(6,1,30),
(7,1,5),(8,1,5),(7,1,5),(9,1,30),
(10,1,5),(11,1,5),(10,1,5),(12,1,30),
(13,1,5),(14,1,5),(13,2,8),(15,2,100)])
Nframes = 60
jmscolorings2 = [somecolors(x/Nframes) for x in range(0,Nframes)]
jmssettings2 = [(fivecs[0], col) for col in jmscolorings2]
2019-09-28 15:24:38 +00:00
jmstimings2 = [(n,2,0) for n in range(0,Nframes)]
jmsshow2 = (jmssettings2, jmstimings2)