gb_test2
annotate gensine @ 6:6a7eb418caec
even better chessboard
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 12 Jan 2019 00:05:14 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@0 | 1 #!/usr/bin/python |
nuclear@0 | 2 |
nuclear@0 | 3 import math |
nuclear@0 | 4 |
nuclear@0 | 5 def main(): |
nuclear@0 | 6 s = 16 |
nuclear@0 | 7 x = 0.0 |
nuclear@0 | 8 dx = 2.0 * math.pi / 256.0 |
nuclear@0 | 9 for i in range(256): |
nuclear@0 | 10 sx = math.sin(x) * s# + s |
nuclear@0 | 11 print "\tdb ", int(sx) |
nuclear@0 | 12 x += dx |
nuclear@0 | 13 |
nuclear@0 | 14 main() |