rem Spin effect by Jo Morrow.
rem DUNNO WHAT THE HELL I WAS TRYING TO MAKE HERE. OH WELL
rem JUST MESSING AROUND SPINNING TRIANGLES

fx=-10
fy=-10
open window 640,512
dim x(6),y(6),cx(6),cy(6),sn(360),cs(360)
x(1)=fx-10:y(1)=fy-5
x(2)=fx+5:y(2)=fy-5
x(3)=fx+10:y(3)=fy+10
x(4)=500-c:y(4)=600
x(5)=10:y(5)=0
x(6)=500:y(6)=200
x=320:y=320:a=0
for i=0 to 360
sn(i)=sin(i-180*pi)
cs(i)=cos(i+180*pi)
next i

label loop
setdrawbuf dw
dw=1-dw
setdispbuf dw
clear window
j=peek("port1")
a=a+100
a=mod(a+360,360)
for i=1 to 6
cx(i)=x+x(i)*cs(a)-y(i)*sn(a)
cy(i)=y+x(i)*sn(a)+y(i)*cs(a)
next i
setrgb 1,0,0,100
setrgb 2,0,0,0
setrgb 3,0,0,0
gtriangle cx(4),cy(4) to cx(5),cy(5)-50 to cx(6),cy(6)
setrgb 1,50,50,100
setrgb 2,50,50,100
setrgb 3,500,50,50
gtriangle cx(1),cy(1)+145 to cx(2),cy(2)+145 to cx(3),cy(3)+145
gtriangle cx(1),cy(1)-270 to cx(2),cy(2)-270 to cx(3),cy(3)-270
ax=ran(40)+300
b=ran(50)+300
c=ran(40)+300
d=ran(50)+200
e=ran(40)+300
f=ran(50)+100
setrgb 1,250,0,0
line 320,462 to ax,b
line ax,b to c,d
line c,d to e,f
line e,f to 320,50
goto loop



