Microsoft Small Basic

Program Listing: RBT198
ss="211,359,215,220,311,219,311,228,360,198,315,170,314,163,331,164,332,172,370,198,354,219,557,218,649,220,772,232,845,234,877,242,893,249,912,268,1004,317,1004,329,982,338,985,351,902,354,893,336,874,335,760,335,746,353,398,357,388,337,253,334,242,355,
sh=LDText.Split (ss "|")
vv="248,770,242,745,191,743,183,724,179,653,636,653,679,638,723,634,951,629,952,639,959,638,960,761,952,759,949,768,925,767,917,740,778,743,771,763,262,771,
vg=LDText.Split (vv "|")
GraphicsWindow.Title="Trains
GraphicsWindow.Width=1400
GraphicsWindow.Height=900
GraphicsWindow.Left=5
GraphicsWindow.Top=5
GraphicsWindow.BackgroundColor ="teal
GraphicsWindow.PenWidth=3
GraphicsWindow.PenColor ="darkgray
GraphicsWindow.DrawLine (0 425 1400 425)
GraphicsWindow.PenColor ="black
GraphicsWindow.DrawLine (0 545 1400 545)
GraphicsWindow.PenWidth=0
m[1]="1=0;2=0"
m[2]="1=0;2=2"
m[3]="1=5;2=0"
s=LDShapes.AddPolygon (m)
Shapes.Remove (s)
GraphicsWindow.MouseMove =mww
GraphicsWindow.BrushColor="black
For o=0 to 1
e=Shapes.AddEllipse (66 66)
Shapes.Move (e, 1350+o*70 430)
endfor
GraphicsWindow.BrushColor="gold

For x=1 To 1
shh=LDText.Split (sh[x] ",")
m=0

For r=1 To Array.GetItemCount (shh) Step 2
m[i][1]=shh[r]
m[i][2]=shh[r+1]
i=i+1
EndFor
If x=1 Then

oc=1
EndIf
For o=0 to oc-1
p= LDShapes.AddPolygon (m)
LDShapes.ZIndex (p, 1-x)
If x=1 Then
LDShapes.BrushColour (p "blue")
LDShapes.Move (p 800+o*64 290)

elseif x>=3 then
LDShapes.BrushColour (p "black")
endif
endfor
EndFor

vf=788
For v=-1 to 10
If v>=0 then
For x=1 To 1
shh=LDText.Split (vg[x] ",")
m=0

For r=1 To Array.GetItemCount (shh) Step 2
If Math.Remainder (v 2)=1 Then

m[i][1]=900-shh[r]
Else
m[i][1]=shh[r]
endif
m[i][2]=shh[r+1]
i=i+1
EndFor

p= LDShapes.AddPolygon (m)
LDShapes.BrushColour (p "gold")
LDShapes.Move (p 15-v*vf 350)
EndFor
endif

GraphicsWindow.BrushColor="black
o400=320
For o=0 to 1
e=Shapes.AddEllipse (66 66)
If Math.Remainder (v 2)=0 then
Shapes.Move (e 15-v*vf-o*66 430)
If v=10 and o=1 then
Shapes.Remove (e)
Goto ttt
endif
Else
Shapes.Move (e 15-v*vf-o*66-120 430)
e=Shapes.AddEllipse (66 66)
Shapes.Move (e 15-v*vf-o*66+120 430)
endif
LDShapes.ZIndex (e, -55)
ttt:
endfor
endfor
GraphicsWindow.PenWidth =15
GraphicsWindow.PenColor ="brown
tx=" *** TGV *** train à grande vitesse *** TGV *** train à grande vitesse
tt=Shapes.AddText (tx+tx+tx+tx)
LDShapes.Font (tt "Engraversgothic BT" 55 "true" "True")
Shapes.Move (tt, -7500 400)
LDShapes.PenColour (tt "black")

While "true
For x=-2100 to 9800 step 4
LDGraphicsWindow.Reposition (.6 .6 x, -50 0)
Program.Delay (2)

an=an-5
endfor
Program.Delay (2222)
endwhile

Sub mww
GraphicsWindow.Title="TGV running...
'math.Floor (GraphicsWindow.MouseX) +" : "+math.Floor (GraphicsWindow.MouseY)
EndSub