! The locus of w=z+1/z 
! with z moving on the circle of radius 1 and center the origin.
OPTION ARITHMETIC COMPLEX
LET r=2
LET a=4
SET WINDOW -a,a,-a,a
DRAW grid
SET POINT STYLE 1
FOR t=0 TO 2*PI STEP PI/360
   LET z=r*COMPLEX(COS(t),SIN(t))
   LET w=z+1/z
   SET POINT COLOR 3
   PLOT POINTS: re(z),im(z)
   SET POINT COLOR 2
   PLOT POINTS: re(w),im(w)
NEXT t  
END
