dim linejs as long
private command1_click()
if linejs=0 then
call
fx(-20)
'画第一根线
linejs=1
elseif linejs=1 then
call fx(-19)
'画第二根线
linejs=2
else
'如果还有第三根线,第四根,按照 画第二根线的增加,或者改成 select case 的模式
end if
end sub
private
sub fx(t as long)
Dim x4, y4 As Single
Pq = Pk(t)
x4 = 622 * Pq / (101325 - Pq)
y4 = t + x4 / 2000 * (2500 + 1.84 * t) - x4
If x4 <= 42 And y4 <= 65 Then
Picture1.Line (0, t)-(x4, y4), vbBlack
ElseIf x4 > 42 And y4 < 65 Then
x4 = 42
y4 = t + x4 / 2000 * (2500 + 1.84 * t) - x4
Picture1.Line (0, t)-(x4, y4), vbBlack
ElseIf y4 > 65 Then
y4 = 65
x4 = (y4 - t) * 2000 / (500 + 1.84 * t)
If x4 > 42 Then
x4 = 42
y4 = t + x4 / 2000 * (2500 + 1.84 * t) - x4
Picture1.Line (0, t)-(x4, y4), vbBlack
Else
Picture1.Line (0, t)-(x4, y4), vbBlack
End If
End If
end sub