Microsoft Small Basic

Program Listing: GKJ942
'program orbital 1s, contour plotting
'Author, Wojciech Szczepankiewicz. Silesian University of Technology
'Gliwice, Poland
'Start of BlockData
GraphicsWindow.BackgroundColor="Black"
e = 2.7182818 'Natural log base
scale = 50
trans_x = 320
trans_y = 200
psi_value = .123
start_x = -2.5
end_x = 2.5
start_y = -5
end_y = 5
net_step = .02
'End of BlockData
' Main part
For x = start_x To end_x Step net_step
For y = start_y To end_y Step net_step
radius = math.SquareRoot(x * x + y * y)
orbital_1s = math.Power(e, -radius)
If orbital_1s >= psi_value Then
x_screen = x * scale + trans_x
y_screen = y * scale + trans_y
GraphicsWindow.SetPixel(x_screen, y_screen, "Blue")
EndIf
EndFor
EndFor
GraphicsWindow.DrawText(10,400,"End of plot")