首页 分享 使用Python turtle库绘制玫瑰花

使用Python turtle库绘制玫瑰花

来源:花匠小妙招 时间:2025-01-04 21:30

最新推荐文章于 2024-11-12 07:44:59 发布

chiayee42 于 2019-02-14 19:47:16 发布

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

刚开始学Python,画个玫瑰花练练手,正好今天也是情人节
在这里插入图片描述
我自认为还是挺好看的,感觉比我搜到的那几个画出来的强
代码如下

import turtle as t t.setup(1100,1000) t.hideturtle() t.speed(11) t.penup() t.goto(50,-450) t.pensize(5) t.pencolor("black") t.seth(140) t.pendown() t.speed(10) t.circle(-300,60) t.fd(100) #jiaodu80 #1ye t.seth(10) t.fd(50) t.fillcolor("green") t.begin_fill() t.right(40) t.circle(120,80) t.left(100) t.circle(120,80) t.end_fill() t.seth(10) t.fd(90) t.speed(11) t.penup() t.fd(-140) t.seth(80) #2ye t.pendown() t.speed(10) t.fd(70) t.seth(160) t.fd(50) t.fillcolor("green") t.begin_fill() t.right(40) t.circle(120,80) t.left(100) t.circle(120,80) t.end_fill() t.seth(160) t.fd(90) t.speed(11) t.penup() t.fd(-140) t.seth(80) t.pendown() t.speed(10) # t.fd(100) #1ban t.seth(-20) t.fillcolor("crimson") t.begin_fill() t.circle(100,100) t.circl

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758

相关知识

用python turtle绘制一朵玫瑰花
Python用turtle库绘制图形——漂亮的玫瑰
python的turtle画个玫瑰花
python用turtle画玫瑰花
Python Turtle库使用——绘制玫瑰花
使用Python的turtle模块绘制玫瑰花图案(含详细Python代码与注释)
Turtle库绘制玫瑰花
【Python实用工具】(情人节献礼)turtle函数绘制动态玫瑰花
Python绘制玫瑰花:编程与艺术的交融
python turtle玫瑰花绘制效果和源代码

网址: 使用Python turtle库绘制玫瑰花 https://www.huajiangbk.com/newsview1447768.html

所属分类:花卉
上一篇: 花玫瑰
下一篇: 花养花 玫瑰花茶 30g,9.9

推荐分享