float exercise no. 2:

`set window 32,32,640,480`

set redraw off

radians

a#

while keydown(27)=0

set color 0,0,0

cls

set color 255,255,255

_DrawCube 300.0, 100.0, 80.0, a

_DrawCube 300.0, 300.0, 90.0,-a

set color 255,200,0

_DrawCube 20.0, 20.0, 20.0, a

_DrawCube 600.0, 460.0, 20.0,-a

a = a+0.1

if a>=360.0 then a=-a

redraw

wait 80

wend

procedure DrawCube(x#, y#, s#, a#)

x1# = x

y1# = y

x2# = x1+cos(a)*s

y2# = y1+sin(a)*s

x3# = x2+cos(a+90.0)*s

y3# = y2+sin(a+90.0)*s

x4# = x1+cos(a+90.0)*s

y4# = y1+sin(a+90.0)*s

draw line int(x1), int(y1), int(x2), int(y2)

draw line int(x2), int(y2), int(x3), int(y3)

draw line int(x3), int(y3), int(x4), int(y4)

draw line int(x4), int(y4), int(x1), int(y1)

draw line int(x1+s), int(y1), int(x2+s), int(y2)

draw line int(x2+s), int(y2), int(x3+s), int(y3)

draw line int(x3+s), int(y3), int(x4+s), int(y4)

draw line int(x4+s), int(y4), int(x1+s), int(y1)

draw line int(x1), int(y1), int(x1+s), int(y1)

draw line int(x2), int(y2), int(x2+s), int(y2)

draw line int(x3), int(y3), int(x3+s), int(y3)

draw line int(x4), int(y4), int(x4+s), int(y4)

endproc