Hi Adrian,
On 5/9/2021 3:22 PM, Roger Kaufman wrote:
> Also, if you look at the pattern behind the picture with Robby, the
> columns repeat every 10 vertical cells. So for authenticity, some map
> editing could be done in that vein, yielding an animation that only
> needed 10 frames.
>
I wrote a python script to make an animated gif of the panel. The panel
is really just a 17x53 three color monitor. The colors I think are
off/dim/on behind an amber glass.
After I watched this for a while I realized the gif jumps every
rotation. I now realize this is because there are 3 extra columns. It
doesn't help either that 53 is prime! If I made the pattern repeat every
11 columns, I'd be none the better since that is still 2 columns different.
To manipulate the map for each frame, I used the split command (by 17
lines) and then put that last chunk to the beginning and restacked the
map. I used col_util to capture the map to a file. There might have been
better ways to do some of this!
Roger
#!/usr/bin/python3
import os
#
http://stackoverflow.com/questions/7407766/format-a-number-containing-a-decimal-point-with-leading-zeroes
def zpad(val, n):
bits = val.split('.')
bits[0] = bits[0].zfill(n)
return '.'.join(bits)
# 53 total columns
asp_ratio = 53/17
height = 600
width = height * asp_ratio
columns = 10
rows = 17
total = rows * columns
#create map for number of columns
os.system("col_util -m deal%d,map_chocolate:khaki1:gray35%% -Z %d -d 4
-f 1 > colmap0.off" % (total, total))
#repeat map to fill all 901 cells
os.system("col_util -m colmap0.off% -Z 901 -d 4 -f 1 > colmap.off")
for i in range(0, columns):
numstr = zpad(str(i), 2)
os.system("unitile2d 1 -l 17 -w 53 | off_color -e black -v black -f U
-m colmap.off > frame_%s.off" % (numstr))
os.system("off2pov -D 18.9 -v 0.04 -e 0.04 frame_%s.off >
frame_%s.pov" % (numstr, numstr))
os.system("povray -D +a +W%s +H%s declare=AspectRatio=%s
frame_%s.pov" % (str(width), str(height), str(asp_ratio), numstr))
#split into 17 line chunks suffixed numerically
os.system("split -l 17 -d colmap.off chunk.")
#rotate by renaming last chunk to be numerically first
os.system("mv `ls chunk.* | tail -1` chunk.")
#restack map into the next map
os.system("cat chunk.* > colmap.off")
#clean up chunks, wait for remove to finish
os.system("rm chunk.* frame*.pov")
os.system("sleep 0.01")