Горящая свечка
Автор: неизвестен
Code
dim as integer xres,yres
screen 19,,2
screeninfo xres,yres
'screenres xres,yres,,2
ScreenSet 1
dim as double x,y,s,c,sqrtx,sqrty
dim as double deg,rad=atn(1)/45
dim as double xctr=xres/2
dim as double yctr=yres/2
dim as double radius=200
dim as integer toggle=0
do
for deg=180 to 360 step .1
c=cos(deg*rad)
s=sin(deg*rad)
sqrtx = sqr(1-(c*s)*c)*c*c*sqr(1-s)*s*c
sqrty = sqr(1-(s*c)*s)*s*s
x=radius*c*sqrtx*c*s
if toggle=0 then x=x*s*2
y=radius*s*sqrty
pset(xctr+x,yctr+y),4
pset(xctr+x,yctr+y-5),4
next
if toggle=0 then toggle=1 else toggle = 0
Paint(xctr+x,yctr+y-25),14,4
Paint(xctr+x,yctr+y-2),4,4
line(xctr-60,yctr+y+15)-(xctr+60,yctr+y+200),6,bf
line(xctr-3 ,yctr+y )-(xctr+3 ,yctr+y+15 ),7,bf
Pcopy
sleep 150
cls
loop until inkey<>""
sleep