granlady96 / Py

0 stars 0 forks source link

Yygg #1

Open granlady96 opened 4 months ago

granlady96 commented 4 months ago

Ttt

granlady96 commented 4 months ago

from turtle import * import colorsys import math

speed(0.25) bgcolor("black")

Genera los petalos

goto(0, -40) h = 0

for i in range(16): for j in range(18): c= colorsys.hsv_to_rgb(0.125 , 1, 1) color(c) rt(90) circle(150-j6, 90) lt(90) circle(150-j6, 90) rt(180) circle(40, 24)

Genera la parte centrall de la flor

color("black") shape("turtle") fillcolor("brown") phi = 137.508 * (math.pi/ 180.0)

for i in range (200): r = 4 math.sqrt(i) theta = iphi x = r math.cos(theta) y = r math.sin(theta) penup() goto(x, y) setheading(i * 137.508) pendown() stamp()

done()