python画流星雨

1.源代码

import turtle as t
import random as r
import math
t.speed(990000*99999)
t.bgcolor('black')
t.colormode(255)
t.pensize(50)

for i in range(0,255):
    t.color(i,i,i)
    t.up()
    t.goto(-400,250-2.5*i)
    t.down()
    t.forward(1000)

t.penup()
t.goto(450, -1030)
t.seth(90)
t.color('#816745')
t.begin_fill()
t.circle(800,200)
t.end_fill()

t.color('white')
t.pensize(5)
t.penup()
t.goto(-160, -250)
t.seth(110)
t.pendown()
t.forward(80)
t.seth(30)
t.circle(40, 300)
t.seth(-110)
t.forward(80)
t.penup()
t.color('black')
t.goto(-190, -145)
t.seth(110)
t.forward(25)
t.penup()
t.goto(-200, -160)
t.seth(30)
t.pensize(8)
t.color('pink')
t.pendown()
t.forward(10)

t.penup()
t.goto(-200, -210)
t.pendown()
t.pensize(1)
t.color('red','red')
t.begin_fill()
t.seth(45)
t.forward(10)
t.circle(5, 180)
t.right(90)
t.circle(5, 180)
t.forward(4)
t.end_fill()

for i in range(0,255):
    t.pensize(2

你可能感兴趣的:(python,开发语言)