你如何在海龟图形(python)中绘制椭圆/椭圆形? [英] How do you draw an ellipse/oval in turtle graphics (python)?

查看:120
本文介绍了你如何在海龟图形(python)中绘制椭圆/椭圆形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在海龟图形 (python) 中绘制椭圆/椭圆?我希望能够使用 circle() 函数或类似函数绘制椭圆和椭圆的一部分.我可以使用 #turtlesize(stretch_wid=None,stretch_len=10,outline=None) 标记一个.但我不希望它被颜色填充.

How do you draw an ellipse/oval in turtle graphics (python)? I want to be able to draw an ellipse and part of an ellipse using the circle() function or similar. I can stamp one using #turtlesize(stretch_wid=None, stretch_len=10, outline=None). But I don't want it to be color filled.

推荐答案

可以使用乌龟的 shapesize() 函数制作椭圆.

You can use shapesize() function of turtle to make an ellipse.

shape("circle")
shapesize(5,4,1)
fillcolor("white")

这篇关于你如何在海龟图形(python)中绘制椭圆/椭圆形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆