10 CLEAR ALL
20 SCREEN LOAD "IMG_7441.JPG"
30 SLEEP
40 SCREEN BITMAP 640,480
50 BACKGROUND CLUT("vga",4)
60 wi=640
70 he=480
80 h=wi/2
90 v=he/4
100 xmax=4
110 ymax=4
120 r=xmax*xmax+ymax*ymax
130 d=1
140 DO
150     CLEAR BITMAP
160     FOR i=-h TO h
170         m=0
180         n=he
190         xe=wi*(1+i/h)/2
200         FOR j=-v TO v
210             x=-xmax*i/h-xmax*j/v
220             y=ymax*i/h-ymax*j/v
230             IF x*x+y*y<=r THEN
240                 z=he/2-j-f(d,x,y)
250                 IF z>=m OR z<=n THEN
260                     IF z<n THEN
270                         c=14
280                         n=z
290                     ELSE
300                         c=7
310                     END IF
320                     IF z>m THEN
330                         m=z
340                     END IF
350                     IF z>=0 AND z<=he THEN
360                         INK CLUT("vga",c)
370                         PLOT ROUND(xe),ROUND(z)
380                     END IF
390                 END IF
400             END IF
410         NEXT j
420     NEXT i
430     GETKEY a$
440     d=d+1
450 LOOP WHILE d<=7
460 FUNCTION f(d,x,y)
470     SELECT CASE d
480         CASE 1:f=5*x*SIN(5*y)
490         CASE 2:f=10*SIN(4*x)*y
500         CASE 3:f=190*COS(x*x+y*y)*EXP(-(x*x+y*y)/6)
510         CASE 4:f=-y*y/(x*x+0.001)
520         CASE 5:f=10*SIN(x*(y+1))*y
530         CASE 6:f=100-400/EXP(x*x+y*y)
540         CASE 7:f=80*COS(2*y)/(x*x+y*y+0.001)-100
550     END SELECT
560 END FUNCTION
570 END
