Реферат: Клеточные автоматы и компьютерная экология
Line (6 * (i - 1), 6 * (j - 1))-(6 * i - 1, 6 * j - 1), Color, BF
b(i, j) = c(i, j)
Next j
Next i
Next f
End Sub
Public Function SetColor(z As Single) As Long
Dim t As Byte
Select Case z
Case Is < Zmin
SetColor = RGB(0, 63, 0)
Case Zmin To Z14
t = 63 + 192 * (z - Zmin) / R4
SetColor = RGB(0, t, 0)
Case Z14 To Z24
t = 255 * (z - Z14) / R4
SetColor = RGB(t, 255, 0)
Case Z24 To Z34
t = 255 * (1 - (z - Z24) / R4)
SetColor = RGB(255, t, 0)
Case Z34 To Zmax
t = 63 + 192 * (1 - (z - Z34) / R4)
SetColor = RGB(t, 0, 0)
Case Is > Zmax
SetColor = RGB(63, 0, 0)
End Select
End Function