Ein Regenbogen Hexagon:
import turtle as t
wn = t.Screen()
wn.setup(width = 800, height = 800)
wn.colormode(255)
wn.bgcolor(10, 10, 10)
wn.title("Regenbogen-Hexagon")colors = ["red", "purple", "blue", "green", "orange", "yellow"]
alex = t.Turtle()
alex.speed(0)
for i in range(300):
alex.pencolor(colors[i%6])
alex.width(i/100 + 1)
alex.forward(i)
alex.left(59)
wn.mainloop()
Ein Random Hexagon
import random
import turtle as t
wn = t.Screen()
wn.setup(width = 800, height = 800)
wn.colormode(255)
wn.bgcolor(25, 25, 25)
wn.title("Regenbogen-Hexagon")t.colormode(255)
red=random.randint(0,255)
blue=random.randint(0,255)
green=random.randint(0,255)
t.pencolor(red,green,blue)t.speed(0)
for i in range(400):
t.width(i/100 + 1)
t.forward(i)
t.left(59)
t.colormode(255)
red=random.randint(0,255)
blue=random.randint(0,255)
green=random.randint(0,255)
t.pencolor(red,green,blue)Kann mir einer sagen was das ist und warum es so aussieht wie es aussieht?
c=1
z=0
y=255
x=10
import turtle as t
wn = t.Screen()
wn.setup(width = 800, height = 800)
wn.colormode(255)
wn.bgcolor(0, 0, 0)colors = ["red", "purple", "blue", "green", "orange", "yellow"]
alex = t.Turtle()
alex.speed(0)
for i in range(400):
alex.pencolor(z,0,y)
alex.width(i/100 + 1)
alex.forward(i)
alex.left(59)
alex.speed(x)
x=x+x
y=y-1
z=z+1
c=c+1
if c > 255:
alex.pencolor(z,0,y)
alex.width(i/100 + 1)
alex.forward(i)
alex.left(59)
alex.speed(x)
x=x+x
y=y+1
z=z-1
wn.mainloop()
DU LIEST GERADE
Meine Gedanken Grütze
Historia CortaWas meinem kranken, kranken geist so alles einfällt