谁能帮我想三个数学函数的VB的程序,简单点,都要作图的,请各个高手帮忙,我一定给高分!

来源:百度知道 编辑:UC知道 时间:2024/05/11 01:35:50

Private Sub Form_Resize()
Dim P As Single, t As Single, x As Single, y As Single, x0 As Single, y0 As Single
If Me.WindowState = 1 Then Exit Sub
Me.Scale (-8, 8)-(8, -8)
P = 3.1415926
Me.Cls: Me.AutoRedraw = True

'y=sin(x)
t = 0: x0 = -7.5: y0 = 0
For t = 0 To P * 2 Step P / 90
x = t * 0.75
y = 4 * Sin(t)
If t = 0 Then Me.PSet (x0 + x, y0 + y) Else Me.Line -(x0 + x, y0 + y)
Next
Me.CurrentX = x0: Me.CurrentY = -6.5
Me.Print "正弦"

'x^2+y^2=1
t = 0: x0 = 0: y0 = 0
Call Yuan(4, 4, 0, x, y): Me.PSet (x0 + x, y0 + y)
For t = 0 To P * 2 Step P / 90
Call Yuan(2, 6, t, x, y)
If t = 0 Then Me.PSet (x0 + x, y0 + y) Else Me.Line -(x0 + x, y0 + y)
Next
Me.CurrentX = x0: Me.CurrentY = -6.5
Me.Print "椭圆"

'y=2x^2
x0 = 5: y0 = -6<