This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert from https://www.dwitter.net/d/26619 | |
from turtle import * | |
bgcolor(0,0,0), setup(500,500) | |
hideturtle(), tracer(False), penup() | |
def rect(x=0, y=0, w=100): | |
goto(x,y) | |
begin_fill() | |
[ forward(w) or left(90) for _ in range(4) ] | |
end_fill() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.dwitter.net/d/28951 | |
from turtle import * | |
bgcolor(0,0,0), setup(500,500) | |
hideturtle(), tracer(0), penup() | |
from math import sin, cos | |
from time import perf_counter | |
def _loop(): | |
update(), clear() | |
t = perf_counter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired by https://www.dwitter.net/d/28950 | |
from turtle import * | |
bgcolor(0,0,0), setup(500,500) | |
hideturtle(), tracer(0), penup() | |
from math import sin, cos | |
from time import perf_counter | |
def _Oneo_Kuu(): | |
update(), clear() | |
t = perf_counter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired by https://www.dwitter.net/d/28950 | |
from turtle import * | |
bgcolor(0,0,0), setup(500,500) | |
hideturtle(), tracer(0), penup() | |
from math import sin, cos | |
from time import perf_counter | |
def _Oneo_Kuu(): | |
update(), clear() | |
t = perf_counter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from turtle import * | |
bgcolor("#222"), setup(500,400) | |
hideturtle(), tracer(0), penup() | |
def Text(txt, col:tuple, x, y, shader:bool, size): | |
font = ("Consolas",size,"bold") | |
for i in range(shader + 1): | |
goto(-2*i+x, 4*i+y) | |
color(col) if i|(not shader) else color(0,0,0) | |
write(txt,font=font,align="center") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert from dwitter.net/d/26555 --By hoplite | |
from turtle import * | |
bgcolor("#000"), setup(500,500) | |
hideturtle(), tracer(0), penup() | |
getcanvas().winfo_toplevel().wm_attributes("-transparentcolor", "#000") | |
getcanvas().winfo_toplevel().attributes('-fullscreen', True) | |
from math import sin, cos | |
from time import perf_counter | |
w = 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from turtle import * # nhập tất cả các "hàm" từ thư viện rùa "turtle" | |
# cài đặt ban đầu: chuyển màu sắc nền thành đen, ẩn "rùa", đặt chế độ vẽ tức thì, ẩn đường đi của "rùa" | |
bgcolor("#000"), hideturtle(), tracer(0), penup() | |
# dòng 5 sẽ làm cho cửa sổ không bị che bởi cửa sổ khác | |
getcanvas().winfo_toplevel().attributes("-topmost", True) | |
# dòng 7 giúp cửa sổ sẽ trong suốt ở những vị trí có màu đen | |
getcanvas().winfo_toplevel().attributes("-transparentcolor", "#000") | |
getcanvas().winfo_toplevel().attributes("-fullscreen", True) # cửa sổ sẽ phủ toàn bộ màn hình | |
def star(r): # tạo một hàm vẽ ngôi sao với độ lớn r tùy ý | |
begin_fill() # bắt đầu tô màu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from turtle import * | |
bgcolor("#f00"),setup(600,400,800,80) | |
hideturtle(), tracer(0), penup() | |
from math import sin, cos, pi | |
from time import perf_counter | |
def _30_4_1975(): | |
update(), clear() | |
t = perf_counter()*3 | |
goto(0,-9999), dot(9999*2, (0,0.5,1)) |