Reihen und Raster 06: Maus-Ornament
Abschlussbedingungen
import pgzrun, pygame
WIDTH, HEIGHT = 500, 500
teiler = 10
def update():
pass
def draw():
mausposition = pygame.mouse.get_pos()
screen.fill("black")
abstand = int(WIDTH / (teiler-1))
radius = mausposition[0] / 10
for x in range(0, WIDTH+1, abstand):
for y in range(0, WIDTH+1, abstand):
screen.draw.circle((x, y), radius, "white")
pgzrun.go( )
Zuletzt geändert: Donnerstag, 3. April 2025, 08:51