做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

用python畫星空

來源:懂視網(wǎng) 責(zé)編:臨意 時間:2021-12-30 16:14:25
文檔

用python畫星空

在繪制星空的過程中一般需要運用到turtle工具,它是屬于Python的標準庫,當然也可以將其稱之為海龜庫,它能夠用于描繪繪圖的軌跡,并且操作也比較簡單、便捷。
推薦度:
導(dǎo)讀在繪制星空的過程中一般需要運用到turtle工具,它是屬于Python的標準庫,當然也可以將其稱之為海龜庫,它能夠用于描繪繪圖的軌跡,并且操作也比較簡單、便捷。

用python畫星空是怎樣的呢?下面就讓我們一起來了解一下吧:

在繪制星空的過程中一般需要運用到turtle工具,它是屬于Python的標準庫,當然也可以將其稱之為海龜庫,它能夠用于描繪繪圖的軌跡,并且操作也比較簡單、便捷。

參考范例:

用python畫星空的源代碼介紹如下:

from turtle import *

from random import random,randint

screen = Screen()

width ,height = 800,600

screen.setup(width,height)

screen.title("模擬3D星空")

screen.bgcolor("black")

screen.mode("logo")

screen.delay(0)#這里要設(shè)為0,否則很卡

t = Turtle(visible = False,shape='circle')

t.pencolor("white")

t.fillcolor("white")

t.penup()

t.setheading(-90)

t.goto(width/2,randint(-height/2,height/2))

stars = []

for i in range(200):

    star = t.clone()

    s =random() /3

    star.shapesize(s,s)

    star.speed(int(s*10))

    star.setx(width/2 + randint(1,width))

    star.sety( randint(-height/2,height/2))

    star.showturtle()

    stars.append(star)

while True:

    for star in stars:

        star.setx(star.xcor() - 3 * star.speed())

    if star.xcor()<-width/2:

        star.hideturtle()

        star.setx(width/2 + randint(1,width))

        star.sety( randint(-height/2,height/2))

        star.showturtle()

以上就是小編的分享了,希望能夠幫助到大家。

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

用python畫星空

在繪制星空的過程中一般需要運用到turtle工具,它是屬于Python的標準庫,當然也可以將其稱之為海龜庫,它能夠用于描繪繪圖的軌跡,并且操作也比較簡單、便捷。
推薦度:
標簽: 用python 畫星空
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 太湖县| 桂东县| 新兴县| 通海县| 涟水县| 阿坝县| 库车县| 嵊州市| 偃师市| 岳池县| 长顺县| 吉木乃县| 黄陵县| 灵台县| 靖州| 教育| 昌吉市| 天水市| 天镇县| 灯塔市| 右玉县| 张北县| 礼泉县| 甘孜县| 宁安市| 辽阳县| 南充市| 新泰市| 库伦旗| 贵南县| 阿坝县| 赣榆县| 汉源县| 青田县| 恭城| 始兴县| 泗阳县| 盐池县| 青浦区| 葵青区| 宜城市|