tft每日頭條

 > 圖文

 > 平抛運動的特點的

平抛運動的特點的

圖文 更新时间:2024-09-15 19:12:56

平抛運動的特點的(平抛運動演示)1

程序演示

import turtle import math colors = ["blue", "black", "brown", "red", "yellow", "green", "orange", "beige", "turquoise", "pink"] turtle.setup(800, 800) # 設置窗口尺寸 t_line = turtle.Turtle() t_line.pencolor('red') t_line.pensize(5) t_line.speed(0) t_line.down() t_line.goto(-400,0) t_line.goto(400,0) t_line.hideturtle() h = 20 # 球的高度 g = 9.8 # 重力加速度 k = 10 # 放大系數,為了圖形顯示 h,g = h*k,g*k # 放大倍數,便于顯示 n = 1 # 實驗次數 v = float(input('請輸入' colors[(n-1) % 10] '球的水平初速度:')) # 球的水平初速度 ,建議測試10,20,30,300 while v!=0: v = v*k # 放大倍數,便于顯示 y = h t_ball = turtle.Turtle() t_ball.speed(0) t_ball.shape('circle') t_ball.color(colors[(n-1)]) t_ball.up() t_ball.goto(-400, h) t_ball.down() t = 0 while y>0: y=h-0.5*g*t*t x=-400 v*t t_ball.goto(x,y) turtle.delay(10) t=t 0.01 n = n 1 # 實驗次數增加 v = float(input('請輸入球的水平初速度:')) # 球的水平初速度 turtle.mainloop()

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关圖文资讯推荐

热门圖文资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved