|
> No.4475[元記事へ]
yoshipyutaさんへのお返事です。
> しばっちさん、下図③のg(z)=z^3+(1.503-0.8046i)*z^2を描くことが出来ますか?h(z)=z^3+2.12i)*z^2なども。
もう少し詳しい情報を頂けると助かるのですが...
OPTION ARITHMETIC COMPLEX
LET XSIZE=800
LET YSIZE=800
LET KS=50
LET LEFT=-2
LET RIGHT=1
LET BOTTOM=-1.3
LET TOP=1.7
CALL GINIT(XSIZE,YSIZE)
LET DX=(RIGHT-LEFT)/XSIZE
LET DY=(TOP-BOTTOM)/YSIZE
SET WINDOW LEFT,RIGHT,BOTTOM,TOP
FOR X=LEFT TO RIGHT STEP DX
FOR Y=BOTTOM TO TOP STEP DY
LET Z=COMPLEX(X,Y)
FOR K=1 TO KS
LET Z=Z^3+COMPLEX(1.503,-0.8046)*Z^2 !'LEFT=-2,RIGHT=1,BOTTOM=-1.3,TOP=1.7
!' LET Z=Z^3+COMPLEX(0,2.12)*Z^2 !'LEFT=-1.7,RIGHT=1.7,BOTTOM=-2.5,TOP=.9
IF ABS(Z)>2 THEN
CALL PSET(X,Y,MOD(K,7)+1)
EXIT FOR
END IF
NEXT K
!' IF ABS(Z)<2 THEN CALL PSET(X,Y,255)
NEXT Y
NEXT X
END
EXTERNAL SUB PSET(X,Y,C)
OPTION ARITHMETIC COMPLEX
SET POINT COLOR C
PLOT POINTS:X,Y
END SUB
EXTERNAL SUB GINIT(XSIZE,YSIZE)
OPTION ARITHMETIC COMPLEX
SET BITMAP SIZE XSIZE,YSIZE
!'SET WINDOW 0,XSIZE-1,YSIZE-1,0
SET POINT STYLE 1
SET COLOR MODE "REGULAR"
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
SET COLOR MIX(255) 128/255,128/255,128/255
CLEAR
END SUB
|
|