Advertisement
here2share

# b_wave.py

May 6th, 2020
1,613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. # b_wave.py
  2.  
  3. from PIL import Image, ImageTk, ImageDraw
  4. from Tkinter import *
  5. import PIL
  6. import math
  7.  
  8. z = 0
  9. ttt = []
  10. xy = {}
  11. if 1:
  12.     incr = (360.0/790)
  13.     while z < 360:
  14.         s = math.cos(math.radians(z))*56+56
  15.         xy[len(xy)] = min(255,int(s))
  16.         z += incr
  17.     t = [xy[z] for z in range(len(xy))]
  18.     ttt.extend(t)
  19. 0
  20. ccc = ttt[:]
  21. 0
  22.  
  23. for z in ccc:
  24.     print '|'+'|'*z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement