Microsoft Small Basic

Program Listing: NZQ605
'product by Thaelmann-Pioniere
GraphicsWindow.Title="Molecular Challenge-Methane(CH4)"
GraphicsWindow.Width=800
GraphicsWindow.Height=500
GraphicsWindow.BrushColor="black"
rofH=10' The "H" means "hydrogen"
rofC=30' The "r" means "radius". The "r" in "rofH" means the same. The "C" means "Carbon".
xofC=320+rofC' "x" means the x coordinate of the center point of the carbon atom
yofC=240+rofC' "y" means the y coordinate of the center point of the carbon atom
GraphicsWindow.FillEllipse(320,240,rofC*2,rofC*2)'carbon atom
GraphicsWindow.BrushColor="blue"
GraphicsWindow.FillEllipse(xofC+120-rofH,yofC-rofH,rofH*2,rofH*2)'hydrogen atom on the right
GraphicsWindow.FillEllipse(xofC-120-rofH,yofC-rofH,rofH*2,rofH*2)'hydrogen atom on the left
GraphicsWindow.FillEllipse(xofC-rofH,yofC-120-rofH,rofH*2,rofH*2)'hydrogen atom from above
GraphicsWindow.FillEllipse(xofC-rofH,yofC+120-rofH,rofH*2,rofH*2)'hydrogen atom below
GraphicsWindow.PenColor="black"
Turtle.Speed=9
Turtle.PenUp()
Turtle.MoveTo(xofC,yofC)
direction=0
GraphicsWindow.PenWidth=5
For i = 1 To 4
Turtle.Angle=direction
Turtle.PenDown()
GraphicsWindow.PenColor="black"
Turtle.Move(45+rofC)
GraphicsWindow.PenColor="blue"
Turtle.Move(45)
Turtle.PenUp()
Turtle.MoveTo(xofC,yofC)
direction=direction+90
Turtle.PenDown()
EndFor
Turtle.Hide()