続き
EXTERNAL FUNCTION FUNC(MODE,X,Y) SELECT CASE MODE CASE 0 LET FUNC=COS(5*SQR(X*X+Y*Y)) CASE 1 LET FUNC=X*Y*(X^2-Y^2) CASE 2 LET FUNC=(X^2-Y^2)/2 CASE 3 LET FUNC=EXP(-X^2-Y^2)*(X^2+Y^2) CASE 4 IF (X^2-1)*(X^2-9)*(Y^2-1)*(Y^2-9)>0 THEN LET FUNC=2 ELSE LET FUNC=0 END IF CASE 5 LET Z=4-X^2-Y^2 IF Z>0 THEN LET FUNC=SQR(Z) ELSE LET FUNC=0 CASE 6 LET Z=2*(X^2+Y^2-3) IF Z>0 THEN LET FUNC=SQR(Z) ELSE LET FUNC=0 CASE 7 LET FUNC=EXP(-Y)*SIN(3*X) CASE 8 LET FUNC=MIN(3,X^2+Y^2-4) CASE 9 LET Z=1-X^2 IF Z>0 THEN LET Z=SQR(Z) ELSE LET Z=0 LET FUNC=MIN(Z,Y^2) CASE 10 IF X=0 AND Y=0 THEN LET FUNC=0 ELSE LET FUNC=X*Y/(X^2+Y^2) END IF CASE 11 LET FUNC=LOG(X^2+Y^2+.1) CASE 12 LET FUNC=MAX(X^2+Y^2-(X^2+Y^2+Y)^2,-2) CASE 13 LET FUNC=MIN(MAX(X^3-3*X*Y+Y^3,-4),0) CASE 14 LET FUNC=SIN(X)*SIN(Y)*SIN(X+Y) CASE 15 LET FUNC=COS(PI*X)*COS(PI*Y) CASE 16 LET FUNC=COS(3*X*Y) CASE 17 LET FUNC=SQR(COS(X)^2+SINH(Y)^2) CASE 18 LET Z=1-X^2 IF Z>0 THEN LET Z=SQR(Z) ELSE LET Z=0 LET FUNC=MIN(Z,.5*(1.5*X-Y)^2) CASE 19 LET Z=1-(SQR(X^2+Y^2)-1.5)^2 IF Z>0 THEN LET FUNC=SQR(Z) ELSE LET FUNC=0 CASE 20 LET FUNC=6-4*SQR(X^2+Y^2) CASE 21 LET Z=1-X^2 LET ZZ=1-Y^2 IF Z>0 THEN LET Z=SQR(Z) ELSE LET Z=0 IF ZZ>0 THEN LET ZZ=SQR(ZZ) ELSE LET ZZ=0 LET FUNC=MAX(Z,ZZ) CASE 22 LET Z=1-(SQR(X^2+Y^2)-1.5)^2 LET ZZ=.7-X^2 IF Z>0 THEN LET Z=SQR(Z) ELSE LET Z=0 IF ZZ>0 THEN LET ZZ=SQR(ZZ) ELSE LET ZZ=0 LET FUNC=MAX(Z,ZZ) CASE 23 LET FUNC=EXP(-X^2+Y^2) CASE 24 LET Z=1-X^2 IF Z>0 THEN LET Z=SQR(Z) ELSE LET Z=0 LET FUNC=MIN(Z,.25*(Y^2-2.5)^2) CASE 25 IF X=0 OR Y=0 THEN LET FUNC=1 ELSE LET FUNC=SIN(X*Y)/X/Y END IF CASE 26 LET Z=1-.25*(Y-SIN(X))^2 IF Z>0 THEN LET FUNC=SQR(Z) ELSE LET FUNC=0 CASE 27 LET FUNC=2*ABS(COS(X*PI)*COS(Y*PI))^3 CASE 28 LET FUNC=(X^3+Y^3)/10 CASE 29 LET FUNC=SQR(X^2+(Y+1)^2)*SQR(X^2+(Y-1)^2) CASE 30 LET FUNC=X^3-X*Y^2 CASE 31 LET FUNC=SIN(X*Y) CASE 32 LET FUNC=3*EXP(-.5*((X-3*INT(X/3)-1.5)^2+(Y-3*INT(Y/3)-1.5)^2))*COS(PI*((X-3*INT(X/3)-1.5)^2+(Y-3*INT(Y/3)-1.5)^2))
|