Ha Ha! Too late! Heres my updated version with an "interactive interface" (sounds good but isn't) and rotation along multiple axis'.
DBC only (someone could try and tweek it if they like, it would be appeciated)...
rem ****************************
rem * THE SUPER CUBE SIMULATOR *
rem ****************************
rem * By Hamish McHaggis *
rem ****************************
rem Setup cube and 'camera' attributes (fiddle around with them if you want)
ink rgb(255,255,255),0:cube_z#=500:size#=300:eye#=600:hide mouse
rem Define arrays
dim x#(4,10):dim y#(4,10):dim z#(4,10):dim sx#(10):dim sy#(10)
rem Set co-ordinates for cube's vertices
data 0.0,1.0,1.0,0.0,1.0,-1.0,1.0,1.0,0.0,-1.0,1.0,0.0,0.0,-1.0,1.0,0.0,-1.0,-1.0,1.0,-1.0,0.0,-1.0,-1.0,0.0:for x=1 to 8:read x#(1,x):read y#(1,x):read z#(1,x)
rem Start loop then control rotation and other stuff
next x:sync on:do:if upkey()=1:eye#=eye#+1
endif:if downkey()=1 and eye#>1.0:eye#=eye#-1
endif:if leftkey()=1 and size#>1.0:size#=size#-1:endif
if rightkey()=1:size#=size#+1:endif:if inkey$()="x":x_rot#=x_rot#+1
endif:if inkey$()="z":x_rot#=x_rot#-1:endif:if inkey$()="s"
y_rot#=y_rot#+1:endif:if inkey$()="a":y_rot#=y_rot#-1:endif
if inkey$()="w":z_rot#=z_rot#+1:endif:if inkey$()="q":z_rot#=z_rot#-1
endif:center text 320,10,"THE SUPER CUBE SIMULATOR v1.0"
rem Write text
text 20,20,"View Point: "+str$(eye#):text 20,40,"Cube Size: "+str$(size#):text 20,60,"Rotation Rate X: "+str$(x_rot#/10)+" Y: "+str$(y_rot#/10)+" Z: "+str$(z_rot#/10)
rem Loop through the angles then loop through the vertices
rot1#=wrapvalue(rot1#+y_rot#/10):rot2#=wrapvalue(rot2#+x_rot#/10):rot3#=wrapvalue(rot3#+z_rot#/10):for l=1 to 8
rem Work out the vertices according to the angle of rotation
x#(2,l)=(cos(rot1#)*x#(1,l)-sin(rot1#)*z#(1,l)):y#(2,l)=y#(1,l)/3*2:z#(2,l)=(sin(rot1#)*x#(1,l)+cos(rot1#)*z#(1,l))
x#(3,l)=x#(2,l):y#(3,l)=(cos(rot2#)*y#(2,l)-sin(rot2#)*z#(2,l)):z#(3,l)=(sin(rot2#)*y#(2,l)+cos(rot2#)*z#(2,l))
x#(4,l)=(cos(rot3#)*x#(3,l)-sin(rot3#)*y#(3,l))*size#:y#(4,l)=(sin(rot3#)*x#(3,l)+cos(rot3#)*y#(3,l))*size#:z#(4,l)=z#(3,l)*size#
rem Work out the placement of the vertices on the screen
sx#(l)=320+x#(4,l)/((z#(4,l)+cube_z#+eye#)/eye#):sy#(l)=240-y#(4,l)/((z#(4,l)+cube_z#+eye#)/eye#):next l
rem Connect vertices with lines
ink rgb(255,255,255),0:for x=1 to 4:line sx#(x),sy#(x),sx#(x+4),sy#(x+4):next x:for x=0 to 1
for y=1 to 2:line sx#(y+4*x),sy#(y+4*x),sx#(y+2+4*x),sy#(y+2+4*x):line sx#(y+4*x),sy#(y+4*x),sx#((5-y)+4*x),sy#((5-y)+4*x):next y:next x
sync:cls:loop
Yum! Yum! Yum! Yum!