|
!'Butterfly Function
LET XSIZE=600
LET YSIZE=600
CALL GINIT(XSIZE,YSIZE)
SET WINDOW -20,20,20,-20
SET POINT STYLE 1
FOR Y=-20 TO 20 STEP 40/YSIZE
FOR X=-20 TO 20 STEP 40/XSIZE
WHEN EXCEPTION IN
LET C=MOD(F(X,Y),8)
USE
END WHEN
SET POINT COLOR C
PLOT POINTS:X,Y
NEXT X
NEXT Y
END
EXTERNAL SUB GINIT(XSIZE,YSIZE)
SET BITMAP SIZE XSIZE,YSIZE
!'SET WINDOW 0 , XSIZE-1 , YSIZE-1, 0
SET POINT STYLE 1
SET COLOR MIX(0) 0,0,0
SET COLOR MIX(1) 0,0,1
SET COLOR MIX(2) 1,0,0
SET COLOR MIX(3) 1,0,1
SET COLOR MIX(4) 0,1,0
SET COLOR MIX(5) 0,1,1
SET COLOR MIX(6) 1,1,0
SET COLOR MIX(7) 1,1,1
CLEAR
END SUB
EXTERNAL FUNCTION F(X,Y)
LET A=1
LET F=(X*X-Y*Y)*SIN((X+Y)/A)/(X*X+Y*Y)
END FUNCTION
|
|