文章詳情頁(yè)
python 動(dòng)態(tài)繪制愛心的示例
瀏覽:2日期:2022-07-09 18:05:41
代碼
import turtleturtle.bgcolor('black')turtle.pensize(2)sizeh = 1.2def curve(): for ii in range(200): turtle.right(1) turtle.forward(1 * sizeh)turtle.speed(0)turtle.color('red', 'red')turtle.begin_fill()turtle.left(140)turtle.forward(111.65 * sizeh)curve()turtle.left(120)curve()turtle.forward(111.65 * sizeh)turtle.end_fill()turtle.hideturtle()
效果圖
以上就是python 動(dòng)態(tài)繪制愛心的示例的詳細(xì)內(nèi)容,更多關(guān)于python 繪制愛心的資料請(qǐng)關(guān)注好吧啦網(wǎng)其它相關(guān)文章!
相關(guān)文章:
1. XML實(shí)體注入深入理解2. WMLScript腳本程序設(shè)計(jì)第1/9頁(yè)3. XML入門的常見問題(三)4. Xpath語(yǔ)法格式總結(jié)5. CSS Hack大全-教你如何區(qū)分出IE6-IE10、FireFox、Chrome、Opera6. 不要在HTML中濫用div7. CSS3實(shí)例分享之多重背景的實(shí)現(xiàn)(Multiple backgrounds)8. XML 非法字符(轉(zhuǎn)義字符)9. 利用CSS3新特性創(chuàng)建透明邊框三角10. 前端html+css實(shí)現(xiàn)動(dòng)態(tài)生日快樂代碼
排行榜
