How would I add a glow around the circle below in python turtle?

137 Views Asked by At

I have got my code for the circle but I just need the glow to look like a white shining sun but I have tried so many different things and none have worked

This is my code so far and it creates a randomized white sun size which is what I need but it needs to also have a glow something like this CODE RIGHT NOW INCLUDING SUNSET:

import turtle
import random
s = turtle.getscreen()
t = turtle.Turtle()
t.speed(100)
t.pensize(4)
from turtle import Screen, Turtle

COLOR = (1, 0.7, 0.06)
TARGET = (0.8, 0.09, 0.1)
#Sunset
screen = Screen()
screen.tracer(False)
screen.setup(width = 1.0, height = 1.0)

WIDTH, HEIGHT = screen.window_width(), screen.window_height()

deltas = [(hue - COLOR[index]) / HEIGHT for index, hue in enumerate(TARGET)]

turtle = Turtle()
turtle.color(COLOR)

turtle.penup()
turtle.goto(-WIDTH/2, HEIGHT/2)
turtle.pendown()

direction = 1

for distance, y in enumerate(range(HEIGHT//2, -HEIGHT//2, -1)):

    turtle.forward(WIDTH * direction)
    turtle.color([COLOR[i] + delta * distance for i, delta in enumerate(deltas)])
    turtle.sety(y)

    direction *= -1

screen.tracer(True)

#Sun
def Sun (color):
    t.pu()
    t.goto(-400,-250)
    t.color(color)
    t.pd()
    rad = random.randint(100,220)
    t.begin_fill()
    t.circle(rad)
    t.end_fill()
    t.pu()
Sun("White")

This is the glowing white sun which I need it to loom like

0

There are 0 best solutions below