indexbase 0
Include "window.h"
SetWindow "SineAnimation",640,480,w_1
SetFont 12,24,100,"courier"
sys bild,gras,frog,zk,x=240,y=310
single r1,r2,ra,ri1,ri2
bild= LoadBmp "bmp/stern.bmp",1
gras= LoadBmp "bmp/grass.bmp",1
frog= LoadBmp "bmp/frog.bmp",2
ri1=2
ri2=40
While WinExit=0
SetBmp bild,0,0,640,480,0
SetBmp gras,0,480-90,800,64,0
Setbmp frog,x+cos(rad r1)*r1*.8,y+cos(rad r2)*20,128,128,zK
SetText "Radian = " + rad(r1), 0, 0,Rgb 255,255,255
SetText "Radius = " + r1 ,0,26,Rgb 255,255,255
'zK +=1: iF zK = 2 Then zK=0
r1 +=ri1 : iF r1<0 or r1>360 Then ri1=-ri1 : r1+=ri1*2
r2 +=ri2 : iF r2<0 or r2>360 Then ri2=-ri2 : r2+=ri2*2
DoEvents
SwapBuffers
WaitFrames 8
Wend
WinEnd
indexbase 0
Include "window.h"
SetWindow "SineAnimation",640,480,w_1
SetFont 12,24,100,"courier"
sys bild, gras, frog, zk, x=256, y=310
Single r, ra
bild= LoadBmp "bmp/stern.bmp",1
gras= LoadBmp "bmp/grass.bmp",1
frog= LoadBmp "bmp/frog.bmp",2
While WinExit=0
SetBmp bild,0,0,640,480,0
SetBmp gras,0,480-90,800,64,0
Setbmp frog,cos(r*pi/180)*180+x,sin(r*pi/180)*10+y,128,128,zK
Setbmp frog,-cos(r*pi/180)*180+x,sin(r*pi/180)*50+100,128,128,zK
ra = rad r
SetText "Radian = " + ra,0, 0,Rgb 255,255,255
SetText "Radius = " + r ,0,26,Rgb 255,255,255
'zK +=1: iF zK = 2 Then zK=0
r +=4: iF r>=360 Then r= -360
DoEvents
SwapBuffers
WaitFrames 18
Wend
WinEnd
indexbase 0
Include "window.h"
SetWindow "SineAnimation",640,480,w_1
SetFont 12,24,100,"courier"
sys bild, gras, frog, zk, x=256, y=310
Single r, ra,ca,sa
bild= LoadBmp "bmp/stern.bmp",1
gras= LoadBmp "bmp/grass.bmp",1
frog= LoadBmp "bmp/frog.bmp",2
While WinExit=0
SetBmp bild,0,0,640,480,0
SetBmp gras,0,480-90,800,64,0
ra = rad (r)
ca = cos (ra)
sa = sin (ra*8)
Setbmp frog,ca*180+x,sa*20+y,128,128,zK
Setbmp frog,-ca*180+x,sa*50+100,128,128,zK
SetText "Radian = " + ra,0, 0,Rgb 255,255,255
SetText "Radius = " + r ,0,26,Rgb 255,255,255
'zK +=1: iF zK = 2 Then zK=0
r +=4: iF r>=360 Then r= -360
DoEvents
SwapBuffers
WaitFrames 18
Wend
WinEnd