24 lines
		
	
	
		
			647 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			647 B
		
	
	
	
		
			Python
		
	
	
	
	
	
#!python3
 | 
						|
from math import *
 | 
						|
 | 
						|
tile_size = 8
 | 
						|
frames = []
 | 
						|
center = (80, 40)
 | 
						|
 | 
						|
width_max = 24
 | 
						|
width_min = 16
 | 
						|
frame_count = 255
 | 
						|
 | 
						|
for t in range(frame_count):
 | 
						|
	e = ((width_min + width_max)*0.5) + (width_max - width_min)*0.5*sin(2*pi*t/frame_count)
 | 
						|
	half_width = e*0.5
 | 
						|
	x = center[0] - 60*cos(2*pi*t/frame_count) - half_width + 8 # plus 8 bc the overlap on the edges
 | 
						|
	y = center[1] - 2*half_width + 16 #plus 8 because of the underscan period
 | 
						|
	frames.append( (x, y, e) )
 | 
						|
 | 
						|
def h(flt):
 | 
						|
	return f'${int(floor(flt+0.5)):x}'
 | 
						|
 | 
						|
frame_strings = [f"{h(t[1])}, {h(t[0])}, {h(t[2])}" for t in frames]
 | 
						|
 | 
						|
print("db {}, {}".format(frame_count, ", ".join(frame_strings))) |