PDA

View Full Version : Tiny Mathematics



peter
04-04-2014, 12:20
Hello,

trigonometric landscape.



Uses "ui"
#INCLUDE "abc.inc"

OpenWindow 800,800
setHandleDC hdc, hwnd

Canvas_Clear 0
Drawstring 10,10,"WAIT A LITTLE BIT.....",&hffffff
Canvas_Redraw

Dim t,x,y As Single

For t=0 To 7000 Step 0.006
x=Sin(0.99*t)-0.7*Cos(3.01*t)
y=Cos(1.01*t)+0.1*Sin(15.03*t)
x=x*200+400 : y=y*200+400
Canvas_SetPixel y,x,&hf0f0f0
Next
DrawRect 10,10,120,20,0,0
Canvas_Redraw

While IsWindow(hwnd) And Key(%VK_ESCAPE)=0
Sleep 10
Wend
Canvas_Window End hwnd