aboutsummaryrefslogtreecommitdiffstats
path: root/doughnut2.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-24 11:21:40 +0100
committerMattias Andrée <maandree@kth.se>2023-12-24 11:21:40 +0100
commit3c16d0884dd3b066bf90d748d64552ec9447137b (patch)
treed65555c5bec19a9a45725744bf5257564bf7c141 /doughnut2.py
parentAdd improved version (diff)
downloaddoughnut.py-3c16d0884dd3b066bf90d748d64552ec9447137b.tar.gz
doughnut.py-3c16d0884dd3b066bf90d748d64552ec9447137b.tar.bz2
doughnut.py-3c16d0884dd3b066bf90d748d64552ec9447137b.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--doughnut2.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/doughnut2.py b/doughnut2.py
index b01030a..2aa3eec 100644
--- a/doughnut2.py
+++ b/doughnut2.py
@@ -14,14 +14,14 @@
__import__("math"). sin,__import__("math"
).cos,24*(0x9e*' '+ '\n\n'),(lambda b:''
.join((c[0]if(c:=b[y *0xa0+x*2:][:2])[0]==
-"\n"or(c [0])==c[1]== chr(32)else"\x1b[38"+
- ";5;%im▄"%c[1]if c[0]== chr(32)else"\x1b[38;5;"+
- "%im▀"%c[0]if" "==c[1]else("\x1b[48;5;%i;38;5;%im"+
- "▄\x1b[m")%(c[0],c[1]))for(y)in(range(24))for(x)in
- range(80))));S,C=[sin(i/100)for(i) in range(0,628
- )],[cos(i/0x64)for(i)in range(0,0o1164)];print(
- "\x1b[2"+"J");any(__import__("ti"+"me").sleep
- (.025)for(X)in __import__(("iter"+"tools")+
+"\n"or(c [0])==c[1]== chr(32)else"\x1b[38"+
+";5;%im▄\x1b[m"%c [1]if c[0]==" "else"\x1b[38"+
+ ";5;%im▀\x1b[m"%c[0]if" " ==c[1]else("\x1b[48;5;%i"+
+ ";38;5;%im▄\x1b[m")%(c[0],c[1]))for(y)in(range(24))
+ for(x)in range(0x50))));(S,C)=[sin(i/100)for(i)in
+ range(0,628)],[cos(i/0x64)for(i)in range(0,628)
+ ];print("\x1b["+"2J");any(__import__("time").
+ sleep(.025)for(X)in __import__("itertools"+
("")).repeat(0)if(A:=ᅠ(cos(A),sin(A))))
##############################
####### Mattias Andrée #######