Sub add_mesh
For j= 1 To NY
For i=-NX/2 To NX*1.5 Step 8
GraphicsWindow.BrushColor=GraphicsWindow.GetRandomColor()
rect[J+":1"][i]=Shapes.AddRectangle(dR,dR)
Shapes.Move(rect[J+":1"][i],Math.GetRandomNumber(900),-2000)
rect[J+":2"][i]=Shapes.AddRectangle(dR,dR)
Shapes.Move(rect[J+":2"][i],Math.GetRandomNumber(900),2000)
EndFor
EndFor
EndSub
Sub add_rect
For j= -4 To NY Step 8
For i=-NX/2 To NX*1.5 Step 8
GraphicsWindow.BrushColor=LDColours.HSLtoRGB (math.Remainder (cc 360) 1 .6)
cc=cc+15
L_rect[J+":1"][i]=Shapes.AddRectangle(4*dR,4*dR)
Shapes.Move(L_rect[J+":1"][i],Math.GetRandomNumber(900),-2000)
LDEffect.DropShaddow (L_rect[J+":1"][i] "")
LDShapes.AnimateRotation(L_rect[J+":1"][i] 1500 5)
L_rect[J+":2"][i]=Shapes.AddRectangle(4*dR,4*dR)
Shapes.Move(L_rect[J+":2"][i],Math.GetRandomNumber(900),2000)
EndFor
EndFor
EndSub
Sub showmesh
For j= 1 To NY
For i=-NX/2 To NX*1.5 Step 8
Shapes.Animate(rect[J+":1"][i],dR*i+dR*J,dR*(J-1),2000)
Shapes.Animate(rect[J+":2"][i],dR*(i-1)-dR*J,dR*(J-1),2000)
EndFor
EndFor
EndSub
Sub showrect
For j= -4 To NY Step 8
For i=-NX/2 To NX*1.5 Step 8
Shapes.Animate(L_rect[J+":1"][i],dR*(i+2)+dR*J,dR*(J+5),2000)
Shapes.Rotate(L_rect[J+":1"][i],-45)
Shapes.Animate(L_rect[J+":2"][i],dR*(i-2)+dR*J,dR*(J+1),2000)
Shapes.Rotate(L_rect[J+":2"][i],-45)
EndFor
EndFor
EndSub