欢迎光临散文网 会员登陆 & 注册

use Python to draw "jinitaimei"

2019-07-18 08:05 作者:这个骚年很可耐  | 我要投稿

this is my first time to use python to draw,but it is for me, kunkun is so hard for me to draw.(鲲鲲我实在是画不出莱)。it is my code as follow.

import turtle

from turtle import *

import turtle as t

import time as ti

ti.sleep(3.3)

t.pu()

t.fd(-250)

t.pd()

t.pensize(100)

#画篮球

t.color('orange')

t.circle(50)

t.color('orange')

t.pensize(1)

t.pencolor('black')

t.seth(270)

t.pu()

t.fd(50)

t.pd()

t.seth(90)

t.fd(200)

t.seth(180)

t.pu()

t.circle(100,30)

t.seth(270)

t.pencolor('black')

t.pd()

t.fd(100*(3**0.5))

t.seth(360)

t.pu()

t.fd(100)

t.pd()

t.seth(90)

t.fd(100*(3**0.5))

t.pu()

t.goto(150,150)

t.seth(-90)

t.pd()

t.pencolor('black')


t.circle(100,360)

t.pu()

t.goto(175,175)

t.pensize(25)

t.color('black')

t.pd()

t.circle(12.5,360)

t.pensize(12.5)

t.color('white')

t.circle(6.5)

#画鸡嘴

t.pu()

t.goto(150,150)

t.pd()

t.pencolor('yellow')

t.pensize(10)

t.seth(-180)

t.fd(50)

t.seth(330)

t.fd(100/(3**0.5))

t.seth(-150)

t.fd(100/(3**0.5))

t.seth(-360)

t.fd(60)

#画鸡冠

t.pu()

t.goto(250,250)

t.pd()

t.pensize(50)

t.color('red')

t.circle(25)

t.seth(-90)

t.circle(25)

#画鸡喙

t.pu()

t.goto(250,50)

t.pd()

t.pensize(25)

t.circle(12.5)



use Python to draw "jinitaimei"的评论 (共 条)

分享到微博请遵守国家法律