import socket
HOST="localhost"
PORT=1337
sock = socket.socket()
sock.connect((HOST, PORT))
sock.send(bytes("PX 10 10 ff0000\n", "utf8")
sock.close()
function zeichne_strecke(a, b)
if punkte_benachbart(a, b)
zeichne_pixel(a)
zeichne_pixel(b)
else
m = mittelpunkt_zwischen(a, b)
zeichne_strecke(a, m)
zeichne_strecke(m, b)
x = ax
y = ay
vx = bx-ax
vy = by-ay
dist = abstand(a, b)
r = 0.0
solange r <= 1.0
zeichne_pixel(x + r*vx, y + r*vy)
r = r + 1/dist