sync on: sync rate 60 : randomize timer() : backdrop off
maxobj=20 : radius#= 1445.0 : angle#= 0.0 : angleX#= 90.0
for i = 1 to maxobj
make object triangle i,rnd(100),rnd(100),rnd(100),rnd(100),rnd(100),rnd(100),rnd(100),rnd(100),rnd(100)
position object i,0,0,0
color object i,rgb(rnd(255),rnd(255),rnd(255))
set object cull i,0
next i
position camera 0,0,-200 : point camera object position x(1),object position y(1),object position z(1)
disable escapekey : while escapekey()=0
for i = 1 to maxobj
r# = r# + 0.1
rotate limb i,0,wrapvalue(r#),wrapvalue(r#),wrapvalue(r#)
scale object i,rnd(200),rnd(200),rnd(200)
angle# = wrapvalue(angle#-mousemovex())
angleX# = wrapvalue(angleX#-mousemovey())
vX# = (cos(angle#)*radius#)*sin(angleX#)
vZ# = (sin(angle#)*radius#)*sin(angleX#)
vY# = cos(angleX#)*radius#
yrotate object i,wrapvalue((angle#*-1)-90)
xrotate object i,wrapvalue((angleX#*-1)+90)
next i
if mouseclick()=0
for i = 1 to maxobj
color object i,rgb(rnd(255),rnd(255),rnd(255))
ghost object off i
next i
endif
if mouseclick()=1
for i = 1 to maxobj
color object i,rgb(0,0,0)
ghost object on i
next i
endif
if mouseclick()=2
for i = 1 to maxobj
color object i,rgb(0,0,0)
fade object i,rnd(100)
next i
endif
sync : endwhile
for i = 1 to maxobj : delete object i : next i : end
fall down seven times, stand up eight