
(/VERSIONCHECK 2) 

(DEFUN |DRAWCX;makeArrow| (|p1| |p2| |len| |arg| $)
  (PROG (|c1| |s1| |c2| |s2| |p3| |p4|)
    (RETURN
      (SEQ (LETT |c1| (COS (+ |arg| (QREFELT $ 13)))
                 . #0=(|DRAWCX;makeArrow|))
           (LETT |s1| (SIN (+ |arg| (QREFELT $ 13))) . #0#)
           (LETT |c2| (COS (- |arg| (QREFELT $ 13))) . #0#)
           (LETT |s2| (SIN (- |arg| (QREFELT $ 13))) . #0#)
           (LETT |p3|
                 (SPADCALL
                     (LIST (+ (SPADCALL |p2| 1 (QREFELT $ 19))
                              (* (* |c1| (QREFELT $ 12)) |len|))
                           (+ (SPADCALL |p2| 2 (QREFELT $ 19))
                              (* (* |s1| (QREFELT $ 12)) |len|))
                           (SPADCALL |p2| 3 (QREFELT $ 19))
                           (SPADCALL |p2| 4 (QREFELT $ 19)))
                     (QREFELT $ 21)) . #0#)
           (LETT |p4|
                 (SPADCALL
                     (LIST (+ (SPADCALL |p2| 1 (QREFELT $ 19))
                              (* (* |c2| (QREFELT $ 12)) |len|))
                           (+ (SPADCALL |p2| 2 (QREFELT $ 19))
                              (* (* |s2| (QREFELT $ 12)) |len|))
                           (SPADCALL |p2| 3 (QREFELT $ 19))
                           (SPADCALL |p2| 4 (QREFELT $ 19)))
                     (QREFELT $ 21)) . #0#)
           (EXIT (LIST (LIST |p1| |p2| |p3|) (LIST |p2| |p4|))))))) 

(DEFUN |DRAWCX;clipFun| (|x| $)
  (MIN (MAX |x| (- (QREFELT $ 16))) (QREFELT $ 16))) 

(DEFUN |DRAWCX;drawComplex;M2SBTdv;3|
       (|f| |realRange| |imagRange| |arrows?| $)
  (PROG (|delReal| |delImag| #0=#:G1820 #1=#:G1822 |funTable|
            #2=#:G1843 #3=#:G1844 |z| #4=#:G1845 #5=#:G1846 |p| |lp|
            |llp| |space| |i| #6=#:G1847 |j| #7=#:G1848 |arg| |p1|
            |len| |p2| |arrow| |a| #8=#:G1849 |imag| |real|)
    (RETURN
      (SEQ (LETT |delReal|
                 (/ (- (SPADCALL |realRange| (QREFELT $ 23))
                       (SPADCALL |realRange| (QREFELT $ 24)))
                    (FLOAT (QREFELT $ 14) MOST-POSITIVE-DOUBLE-FLOAT))
                 . #9=(|DRAWCX;drawComplex;M2SBTdv;3|))
           (LETT |delImag|
                 (/ (- (SPADCALL |imagRange| (QREFELT $ 23))
                       (SPADCALL |imagRange| (QREFELT $ 24)))
                    (FLOAT (QREFELT $ 15) MOST-POSITIVE-DOUBLE-FLOAT)) . #9#)
           (LETT |funTable|
                 (SPADCALL
                     (+ (PROG1 (LETT #0# (QREFELT $ 14) . #9#)
                          (|check-subtype| (>= #0# 0)
                              '(|NonNegativeInteger|) #0#))
                        1)
                     (+ (PROG1 (LETT #1# (QREFELT $ 15) . #9#)
                          (|check-subtype| (>= #1# 0)
                              '(|NonNegativeInteger|) #1#))
                        1)
                     (CONS 0.0 0.0) (QREFELT $ 29)) . #9#)
           (LETT |real| (SPADCALL |realRange| (QREFELT $ 24)) . #9#)
           (SEQ (LETT |i| 1 . #9#)
                (LETT #2# (+ (QREFELT $ 14) 1) . #9#) G190
                (COND ((QSGREATERP |i| #2#) #10=(GO G191)))
                (SEQ (LETT |imag|
                           (SPADCALL |imagRange| (QREFELT $ 24)) . #9#)
                     (SEQ (LETT |j| 1 . #9#)
                          (LETT #3# (+ (QREFELT $ 15) 1) . #9#) G190
                          (COND ((QSGREATERP |j| #3#) #10#))
                          (SEQ (LETT |z|
                                     (SPADCALL
                                      (SPADCALL |real| |imag|
                                       (QREFELT $ 31))
                                      |f|) . #9#)
                               (SPADCALL |funTable| |i| |j|
                                   (CONS
                                    (|DRAWCX;clipFun|
                                     (SPADCALL
                                      (SPADCALL |z| (QREFELT $ 32))
                                      (QREFELT $ 33))
                                     $)
                                    (SPADCALL |z| (QREFELT $ 34)))
                                   (QREFELT $ 35))
                               (EXIT (LETT |imag|
                                      (+ |imag| |delImag|) . #9#)))
                          (LETT |j| (QSADD1 |j|) . #9#) #11=(GO G190)
                          G191 (EXIT NIL))
                     (EXIT (LETT |real| (+ |real| |delReal|) . #9#)))
                (LETT |i| (QSADD1 |i|) . #9#) #11# G191 (EXIT NIL))
           (LETT |llp| NIL . #9#)
           (LETT |real| (SPADCALL |realRange| (QREFELT $ 24)) . #9#)
           (SEQ (LETT |i| 1 . #9#)
                (LETT #4# (+ (QREFELT $ 14) 1) . #9#) G190
                (COND ((QSGREATERP |i| #4#) #10#))
                (SEQ (LETT |imag|
                           (SPADCALL |imagRange| (QREFELT $ 24)) . #9#)
                     (LETT |lp| NIL . #9#)
                     (SEQ (LETT |j| 1 . #9#)
                          (LETT #5# (+ (QREFELT $ 15) 1) . #9#) G190
                          (COND ((QSGREATERP |j| #5#) #10#))
                          (SEQ (LETT |p|
                                     (SPADCALL
                                      (LIST |real| |imag|
                                       (QCAR
                                        (SPADCALL |funTable| |i| |j|
                                         (QREFELT $ 36)))
                                       (QCDR
                                        (SPADCALL |funTable| |i| |j|
                                         (QREFELT $ 36))))
                                      (QREFELT $ 21)) . #9#)
                               (LETT |lp| (CONS |p| |lp|) . #9#)
                               (EXIT (LETT |imag|
                                      (+ |imag| |delImag|) . #9#)))
                          (LETT |j| (QSADD1 |j|) . #9#) #11# G191
                          (EXIT NIL))
                     (LETT |real| (+ |real| |delReal|) . #9#)
                     (EXIT (LETT |llp| (CONS |lp| |llp|) . #9#)))
                (LETT |i| (QSADD1 |i|) . #9#) #11# G191 (EXIT NIL))
           (LETT |space| (SPADCALL |llp| (QREFELT $ 39)) . #9#)
           (COND
             (|arrows?|
                 (SEQ (LETT |real|
                            (SPADCALL |realRange| (QREFELT $ 24)) . #9#)
                      (EXIT (SEQ (LETT |i| 1 . #9#)
                                 (LETT #6# (+ (QREFELT $ 14) 1) . #9#)
                                 G190
                                 (COND ((QSGREATERP |i| #6#) #10#))
                                 (SEQ (LETT |imag|
                                       (SPADCALL |imagRange|
                                        (QREFELT $ 24)) . #9#)
                                      (SEQ (LETT |j| 1 . #9#)
                                       (LETT #7#
                                        (+ (QREFELT $ 15) 1) . #9#)
                                       G190
                                       (COND
                                         ((QSGREATERP |j| #7#) #10#))
                                       (SEQ
                                        (LETT |arg|
                                         (QCDR
                                          (SPADCALL |funTable| |i| |j|
                                           (QREFELT $ 36))) . #9#)
                                        (LETT |p1|
                                         (SPADCALL
                                          (LIST |real| |imag|
                                           (QCAR
                                            (SPADCALL |funTable| |i|
                                             |j| (QREFELT $ 36)))
                                           |arg|)
                                          (QREFELT $ 21)) . #9#)
                                        (LETT |len|
                                         (* |delReal|
                                          (SPADCALL
                                           (SPADCALL 2 0 10
                                            (QREFELT $ 9))
                                           (QREFELT $ 11))) . #9#)
                                        (LETT |p2|
                                         (SPADCALL
                                          (LIST
                                           (+
                                            (SPADCALL |p1| 1
                                             (QREFELT $ 19))
                                            (* |len| (COS |arg|)))
                                           (+
                                            (SPADCALL |p1| 2
                                             (QREFELT $ 19))
                                            (* |len| (SIN |arg|)))
                                           (SPADCALL |p1| 3
                                            (QREFELT $ 19))
                                           (SPADCALL |p1| 4
                                            (QREFELT $ 19)))
                                          (QREFELT $ 21)) . #9#)
                                        (LETT |arrow|
                                         (|DRAWCX;makeArrow| |p1| |p2|
                                          |len| |arg| $) . #9#)
                                        (SEQ (LETT |a| NIL . #9#)
                                         (LETT #8# |arrow| . #9#) G190
                                         (COND
                                           ((OR (ATOM #8#)
                                             (PROGN
                                               (LETT |a|
                                                (CAR #8#) . #9#)
                                               NIL))
                                            #10#))
                                         (SEQ
                                          (EXIT
                                           (SPADCALL |space| |a|
                                            (QREFELT $ 41))))
                                         (LETT #8# (CDR #8#) . #9#)
                                         #11# G191 (EXIT NIL))
                                        (EXIT
                                         (LETT |imag|
                                          (+ |imag| |delImag|) . #9#)))
                                       (LETT |j| (QSADD1 |j|) . #9#)
                                       #11# G191 (EXIT NIL))
                                      (EXIT
                                       (LETT |real|
                                        (+ |real| |delReal|) . #9#)))
                                 (LETT |i| (QSADD1 |i|) . #9#) #11#
                                 G191 (EXIT NIL))))))
           (EXIT (SPADCALL |space| "Complex Function" (QREFELT $ 44))))))) 

(DEFUN |DRAWCX;drawComplexVectorField;M2STdv;4|
       (|f| |realRange| |imagRange| $)
  (PROG (|delReal| |delImag| |space| |i| #0=#:G1857 |j| #1=#:G1858 |z|
            |arg| |len| |p1| |scaleLen| |p2| |arrow| |a| #2=#:G1859
            |imag| |real|)
    (RETURN
      (SEQ (LETT |delReal|
                 (/ (- (SPADCALL |realRange| (QREFELT $ 23))
                       (SPADCALL |realRange| (QREFELT $ 24)))
                    (FLOAT (QREFELT $ 14) MOST-POSITIVE-DOUBLE-FLOAT))
                 . #3=(|DRAWCX;drawComplexVectorField;M2STdv;4|))
           (LETT |delImag|
                 (/ (- (SPADCALL |imagRange| (QREFELT $ 23))
                       (SPADCALL |imagRange| (QREFELT $ 24)))
                    (FLOAT (QREFELT $ 15) MOST-POSITIVE-DOUBLE-FLOAT)) . #3#)
           (LETT |space| (SPADCALL (QREFELT $ 48)) . #3#)
           (LETT |real| (SPADCALL |realRange| (QREFELT $ 24)) . #3#)
           (SEQ (LETT |i| 1 . #3#)
                (LETT #0# (+ (QREFELT $ 14) 1) . #3#) G190
                (COND ((QSGREATERP |i| #0#) #4=(GO G191)))
                (SEQ (LETT |imag|
                           (SPADCALL |imagRange| (QREFELT $ 24)) . #3#)
                     (SEQ (LETT |j| 1 . #3#)
                          (LETT #1# (+ (QREFELT $ 15) 1) . #3#) G190
                          (COND ((QSGREATERP |j| #1#) #4#))
                          (SEQ (LETT |z|
                                     (SPADCALL
                                      (SPADCALL |real| |imag|
                                       (QREFELT $ 31))
                                      |f|) . #3#)
                               (LETT |arg|
                                     (SPADCALL |z| (QREFELT $ 34)) . #3#)
                               (LETT |len|
                                     (|DRAWCX;clipFun|
                                      (SPADCALL
                                       (SPADCALL |z| (QREFELT $ 32))
                                       (QREFELT $ 33))
                                      $) . #3#)
                               (LETT |p1|
                                     (SPADCALL
                                      (LIST |real| |imag| 0.0 |arg|)
                                      (QREFELT $ 21)) . #3#)
                               (LETT |scaleLen|
                                     (* |delReal| |len|) . #3#)
                               (LETT |p2|
                                     (SPADCALL
                                      (LIST
                                       (+
                                        (SPADCALL |p1| 1
                                         (QREFELT $ 19))
                                        (* |scaleLen| (COS |arg|)))
                                       (+
                                        (SPADCALL |p1| 2
                                         (QREFELT $ 19))
                                        (* |scaleLen| (SIN |arg|)))
                                       0.0 |arg|)
                                      (QREFELT $ 21)) . #3#)
                               (LETT |arrow|
                                     (|DRAWCX;makeArrow| |p1| |p2|
                                      |scaleLen| |arg| $) . #3#)
                               (SEQ (LETT |a| NIL . #3#)
                                    (LETT #2# |arrow| . #3#) G190
                                    (COND
                                      ((OR (ATOM #2#)
                                        (PROGN
                                          (LETT |a| (CAR #2#) . #3#)
                                          NIL))
                                       #4#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |space| |a|
                                       (QREFELT $ 41))))
                                    (LETT #2# (CDR #2#) . #3#)
                                    #5=(GO G190) G191 (EXIT NIL))
                               (EXIT (LETT |imag|
                                      (+ |imag| |delImag|) . #3#)))
                          (LETT |j| (QSADD1 |j|) . #3#) #5# G191
                          (EXIT NIL))
                     (EXIT (LETT |real| (+ |real| |delReal|) . #3#)))
                (LETT |i| (QSADD1 |i|) . #3#) #5# G191 (EXIT NIL))
           (EXIT (SPADCALL |space| "Complex Vector Field"
                     (QREFELT $ 44))))))) 

(DEFUN |DRAWCX;setRealSteps;2I;5| (|n| $) (SETELT $ 14 |n|)) 

(DEFUN |DRAWCX;setImagSteps;2I;6| (|n| $) (SETELT $ 15 |n|)) 

(DEFUN |DRAWCX;setClipValue;2Df;7| (|clip| $) (SETELT $ 16 |clip|)) 

(DEFUN |DrawComplex| ()
  (PROG ()
    (RETURN
      (PROG (#0=#:G1864)
        (RETURN
          (COND
            ((LETT #0# (HGET |$ConstructorCache| '|DrawComplex|)
                   . #1=(|DrawComplex|))
             (|CDRwithIncrement| (CDAR #0#)))
            ('T
             (UNWIND-PROTECT
               (PROG1 (CDDAR (HPUT |$ConstructorCache| '|DrawComplex|
                                   (LIST
                                    (CONS NIL
                                     (CONS 1 (|DrawComplex;|))))))
                 (LETT #0# T . #1#))
               (COND
                 ((NOT #0#) (HREM |$ConstructorCache| '|DrawComplex|))))))))))) 

(DEFUN |DrawComplex;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|DrawComplex|) . #0=(|DrawComplex|))
        (LETT $ (GETREFV 53) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|DrawComplex| NIL (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 12
            (SPADCALL (SPADCALL 125 -3 10 (QREFELT $ 9))
                (QREFELT $ 11)))
        (QSETREFV $ 13
            (- (FLOAT PI MOST-POSITIVE-DOUBLE-FLOAT)
               (/ (FLOAT PI MOST-POSITIVE-DOUBLE-FLOAT)
                  (FLOAT 20 MOST-POSITIVE-DOUBLE-FLOAT))))
        (QSETREFV $ 14 11)
        (QSETREFV $ 15 11)
        (QSETREFV $ 16 (FLOAT 10 MOST-POSITIVE-DOUBLE-FLOAT))
        $)))) 

(MAKEPROP '|DrawComplex| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|Integer|) (|PositiveInteger|)
             (|Float|) (0 . |float|) (|DoubleFloat|) (7 . |coerce|)
             '|arrowScale| '|arrowAngle| '|realSteps| '|imagSteps|
             '|clipValue| (12 . |One|) (|Point| 10) (16 . |elt|)
             (|List| 10) (22 . |point|) (|Segment| 10) (27 . |hi|)
             (32 . |lo|) (37 . |Zero|) (|NonNegativeInteger|)
             (|Record| (|:| |rr| 10) (|:| |th| 10))
             (|TwoDimensionalArray| 27) (41 . |new|) (|Complex| 10)
             (48 . |complex|) (54 . |norm|) (59 . |sqrt|)
             (64 . |argument|) (69 . |setelt|) (77 . |elt|) (|List| 40)
             (|ThreeSpace| 10) (84 . |mesh|) (|List| 18) (89 . |curve|)
             (|String|) (|ThreeDimensionalViewport|)
             (95 . |makeViewport3D|) (|Mapping| 30 30) (|Boolean|)
             |DRAWCX;drawComplex;M2SBTdv;3| (101 . |create3Space|)
             |DRAWCX;drawComplexVectorField;M2STdv;4|
             |DRAWCX;setRealSteps;2I;5| |DRAWCX;setImagSteps;2I;6|
             |DRAWCX;setClipValue;2Df;7|)
          '#(|setRealSteps| 105 |setImagSteps| 110 |setClipValue| 115
             |drawComplexVectorField| 120 |drawComplex| 127)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 52
                                '(3 8 0 6 6 7 9 1 8 10 0 11 0 8 0 17 2
                                  18 10 0 6 19 1 18 0 20 21 1 22 10 0
                                  23 1 22 10 0 24 0 8 0 25 3 28 0 26 26
                                  27 29 2 30 0 10 10 31 1 30 10 0 32 1
                                  10 0 0 33 1 30 10 0 34 4 28 27 0 6 6
                                  27 35 3 28 27 0 6 6 36 1 38 0 37 39 2
                                  38 0 0 40 41 2 43 0 38 42 44 0 38 0
                                  48 1 0 6 6 50 1 0 6 6 51 1 0 10 10 52
                                  3 0 43 45 22 22 49 4 0 43 45 22 22 46
                                  47)))))
          '|lookupComplete|)) 

(MAKEPROP '|DrawComplex| 'NILADIC T) 
