Then a complex number,
z=x+iy
can be written are gotten in z=complex(x,y).
And, by defining a function as
w=z2,
a complex number after the change can be found.
Then describe the real and imaginary part,
Re(w), Im(w)
After taking out the real part and the imaginary part, let's picture the figure after the change.
Consider how the tracing of a squre figure is modified by this program.
OPTION ARITHMETIC COMPLEX ! It sets to the complex number mode SET WINDOW -2,2,-1,3 DRAW grid SET LINE STYLE 1 SET LINE COLOR 1 PLOT LINES: 0,0 ; 1,0 ; 1,1 ; 0,1; 0,0 !The original diagram SET POINT STYLE 3 Do MOUSE POLL x,y,left,right if right=1 then exit do !It ends by the mouse right button click. if left=1 then SET POINT COLOR 1 PLOT POINTS: x , y LET z=COMPLEX(x,y) !The function for the complex number LET w=z^2 !The definition with changing function SET POINT COLOR 4 PLOT POINTS: Re(w),Im(w) !The show of the point after the change end if Loop END