import math
import turtle
# 1. Configuración del lienzo
pantalla = turtle.Screen()
pantalla.bgcolor("black")
pantalla.title("Un detalle especial")
t = turtle.Turtle()
t.speed(0) # Máxima velocidad de dibujo
t.hideturtle()
# 2. Dibujar los pétalos (Estructura geométrica)
for i in range(16):
for j in range(18):
t.color("#FFA216") # Naranja/Dorado
t.right(90)
t.circle(150 - j * 6, 90)
t.left(90)
t.circle(150 - j * 6, 90)
t.right(180)
t.circle(40, 24)
# 3. Dibujar el centro (Espiral de semillas)
t.penup()
t.goto(0, 0)
t.color("#8B4513") # Marrón
t.shape("circle")
t.shapesize(0.2)
# Convertimos el ángulo áureo a radianes
phi = 137.508 * (math.pi / 180)
for i in range(150):
r = 4 * math.sqrt(i)
theta = i * phi
x = r * math.cos(theta)
y = r * math.sin(theta)
t.penup()
t.goto(x, y)
t.stamp() # Deja la marca de la "semilla"
# 4. El mensaje final
t.penup()
t.goto(0, -12) # Ajuste vertical para que quede centrado
t.color("#FFA216")
# Aquí puedes cambiar "TÚ" por su nombre o iniciales
t.write("TÚ", align="center", font=("Arial", 22, "bold"))
pantalla.mainloop()
To embed this project on your website, copy the following code and paste it into your website's HTML: