考研用急求混沌方程图型
混沌方程:
y = dx
dy = p1 * x - x ^ 3 - p * y + q * Cos(wt)
求高手帮忙用vb画出以(x,y)为坐标的图象,在线等
图象在 http://hi.baidu.com/ghdwff/blog/item/391e762da4c76836359bf753.html
[解决办法]
Option Explicit
Private Function f(x As Single, y As Single) As Boolean
'检查 x、y 是否满足函数
End Function
Private Sub Form_Load()
Me.ScaleMode = vbPixels
Me.WindowState = vbMaximized
Me.AutoRedraw = True
Dim i As Long
Dim j As Long
Dim x As Single
Dim y As Single
Dim d
Me.Cls
For i = -300 To 300
x = i / 100
For j = -300 To 300
y = j / 100
If f(x, y) Then
PSet (i, j), 0
End If
Next
Next
End Sub
[解决办法]
Option Explicit Private Function f(x As Single, y As Single) As Boolean '检查 x、y 是否满足函数 End Function Private Sub Form_Load() Me.ScaleMode = vbPixels Me.WindowState = vbMaximized Me.AutoRedraw = True Dim i As Long Dim j As Long Dim x As Single Dim y As Single Dim d Me.Cls For i = -300 To 300 x = i / 100 For j = -300 To 300 y = j / 100 If f(x, y) Then PSet (i, j), 0 End If Next Next End Sub