求物理vb或mathmatic演示
来源:百度知道 编辑:UC知道 时间:2024/07/08 20:11:02
空气阻力与速度二次方成正比,只要算出仰角就行,要求炮弹和目标在同一水平面,空气阻力系数和目标距离、初速度可更改,有动画最好好
'''源码程序我已经发给您的邮箱了,不过您还需要再加工修改.
Dim x, y, k As Integer
Private Sub Command1_Click()
If Command1.Caption = "开始" Then
Timer1.Enabled = True: Command1.Caption = "暂停"
Else
Timer1.Enabled = False: Command1.Caption = "开始"
End If
Timer1.Interval = Slider1.Value * 10
Image2.Picture = Image1.Picture
Image3.Picture = Image1.Picture
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
k = 0: x = 0: y = 0
Command1.Caption = "开始"
End Sub
Private Sub Form_Load()
Me.BackColor = &H0&
End Sub
Private Sub Slider1_Change()
Timer1.Interval = Slider1.Value * 10
End Sub
Private Sub Timer1_Timer()
x = x + 30
y = 0.5 * 9.8 * (x / 100) ^ 2 's=0.5gt^2
Image2.Left = x: Image3.Top = y
Image1.Left = x: Image1.Top = y
If y >= 6300 Then k = 0: x = 0: y = 0
End Sub
问题1:空气阻力的形