A little demo I had 'lying around'!
(No media required).
make object cube 1,50: Rem Main Centre Cube
make object cube 2,20: Rem Orbiting Cube
make object cube 3,50: Rem Main Centre Cube Shadow
Color Object 3,0
Position Object 3, 0,-222,0
make object cube 4,20: Rem Orbiting Cube Shadow
Color Object 4,0
sync on
sync rate 60
Radius#=150.0: AngleInc=5: Rem Speed of rotation
XDist#=Radius#: XDistInc=0-AngleInc
ZDist#=Radius#: ZDistInc=AngleInc
Rem Create Matrix
MatPixWid=40000: MatPixHig=40000
MatTilesX=50: MatTilesZ=50
MatPosX=0-(MatPixWid/2): MatPosZ=0-(MatPixHig/2)
TileWidX=MatPixWid/MatTilesX: TileWidZ=MatPixHig/MatTilesZ
Make Matrix 1,MatPixWid,MatPixHig,MatTilesX,MatTilesZ
Position Matrix 1,MatPosX,-200,MatPosZ
Rem Create Texture For Matrix
CREATE BITMAP 1,128,128
CLS RGB(0,100,0)
For N=1 To 300
Ink RGB(0,Rnd(200)+55,0),0
Dot Rnd(128),Rnd(128)
Next N
Get Image 1,0,0,128,128
PREPARE MATRIX TEXTURE 1,1,1,1
Delete Bitmap 1
Rem Camera Position
position camera -500,100,0
point camera 0,0,0
do
X# = WrapValue(X# + AngleInc)
Z# = WrapValue(Z# + AngleInc)
If X#>359-AngleInc or Z#>359-AngleInc
Inc XDist#,XDistInc
If XDist#<=0-Radius#
XDist#=0-Radius#: XDistInc=AngleInc
YDist#=0.0: YDistInc=0-AngleInc
Endif
If XDist#>Radius#
XDist#=Radius#: XDistInc=0-AngleInc
YDist#=0.0: YDistInc=0-AngleInc
Endif
Endif
Position Object 2, newxvalue(0,X#,XDist#),newyvalue(0,Y#,YDist#),newzvalue(0,Z#,ZDist#)
Position Object 4, newxvalue(0,X#,XDist#),-204,newzvalue(0,Z#,ZDist#): Rem Shadow
sync
loop
TDK_Man