原博文
2019-12-24 09:01 −
用turtle函数画空心圆 turtle.circle是从下方开始画圆的,所以要画同心圆的话,每一次都要将画笔移动到下一个圆的底部位置。 画笔的坐标默认在0,0,就以它为圆心。 因为turtle画圆的时候是从圆的底部开始画的,所以需要找到四个圆底部的坐标 四个空心圆的代码 import t...
相关推荐
2019-12-07 19:38 −
用python画简单的树
代码如下:
import turtle as T
import random
import time # 画樱花的躯干(60,t)
def Tree(branch, t): time.sleep(0.0005) if branch &...
2019-12-19 10:58 −
# 画图
蟒蛇绘制,和函数封装
去掉注释即可运行 ```python
# DrawPython '''
import turtle
# 绘制坐标系
turtle.setup(650,350,200,200)
画笔控制
turtle.penup()
# 向当前方向前进
turtle.fd(-250)
...
2019-12-03 16:32 −
import turtle
import time
# 画爱心的顶部
def LittleHeart(): for i in range(200): turtle.right(1) turtle.forward(2)
# 输入表白的语句,默认I Love you
love ...
0
610
2019-12-11 20:26 −
from matplotlib.patches import Ellipse, Circle import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ell1 = Ellipse(xy = (0....
2019-12-23 21:54 −
画一株美丽的樱花树
from turtle import *
from random import *
from math import * def tree(n,l): pd()#下笔 #阴影效果 t = cos(radians(heading()+45))/8+0.25 ...
0
3337
2019-12-03 23:19 −
import turtle #调用turtle库绘制图像的函数库turtle.color("blue") #颜色 蓝色turtle.circle(100) #画半径100的圆turtle.penup() #抬起笔turtle.goto(-180,0) #移动到turtle.pendow...
2019-12-23 23:02 −
urtle是Python内置的图形库,在这里,我们需要知道正多边形内角计算公式:内角=(边数-2)*180/边数 可选项:提示输入一种颜色,进行填充。本程序运行环境是Python3的IDLE。 import turtle ##python中的图形库 colors=["red","yellow"...
2019-12-05 14:51 −
https://www.zhihu.com/collection/260736383 https://blog.csdn.net/gaotihong/article/details/80983937 <此处就不自己写了,看了遍,照着写了一边,作者写的不错。不过有些有些偷懒,我只做了...