Thanks Peter,
I've found a way to radically reduce the CPU load. See if it works okay on your system.
act=1
While WinExit =0
if act then
ClearBuffer &hFF8400
DrawText hdc,"3D Test",254,16,&hFFFF00
DrawText hdc,"Use arrow keys and (a) for origin",20,40,&hFFFF00
CalCulation()
For pk =0 To ih
For dp =0 To pk
DrawText hdc,"<>",a2(dp)-60,b2(dp),&h00FF64
Next: Next
FlipBuffer
end if
DoEvents
act=0
iF Key(vk_right) Then gx = gx - 1 * pi / 360 : act=1
iF Key(vk_up) Then ay = ay - 1 * pi / 360 : act=1
iF Key(vk_left) Then gx = gx + 1 * pi / 360 : act=1
iF Key(vk_down) Then ay = ay + 1 * pi / 360 : act=1
iF Key(vk_a) Then Initial : act=1
sleep 5
Wend
Charles