
(/VERSIONCHECK 2) 

(DEFUN |ACPLOT;NFtoSF| (|x| $) (+ 0.0 (SPADCALL |x| (QREFELT $ 22)))) 

(DEFUN |ACPLOT;makePt| (|xx| |yy| $)
  (PROG (|l|)
    (RETURN
      (SPADCALL (LETT |l| (LIST |xx| |yy|) |ACPLOT;makePt|)
          (QREFELT $ 25))))) 

(DEFUN |ACPLOT;swapCoords| (|pt| $)
  (|ACPLOT;makePt| (SPADCALL |pt| (QREFELT $ 27))
      (SPADCALL |pt| (QREFELT $ 28)) $)) 

(DEFUN |ACPLOT;samePlottedPt?| (|p0| |p1| $)
  (PROG (|x0| |y0| |x1| |y1|)
    (RETURN
      (SEQ (LETT |x0| (SPADCALL |p0| (QREFELT $ 28))
                 . #0=(|ACPLOT;samePlottedPt?|))
           (LETT |y0| (SPADCALL |p0| (QREFELT $ 27)) . #0#)
           (LETT |x1| (SPADCALL |p1| (QREFELT $ 28)) . #0#)
           (LETT |y1| (SPADCALL |p1| (QREFELT $ 27)) . #0#)
           (EXIT (COND
                   ((< (FLOAT-SIGN 1.0 (- |x1| |x0|)) (QREFELT $ 15))
                    (< (FLOAT-SIGN 1.0 (- |y1| |y0|)) (QREFELT $ 15)))
                   ('T 'NIL))))))) 

(DEFUN |ACPLOT;findPtOnList| (|pt| |pointList| $)
  (PROG (|point| #0=#:G1879 #1=#:G1878 #2=#:G1876)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (EXIT (SEQ (LETT |point| NIL
                                       . #3=(|ACPLOT;findPtOnList|))
                                      (LETT #0# |pointList| . #3#) G190
                                      (COND
                                        ((OR (ATOM #0#)
                                          (PROGN
                                            (LETT |point|
                                             (CAR #0#) . #3#)
                                            NIL))
                                         (GO G191)))
                                      (SEQ
                                       (EXIT
                                        (COND
                                          ((|ACPLOT;samePlottedPt?|
                                            |pt| |point| $)
                                           (PROGN
                                             (LETT #2#
                                              (PROGN
                                                (LETT #1#
                                                 (CONS 0 |point|) . #3#)
                                                (GO #1#)) . #3#)
                                             (GO #2#))))))
                                      (LETT #0# (CDR #0#) . #3#)
                                      (GO G190) G191 (EXIT NIL)))
                           #2# (EXIT #2#))
                      (EXIT (CONS 1 "failed"))))
           #1# (EXIT #1#))))) 

(PUT '|ACPLOT;makeCorners| '|SPADreplace| 'VECTOR) 

(DEFUN |ACPLOT;makeCorners| (|xMinSF| |xMaxSF| |yMinSF| |yMaxSF| $)
  (VECTOR |xMinSF| |xMaxSF| |yMinSF| |yMaxSF|)) 

(PUT '|ACPLOT;getXMin| '|SPADreplace|
     '(XLAM (|corners|) (QVELT |corners| 0))) 

(DEFUN |ACPLOT;getXMin| (|corners| $) (QVELT |corners| 0)) 

(PUT '|ACPLOT;getXMax| '|SPADreplace|
     '(XLAM (|corners|) (QVELT |corners| 1))) 

(DEFUN |ACPLOT;getXMax| (|corners| $) (QVELT |corners| 1)) 

(PUT '|ACPLOT;getYMin| '|SPADreplace|
     '(XLAM (|corners|) (QVELT |corners| 2))) 

(DEFUN |ACPLOT;getYMin| (|corners| $) (QVELT |corners| 2)) 

(PUT '|ACPLOT;getYMax| '|SPADreplace|
     '(XLAM (|corners|) (QVELT |corners| 3))) 

(DEFUN |ACPLOT;getYMax| (|corners| $) (QVELT |corners| 3)) 

(DEFUN |ACPLOT;SFPolyToUPoly| (|p| $)
  (COND
    ((SPADCALL |p| (QREFELT $ 31)) (|spadConstant| $ 33))
    ('T
     (SPADCALL
         (SPADCALL (SPADCALL |p| (QREFELT $ 34))
             (SPADCALL |p| (QREFELT $ 36)) (QREFELT $ 37))
         (|ACPLOT;SFPolyToUPoly| (SPADCALL |p| (QREFELT $ 38)) $)
         (QREFELT $ 39))))) 

(DEFUN |ACPLOT;RNPolyToUPoly| (|p| $)
  (COND
    ((SPADCALL |p| (QREFELT $ 41)) (|spadConstant| $ 43))
    ('T
     (SPADCALL
         (SPADCALL (SPADCALL |p| (QREFELT $ 45))
             (SPADCALL |p| (QREFELT $ 46)) (QREFELT $ 47))
         (|ACPLOT;RNPolyToUPoly| (SPADCALL |p| (QREFELT $ 48)) $)
         (QREFELT $ 49))))) 

(DEFUN |ACPLOT;coerceCoefsToSFs| (|p| $)
  (SPADCALL (ELT $ 50) |p| (QREFELT $ 54))) 

(DEFUN |ACPLOT;coerceCoefsToRNs| (|p| $)
  (SPADCALL (ELT $ 55) |p| (QREFELT $ 58))) 

(DEFUN |ACPLOT;RNtoSF| (|r| $) (SPADCALL |r| (QREFELT $ 59))) 

(DEFUN |ACPLOT;RNtoNF| (|r| $) (SPADCALL |r| (QREFELT $ 60))) 

(DEFUN |ACPLOT;SFtoNF| (|x| $) (SPADCALL |x| (QREFELT $ 61))) 

(DEFUN |ACPLOT;listPtsOnHorizBdry| (|pRN| |y| |y0| |xMinNF| |xMaxNF| $)
  (PROG (|ySF| |f| |roots| |root| #0=#:G1904 |pointList|)
    (RETURN
      (SEQ (LETT |pointList| NIL . #1=(|ACPLOT;listPtsOnHorizBdry|))
           (LETT |ySF| (|ACPLOT;RNtoSF| |y0| $) . #1#)
           (LETT |f| (SPADCALL |pRN| |y| |y0| (QREFELT $ 63)) . #1#)
           (LETT |roots|
                 (SPADCALL |f| (QREFELT $ 12) (QREFELT $ 66)) . #1#)
           (SEQ (LETT |root| NIL . #1#) (LETT #0# |roots| . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |root| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((SPADCALL |xMinNF| |root| (QREFELT $ 67))
                              (COND
                                ((SPADCALL |root| |xMaxNF|
                                     (QREFELT $ 67))
                                 (LETT |pointList|
                                       (CONS
                                        (|ACPLOT;makePt|
                                         (|ACPLOT;NFtoSF| |root| $)
                                         |ySF| $)
                                        |pointList|) . #1#)))))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |pointList|))))) 

(DEFUN |ACPLOT;listPtsOnVertBdry| (|pRN| |x| |x0| |yMinNF| |yMaxNF| $)
  (PROG (|xSF| |f| |roots| |root| #0=#:G1908 |pointList|)
    (RETURN
      (SEQ (LETT |pointList| NIL . #1=(|ACPLOT;listPtsOnVertBdry|))
           (LETT |xSF| (|ACPLOT;RNtoSF| |x0| $) . #1#)
           (LETT |f| (SPADCALL |pRN| |x| |x0| (QREFELT $ 63)) . #1#)
           (LETT |roots|
                 (SPADCALL |f| (QREFELT $ 12) (QREFELT $ 66)) . #1#)
           (SEQ (LETT |root| NIL . #1#) (LETT #0# |roots| . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |root| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((NULL (SPADCALL |root| |yMinNF|
                                     (QREFELT $ 67)))
                              (COND
                                ((NULL (SPADCALL |yMaxNF| |root|
                                        (QREFELT $ 67)))
                                 (LETT |pointList|
                                       (CONS
                                        (|ACPLOT;makePt| |xSF|
                                         (|ACPLOT;NFtoSF| |root| $) $)
                                        |pointList|) . #1#)))))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |pointList|))))) 

(DEFUN |ACPLOT;listPtsInRect| (|points| |xMin| |xMax| |yMin| |yMax| $)
  (PROG (|point| #0=#:G1913 |xx| |yy| |pointList|)
    (RETURN
      (SEQ (LETT |pointList| NIL . #1=(|ACPLOT;listPtsInRect|))
           (SEQ (LETT |point| NIL . #1#) (LETT #0# |points| . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |point| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (LETT |xx| (|SPADfirst| |point|) . #1#)
                     (LETT |yy|
                           (SPADCALL |point| (QREFELT $ 68)) . #1#)
                     (EXIT (COND
                             ((NULL (SPADCALL |xx| |xMin|
                                     (QREFELT $ 67)))
                              (COND
                                ((NULL (SPADCALL |xMax| |xx|
                                        (QREFELT $ 67)))
                                 (COND
                                   ((NULL
                                     (SPADCALL |yy| |yMin|
                                      (QREFELT $ 67)))
                                    (COND
                                      ((NULL
                                        (SPADCALL |yMax| |yy|
                                         (QREFELT $ 67)))
                                       (LETT |pointList|
                                        (CONS
                                         (|ACPLOT;makePt|
                                          (|ACPLOT;NFtoSF| |xx| $)
                                          (|ACPLOT;NFtoSF| |yy| $) $)
                                         |pointList|) . #1#)))))))))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |pointList|))))) 

(DEFUN |ACPLOT;ptsSuchThat?| (|points| |pred| $)
  (PROG (|point| #0=#:G1918 #1=#:G1917)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |point| NIL
                                 . #2=(|ACPLOT;ptsSuchThat?|))
                           (LETT #0# |points| . #2#) G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |point| (CAR #0#) . #2#)
                                    NIL))
                              (GO G191)))
                           (SEQ (EXIT (COND
                                        ((SPADCALL |point| |pred|)
                                         (PROGN
                                           (LETT #1# 'T . #2#)
                                           (GO #1#))))))
                           (LETT #0# (CDR #0#) . #2#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT 'NIL)))
           #1# (EXIT #1#))))) 

(DEFUN |ACPLOT;inRect?| (|point| |xMinNF| |xMaxNF| |yMinNF| |yMaxNF| $)
  (PROG (|xx| |yy|)
    (RETURN
      (SEQ (LETT |xx| (|SPADfirst| |point|) . #0=(|ACPLOT;inRect?|))
           (LETT |yy| (SPADCALL |point| (QREFELT $ 68)) . #0#)
           (EXIT (COND
                   ((OR (OR (OR (SPADCALL |xx| |xMinNF| (QREFELT $ 67))
                                (SPADCALL |xMaxNF| |xx| (QREFELT $ 67)))
                            (SPADCALL |yy| |yMinNF| (QREFELT $ 67)))
                        (SPADCALL |yMaxNF| |yy| (QREFELT $ 67)))
                    'NIL)
                   ('T 'T))))))) 

(DEFUN |ACPLOT;onHorzSeg?| (|point| |xMinNF| |xMaxNF| |yNF| $)
  (PROG (|xx| |yy|)
    (RETURN
      (SEQ (LETT |xx| (|SPADfirst| |point|) . #0=(|ACPLOT;onHorzSeg?|))
           (LETT |yy| (SPADCALL |point| (QREFELT $ 68)) . #0#)
           (EXIT (COND
                   ((SPADCALL |yy| |yNF| (QREFELT $ 69))
                    (COND
                      ((OR (SPADCALL |xx| |xMinNF| (QREFELT $ 67))
                           (SPADCALL |xMaxNF| |xx| (QREFELT $ 67)))
                       'NIL)
                      ('T 'T)))
                   ('T 'NIL))))))) 

(DEFUN |ACPLOT;onVertSeg?| (|point| |yMinNF| |yMaxNF| |xNF| $)
  (PROG (|xx| |yy|)
    (RETURN
      (SEQ (LETT |xx| (|SPADfirst| |point|) . #0=(|ACPLOT;onVertSeg?|))
           (LETT |yy| (SPADCALL |point| (QREFELT $ 68)) . #0#)
           (EXIT (COND
                   ((SPADCALL |xx| |xNF| (QREFELT $ 69))
                    (COND
                      ((OR (SPADCALL |yy| |yMinNF| (QREFELT $ 67))
                           (SPADCALL |yMaxNF| |yy| (QREFELT $ 67)))
                       'NIL)
                      ('T 'T)))
                   ('T 'NIL))))))) 

(DEFUN |ACPLOT;newX|
       (|vtanPts| |singPts| |yMinNF| |yMaxNF| |xNF| |xRN| |horizInc| $)
  (PROG (|xNewNF| |xRtNF| |xLftNF| |foo| |goo|)
    (RETURN
      (SEQ (LETT |xNewNF|
                 (SPADCALL |xNF| (|ACPLOT;RNtoNF| |horizInc| $)
                     (QREFELT $ 70))
                 . #0=(|ACPLOT;newX|))
           (LETT |xRtNF|
                 (SPADCALL |xNF| |xNewNF| (QREFELT $ 71)) . #0#)
           (LETT |xLftNF|
                 (SPADCALL |xNF| |xNewNF| (QREFELT $ 72)) . #0#)
           (LETT |foo|
                 (CONS #'|ACPLOT;newX!0|
                       (VECTOR $ |yMaxNF| |yMinNF| |xRtNF| |xLftNF|)) . #0#)
           (EXIT (COND
                   ((|ACPLOT;ptsSuchThat?| |singPts| |foo| $)
                    (|ACPLOT;newX| |vtanPts| |singPts| |yMinNF|
                        |yMaxNF| |xNF| |xRN|
                        (SPADCALL |horizInc|
                            (SPADCALL 2 (QREFELT $ 55)) (QREFELT $ 73))
                        $))
                   ('T
                    (SEQ (LETT |goo|
                               (CONS #'|ACPLOT;newX!1|
                                     (VECTOR $ |xNewNF| |yMaxNF|
                                      |yMinNF|)) . #0#)
                         (EXIT (COND
                                 ((|ACPLOT;ptsSuchThat?| |vtanPts|
                                      |goo| $)
                                  (|ACPLOT;newX| |vtanPts| |singPts|
                                      |yMinNF| |yMaxNF| |xNF| |xRN|
                                      (SPADCALL |horizInc|
                                       (SPADCALL 2 (QREFELT $ 55))
                                       (QREFELT $ 73))
                                      $))
                                 ('T
                                  (SPADCALL |xRN| |horizInc|
                                      (QREFELT $ 74))))))))))))) 

(DEFUN |ACPLOT;newX!1| (|#1| $$)
  (|ACPLOT;onVertSeg?| |#1| (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;newX!0| (|#1| $$)
  (|ACPLOT;inRect?| |#1| (QREFELT $$ 4) (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;newY|
       (|htanPts| |singPts| |xMinNF| |xMaxNF| |yNF| |yRN| |vertInc| $)
  (PROG (|yNewNF| |yTopNF| |yBotNF| |foo| |goo|)
    (RETURN
      (SEQ (LETT |yNewNF|
                 (SPADCALL |yNF| (|ACPLOT;RNtoNF| |vertInc| $)
                     (QREFELT $ 70))
                 . #0=(|ACPLOT;newY|))
           (LETT |yTopNF|
                 (SPADCALL |yNF| |yNewNF| (QREFELT $ 71)) . #0#)
           (LETT |yBotNF|
                 (SPADCALL |yNF| |yNewNF| (QREFELT $ 72)) . #0#)
           (LETT |foo|
                 (CONS #'|ACPLOT;newY!0|
                       (VECTOR $ |yTopNF| |yBotNF| |xMaxNF| |xMinNF|)) . #0#)
           (EXIT (COND
                   ((|ACPLOT;ptsSuchThat?| |singPts| |foo| $)
                    (|ACPLOT;newY| |htanPts| |singPts| |xMinNF|
                        |xMaxNF| |yNF| |yRN|
                        (SPADCALL |vertInc| (SPADCALL 2 (QREFELT $ 55))
                            (QREFELT $ 73))
                        $))
                   ('T
                    (SEQ (LETT |goo|
                               (CONS #'|ACPLOT;newY!1|
                                     (VECTOR $ |yNewNF| |xMaxNF|
                                      |xMinNF|)) . #0#)
                         (EXIT (COND
                                 ((|ACPLOT;ptsSuchThat?| |htanPts|
                                      |goo| $)
                                  (|ACPLOT;newY| |htanPts| |singPts|
                                      |xMinNF| |xMaxNF| |yNF| |yRN|
                                      (SPADCALL |vertInc|
                                       (SPADCALL 2 (QREFELT $ 55))
                                       (QREFELT $ 73))
                                      $))
                                 ('T
                                  (SPADCALL |yRN| |vertInc|
                                      (QREFELT $ 74))))))))))))) 

(DEFUN |ACPLOT;newY!1| (|#1| $$)
  (|ACPLOT;onHorzSeg?| |#1| (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;newY!0| (|#1| $$)
  (|ACPLOT;inRect?| |#1| (QREFELT $$ 4) (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;makeSketch;P2S2S$;27| (|p| |x| |y| |xRange| |yRange| $)
  (PROG (|xMin| |xMax| |yMin| |yMax| |varList|)
    (RETURN
      (SEQ (LETT |xMin| (SPADCALL |xRange| (QREFELT $ 76))
                 . #0=(|ACPLOT;makeSketch;P2S2S$;27|))
           (LETT |xMax| (SPADCALL |xRange| (QREFELT $ 77)) . #0#)
           (LETT |yMin| (SPADCALL |yRange| (QREFELT $ 76)) . #0#)
           (LETT |yMax| (SPADCALL |yRange| (QREFELT $ 77)) . #0#)
           (EXIT (COND
                   ((SPADCALL |xMin| |xMax| (QREFELT $ 78))
                    (COND
                      ((SPADCALL |yMin| |yMax| (QREFELT $ 78))
                       (SEQ (LETT |varList|
                                  (SPADCALL |p| (QREFELT $ 80)) . #0#)
                            (EXIT (COND
                                    ((< 2 (LENGTH |varList|))
                                     (|error|
                                      "makeSketch: polynomial in more than 2 variables"))
                                    ((EQL (LENGTH |varList|) 0)
                                     (|error|
                                      "makeSketch: constant polynomial"))
                                    ((EQL (LENGTH |varList|) 1)
                                     (SEQ
                                      (COND
                                        ((NULL
                                          (SPADCALL |x| |varList|
                                           (QREFELT $ 81)))
                                         (COND
                                           ((NULL
                                             (SPADCALL |y| |varList|
                                              (QREFELT $ 81)))
                                            (EXIT
                                             (|error|
                                              "makeSketch: bad variables"))))))
                                      (EXIT
                                       (|ACPLOT;makeOneVarSketch| |p|
                                        |x| |y| |xMin| |xMax| |yMin|
                                        |yMax| (|SPADfirst| |varList|)
                                        $))))
                                    ('T
                                     (SEQ
                                      (COND
                                        ((SPADCALL |x| |varList|
                                          (QREFELT $ 81))
                                         (COND
                                           ((NULL
                                             (SPADCALL |y| |varList|
                                              (QREFELT $ 81)))
                                            (EXIT
                                             (|error|
                                              "makeSketch: bad variables")))))
                                        ('T
                                         (EXIT
                                          (|error|
                                           "makeSketch: bad variables"))))
                                      (EXIT
                                       (COND
                                         ((EQL
                                           (SPADCALL |p|
                                            (QREFELT $ 82))
                                           1)
                                          (|ACPLOT;makeLineSketch| |p|
                                           |x| |y| |xMin| |xMax| |yMin|
                                           |yMax| $))
                                         ((EQL
                                           (SPADCALL |p| |y|
                                            (QREFELT $ 83))
                                           1)
                                          (|ACPLOT;makeRatFcnSketch|
                                           |p| |x| |y| |xMin| |xMax|
                                           |yMin| |yMax| |y| $))
                                         ((EQL
                                           (SPADCALL |p| |x|
                                            (QREFELT $ 83))
                                           1)
                                          (|ACPLOT;makeRatFcnSketch|
                                           |p| |x| |y| |xMin| |xMax|
                                           |yMin| |yMax| |x| $))
                                         ('T
                                          (|ACPLOT;makeGeneralSketch|
                                           |p| |x| |y| |xMin| |xMax|
                                           |yMin| |yMax| $))))))))))
                      (#1='T
                       (|error| "makeSketch: bad range for second variable"))))
                   (#1#
                    (|error| "makeSketch: bad range for first variable")))))))) 

(DEFUN |ACPLOT;makeOneVarSketch|
       (|p| |x| |y| |xMin| |xMax| |yMin| |yMax| |var| $)
  (PROG (|minVal| |maxVal| |htans| |vtans| |roots| |root| #0=#:G1958
            |sketchRoots| |yMinSF| |yMaxSF| #1=#:G1959 |tp| |bt|
            |xMinSF| |xMaxSF| |rootSF| #2=#:G1960 |pt1| |rt| |pt2| |lf|
            |branch| |bran|)
    (RETURN
      (SEQ (COND
             ((EQUAL |var| |x|)
              (SEQ (LETT |minVal| (|ACPLOT;RNtoNF| |xMin| $)
                         . #3=(|ACPLOT;makeOneVarSketch|))
                   (EXIT (LETT |maxVal|
                               (|ACPLOT;RNtoNF| |xMax| $) . #3#))))
             (#4='T
              (SEQ (LETT |minVal| (|ACPLOT;RNtoNF| |yMin| $) . #3#)
                   (EXIT (LETT |maxVal|
                               (|ACPLOT;RNtoNF| |yMax| $) . #3#)))))
           (LETT |lf| NIL . #3#) (LETT |rt| NIL . #3#)
           (LETT |bt| NIL . #3#) (LETT |tp| NIL . #3#)
           (LETT |htans| NIL . #3#) (LETT |vtans| NIL . #3#)
           (LETT |bran| NIL . #3#)
           (LETT |roots|
                 (SPADCALL |p| (QREFELT $ 12) (QREFELT $ 85)) . #3#)
           (LETT |sketchRoots| NIL . #3#)
           (SEQ (LETT |root| NIL . #3#) (LETT #0# |roots| . #3#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |root| (CAR #0#) . #3#) NIL))
                   #5=(GO G191)))
                (SEQ (EXIT (COND
                             ((NULL (SPADCALL |root| |minVal|
                                     (QREFELT $ 67)))
                              (COND
                                ((NULL (SPADCALL |maxVal| |root|
                                        (QREFELT $ 67)))
                                 (LETT |sketchRoots|
                                       (CONS (|ACPLOT;NFtoSF| |root| $)
                                        |sketchRoots|) . #3#)))))))
                (LETT #0# (CDR #0#) . #3#) #6=(GO G190) G191
                (EXIT NIL))
           (EXIT (COND
                   ((NULL |sketchRoots|)
                    (VECTOR |p| |x| |y| |xMin| |xMax| |yMin| |yMax|
                            (VECTOR |lf| |rt| |bt| |tp|) |htans|
                            |vtans| |bran|))
                   (#4#
                    (SEQ (COND
                           ((EQUAL |var| |x|)
                            (SEQ (LETT |yMinSF|
                                       (|ACPLOT;RNtoSF| |yMin| $) . #3#)
                                 (LETT |yMaxSF|
                                       (|ACPLOT;RNtoSF| |yMax| $) . #3#)
                                 (EXIT (SEQ (LETT |rootSF| NIL . #3#)
                                        (LETT #1# |sketchRoots| . #3#)
                                        G190
                                        (COND
                                          ((OR (ATOM #1#)
                                            (PROGN
                                              (LETT |rootSF|
                                               (CAR #1#) . #3#)
                                              NIL))
                                           #5#))
                                        (SEQ
                                         (LETT |tp|
                                          (CONS
                                           (LETT |pt1|
                                            (|ACPLOT;makePt| |rootSF|
                                             |yMaxSF| $) . #3#)
                                           |tp|) . #3#)
                                         (LETT |bt|
                                          (CONS
                                           (LETT |pt2|
                                            (|ACPLOT;makePt| |rootSF|
                                             |yMinSF| $) . #3#)
                                           |bt|) . #3#)
                                         (LETT |branch|
                                          (LIST |pt1| |pt2|) . #3#)
                                         (EXIT
                                          (LETT |bran|
                                           (CONS |branch| |bran|) . #3#)))
                                        (LETT #1# (CDR #1#) . #3#) #6#
                                        G191 (EXIT NIL)))))
                           (#4#
                            (SEQ (LETT |xMinSF|
                                       (|ACPLOT;RNtoSF| |xMin| $) . #3#)
                                 (LETT |xMaxSF|
                                       (|ACPLOT;RNtoSF| |xMax| $) . #3#)
                                 (EXIT (SEQ (LETT |rootSF| NIL . #3#)
                                        (LETT #2# |sketchRoots| . #3#)
                                        G190
                                        (COND
                                          ((OR (ATOM #2#)
                                            (PROGN
                                              (LETT |rootSF|
                                               (CAR #2#) . #3#)
                                              NIL))
                                           #5#))
                                        (SEQ
                                         (LETT |rt|
                                          (CONS
                                           (LETT |pt1|
                                            (|ACPLOT;makePt| |xMaxSF|
                                             |rootSF| $) . #3#)
                                           |rt|) . #3#)
                                         (LETT |lf|
                                          (CONS
                                           (LETT |pt2|
                                            (|ACPLOT;makePt| |xMinSF|
                                             |rootSF| $) . #3#)
                                           |lf|) . #3#)
                                         (LETT |branch|
                                          (LIST |pt1| |pt2|) . #3#)
                                         (EXIT
                                          (LETT |bran|
                                           (CONS |branch| |bran|) . #3#)))
                                        (LETT #2# (CDR #2#) . #3#) #6#
                                        G191 (EXIT NIL))))))
                         (EXIT (VECTOR |p| |x| |y| |xMin| |xMax| |yMin|
                                       |yMax|
                                       (VECTOR |lf| |rt| |bt| |tp|)
                                       |htans| |vtans| |bran|)))))))))) 

(DEFUN |ACPLOT;makeLineSketch|
       (|p| |x| |y| |xMin| |xMax| |yMin| |yMax| $)
  (PROG (|xMinSF| |xMaxSF| |yMinSF| |yMaxSF| |a| |b| |c| |htans|
            |vtans| |xBottom| |xTop| |yLeft| |yRight| |bt| |tp| |lf|
            |pt| |rt| |branch| |bran|)
    (RETURN
      (SEQ (LETT |xMinSF| (|ACPLOT;RNtoSF| |xMin| $)
                 . #0=(|ACPLOT;makeLineSketch|))
           (LETT |xMaxSF| (|ACPLOT;RNtoSF| |xMax| $) . #0#)
           (LETT |yMinSF| (|ACPLOT;RNtoSF| |yMin| $) . #0#)
           (LETT |yMaxSF| (|ACPLOT;RNtoSF| |yMax| $) . #0#)
           (LETT |a|
                 (FLOAT (SPADCALL (SPADCALL |p| |x| 1 (QREFELT $ 86))
                            (QREFELT $ 87))
                        MOST-POSITIVE-DOUBLE-FLOAT) . #0#)
           (LETT |b|
                 (FLOAT (SPADCALL (SPADCALL |p| |y| 1 (QREFELT $ 86))
                            (QREFELT $ 87))
                        MOST-POSITIVE-DOUBLE-FLOAT) . #0#)
           (LETT |c|
                 (FLOAT (SPADCALL
                            (SPADCALL
                                (SPADCALL |p| |x| 0 (QREFELT $ 86)) |y|
                                0 (QREFELT $ 86))
                            (QREFELT $ 87))
                        MOST-POSITIVE-DOUBLE-FLOAT) . #0#)
           (LETT |lf| NIL . #0#) (LETT |rt| NIL . #0#)
           (LETT |bt| NIL . #0#) (LETT |tp| NIL . #0#)
           (LETT |htans| NIL . #0#) (LETT |vtans| NIL . #0#)
           (LETT |branch| NIL . #0#) (LETT |bran| NIL . #0#)
           (LETT |xBottom| (/ (- (- (* |b| |yMinSF|)) |c|) |a|) . #0#)
           (LETT |xTop| (/ (- (- (* |b| |yMaxSF|)) |c|) |a|) . #0#)
           (LETT |yLeft| (/ (- (- (* |a| |xMinSF|)) |c|) |b|) . #0#)
           (LETT |yRight| (/ (- (- (* |a| |xMaxSF|)) |c|) |b|) . #0#)
           (COND
             ((< |xMinSF| |xBottom|)
              (COND
                ((< |xBottom| |xMaxSF|)
                 (SEQ (LETT |bt|
                            (CONS (LETT |pt|
                                        (|ACPLOT;makePt| |xBottom|
                                         |yMinSF| $) . #0#)
                                  |bt|) . #0#)
                      (EXIT (LETT |branch| (CONS |pt| |branch|) . #0#)))))))
           (COND
             ((< |xMinSF| |xTop|)
              (COND
                ((< |xTop| |xMaxSF|)
                 (SEQ (LETT |tp|
                            (CONS (LETT |pt|
                                        (|ACPLOT;makePt| |xTop|
                                         |yMaxSF| $) . #0#)
                                  |tp|) . #0#)
                      (EXIT (LETT |branch| (CONS |pt| |branch|) . #0#)))))))
           (COND
             ((NULL (< |yLeft| |yMinSF|))
              (COND
                ((NULL (< |yMaxSF| |yLeft|))
                 (SEQ (LETT |lf|
                            (CONS (LETT |pt|
                                        (|ACPLOT;makePt| |xMinSF|
                                         |yLeft| $) . #0#)
                                  |lf|) . #0#)
                      (EXIT (LETT |branch| (CONS |pt| |branch|) . #0#)))))))
           (COND
             ((NULL (< |yRight| |yMinSF|))
              (COND
                ((NULL (< |yMaxSF| |yRight|))
                 (SEQ (LETT |rt|
                            (CONS (LETT |pt|
                                        (|ACPLOT;makePt| |xMaxSF|
                                         |yRight| $) . #0#)
                                  |rt|) . #0#)
                      (EXIT (LETT |branch| (CONS |pt| |branch|) . #0#)))))))
           (LETT |bran| (CONS |branch| |bran|) . #0#)
           (EXIT (VECTOR |p| |x| |y| |xMin| |xMax| |yMin| |yMax|
                         (VECTOR |lf| |rt| |bt| |tp|) |htans| |vtans|
                         |bran|)))))) 

(DEFUN |ACPLOT;singValBetween?| (|xCurrent| |xNext| |xSingList| $)
  (PROG (|xVal| #0=#:G1971 #1=#:G1970 #2=#:G1968)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (EXIT (SEQ (LETT |xVal| NIL
                                       . #3=(|ACPLOT;singValBetween?|))
                                      (LETT #0# |xSingList| . #3#) G190
                                      (COND
                                        ((OR (ATOM #0#)
                                          (PROGN
                                            (LETT |xVal|
                                             (CAR #0#) . #3#)
                                            NIL))
                                         (GO G191)))
                                      (SEQ
                                       (EXIT
                                        (COND
                                          ((< |xCurrent| |xVal|)
                                           (COND
                                             ((< |xVal| |xNext|)
                                              (PROGN
                                                (LETT #2#
                                                 (PROGN
                                                   (LETT #1# 'T . #3#)
                                                   (GO #1#)) . #3#)
                                                (GO #2#))))))))
                                      (LETT #0# (CDR #0#) . #3#)
                                      (GO G190) G191 (EXIT NIL)))
                           #2# (EXIT #2#))
                      (EXIT 'NIL)))
           #1# (EXIT #1#))))) 

(DEFUN |ACPLOT;segmentInfo|
       (|f| |lo| |hi| |botList| |topList| |singList| |minSF| |maxSF| $)
  (PROG (|current| |currentFrom| |bot| |top| |nxt| |nextFrom| |val|
            #0=#:G1988)
    (RETURN
      (SEQ (EXIT (SEQ G190 NIL
                      (SEQ (COND
                             ((NULL |topList|)
                              (COND
                                ((NULL |botList|)
                                 (PROGN
                                   (LETT #0#
                                    (VECTOR
                                     (SPADCALL |lo| |hi|
                                      (QREFELT $ 89))
                                     |hi| NIL NIL)
                                    . #1=(|ACPLOT;segmentInfo|))
                                   (GO #0#)))
                                ('T
                                 (SEQ (LETT |current|
                                       (|SPADfirst| |botList|) . #1#)
                                      (LETT |botList|
                                       (CDR |botList|) . #1#)
                                      (EXIT
                                       (LETT |currentFrom|
                                        (QREFELT $ 19) . #1#))))))
                             ((NULL |botList|)
                              (SEQ (LETT |current|
                                    (|SPADfirst| |topList|) . #1#)
                                   (LETT |topList|
                                    (CDR |topList|) . #1#)
                                   (EXIT
                                    (LETT |currentFrom|
                                     (QREFELT $ 20) . #1#))))
                             ('T
                              (SEQ (LETT |bot|
                                    (|SPADfirst| |botList|) . #1#)
                                   (LETT |top|
                                    (|SPADfirst| |topList|) . #1#)
                                   (EXIT
                                    (COND
                                      ((< |bot| |top|)
                                       (SEQ
                                        (LETT |current| |bot| . #1#)
                                        (LETT |botList|
                                         (CDR |botList|) . #1#)
                                        (EXIT
                                         (LETT |currentFrom|
                                          (QREFELT $ 19) . #1#))))
                                      ('T
                                       (SEQ
                                        (LETT |current| |top| . #1#)
                                        (LETT |topList|
                                         (CDR |topList|) . #1#)
                                        (EXIT
                                         (LETT |currentFrom|
                                          (QREFELT $ 20) . #1#)))))))))
                           (COND
                             ((NULL |topList|)
                              (COND
                                ((NULL |botList|)
                                 (PROGN
                                   (LETT #0#
                                    (VECTOR
                                     (SPADCALL |lo| |hi|
                                      (QREFELT $ 89))
                                     |hi| NIL NIL) . #1#)
                                   (GO #0#)))
                                ('T
                                 (SEQ (LETT |nxt|
                                       (|SPADfirst| |botList|) . #1#)
                                      (LETT |botList|
                                       (CDR |botList|) . #1#)
                                      (EXIT
                                       (LETT |nextFrom|
                                        (QREFELT $ 19) . #1#))))))
                             ((NULL |botList|)
                              (SEQ (LETT |nxt|
                                    (|SPADfirst| |topList|) . #1#)
                                   (LETT |topList|
                                    (CDR |topList|) . #1#)
                                   (EXIT
                                    (LETT |nextFrom|
                                     (QREFELT $ 20) . #1#))))
                             ('T
                              (SEQ (LETT |bot|
                                    (|SPADfirst| |botList|) . #1#)
                                   (LETT |top|
                                    (|SPADfirst| |topList|) . #1#)
                                   (EXIT
                                    (COND
                                      ((< |bot| |top|)
                                       (SEQ (LETT |nxt| |bot| . #1#)
                                        (LETT |botList|
                                         (CDR |botList|) . #1#)
                                        (EXIT
                                         (LETT |nextFrom|
                                          (QREFELT $ 19) . #1#))))
                                      ('T
                                       (SEQ (LETT |nxt| |top| . #1#)
                                        (LETT |topList|
                                         (CDR |topList|) . #1#)
                                        (EXIT
                                         (LETT |nextFrom|
                                          (QREFELT $ 20) . #1#)))))))))
                           (EXIT (COND
                                   ((EQUAL |currentFrom| |nextFrom|)
                                    (COND
                                      ((|ACPLOT;singValBetween?|
                                        |current| |nxt| |singList| $)
                                       (PROGN
                                         (LETT #0#
                                          (VECTOR
                                           (SPADCALL |lo| |current|
                                            (QREFELT $ 89))
                                           |nxt| |botList| |topList|) . #1#)
                                         (GO #0#)))
                                      ('T
                                       (SEQ
                                        (LETT |val|
                                         (SPADCALL
                                          (/ (- |nxt| |current|)
                                           (FLOAT 2
                                            MOST-POSITIVE-DOUBLE-FLOAT))
                                          |f|) . #1#)
                                        (EXIT
                                         (COND
                                           ((< |minSF| |val|)
                                            (COND
                                              ((NULL (< |val| |maxSF|))
                                               (PROGN
                                                 (LETT #0#
                                                  (VECTOR
                                                   (SPADCALL |lo|
                                                    |current|
                                                    (QREFELT $ 89))
                                                   |nxt| |botList|
                                                   |topList|) . #1#)
                                                 (GO #0#)))))
                                           ('T
                                            (PROGN
                                              (LETT #0#
                                               (VECTOR
                                                (SPADCALL |lo|
                                                 |current|
                                                 (QREFELT $ 89))
                                                |nxt| |botList|
                                                |topList|) . #1#)
                                              (GO #0#)))))))))
                                   ((|ACPLOT;singValBetween?| |current|
                                     |nxt| |singList| $)
                                    (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL |lo| |current|
                                         (QREFELT $ 89))
                                        |nxt| |botList| |topList|) . #1#)
                                      (GO #0#))))))
                      NIL (GO G190) G191 (EXIT NIL)))
           #0# (EXIT #0#))))) 

(DEFUN |ACPLOT;makeRatFcnSketch|
       (|p| |x| |y| |xMin| |xMax| |yMin| |yMax| |depVar| $)
  (PROG (|factoredP| |dpdx| |dpdy| |pRN| |xMinSF| |xMaxSF| |yMinSF|
            |yMaxSF| |xMinNF| |xMaxNF| |yMinNF| |yMaxNF| |num| |den|
            |numUPolySF| |denUPolySF| |f| |indVarMin| |indVarMax|
            |indVarMinNF| |indVarMaxNF| |indVarMinSF| |indVarMaxSF|
            |depVarMin| |depVarMax| |depVarMinSF| |depVarMaxSF|
            |htanPts| |vtanPts| |htans| |vtans| #0=#:G2037 |singList|
            #1=#:G2038 |roots| |root| #2=#:G2039 |outList| |denUPolyRN|
            |leftVal| |rightVal| #3=#:G2040 #4=#:G2041 |lf| |rt|
            #5=#:G2042 |bt| |val| #6=#:G2043 |tp| #7=#:G2036 |bot|
            |top| |hi| |minSF| |maxSF| |segInfo| |segList| |lo|
            |botList| |topList| #8=#:G2029 |segment| #9=#:G2044
            |RFPlot| |curve| |bran|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |factoredP| (SPADCALL |p| (QREFELT $ 91))
                            . #10=(|ACPLOT;makeRatFcnSketch|))
                      (EXIT (COND
                              ((< 1
                                  (SPADCALL |factoredP| (QREFELT $ 92)))
                               (|error| "reducible polynomial"))
                              ('T
                               (SEQ (LETT |dpdx|
                                     (SPADCALL |p| |x| (QREFELT $ 93)) . #10#)
                                    (LETT |dpdy|
                                     (SPADCALL |p| |y| (QREFELT $ 93)) . #10#)
                                    (LETT |pRN|
                                     (|ACPLOT;coerceCoefsToRNs| |p| $) . #10#)
                                    (LETT |xMinSF|
                                     (|ACPLOT;RNtoSF| |xMin| $) . #10#)
                                    (LETT |xMaxSF|
                                     (|ACPLOT;RNtoSF| |xMax| $) . #10#)
                                    (LETT |yMinSF|
                                     (|ACPLOT;RNtoSF| |yMin| $) . #10#)
                                    (LETT |yMaxSF|
                                     (|ACPLOT;RNtoSF| |yMax| $) . #10#)
                                    (LETT |xMinNF|
                                     (|ACPLOT;RNtoNF| |xMin| $) . #10#)
                                    (LETT |xMaxNF|
                                     (|ACPLOT;RNtoNF| |xMax| $) . #10#)
                                    (LETT |yMinNF|
                                     (|ACPLOT;RNtoNF| |yMin| $) . #10#)
                                    (LETT |yMaxNF|
                                     (|ACPLOT;RNtoNF| |yMax| $) . #10#)
                                    (LETT |num|
                                     (SPADCALL
                                      (SPADCALL |p| |depVar| 0
                                       (QREFELT $ 86))
                                      (QREFELT $ 94)) . #10#)
                                    (LETT |den|
                                     (SPADCALL |p| |depVar| 1
                                      (QREFELT $ 86)) . #10#)
                                    (LETT |numUPolySF|
                                     (|ACPLOT;SFPolyToUPoly|
                                      (|ACPLOT;coerceCoefsToSFs| |num|
                                       $)
                                      $) . #10#)
                                    (LETT |denUPolySF|
                                     (|ACPLOT;SFPolyToUPoly|
                                      (|ACPLOT;coerceCoefsToSFs| |den|
                                       $)
                                      $) . #10#)
                                    (LETT |f|
                                     (CONS
                                      #'|ACPLOT;makeRatFcnSketch!0|
                                      (VECTOR |denUPolySF| $
                                       |numUPolySF|)) . #10#)
                                    (COND
                                      ((EQUAL |depVar| |x|)
                                       (SEQ
                                        (LETT |indVarMin|
                                         |yMin| . #10#)
                                        (LETT |indVarMax|
                                         |yMax| . #10#)
                                        (LETT |indVarMinNF|
                                         |yMinNF| . #10#)
                                        (LETT |indVarMaxNF|
                                         |yMaxNF| . #10#)
                                        (LETT |indVarMinSF|
                                         |yMinSF| . #10#)
                                        (LETT |indVarMaxSF|
                                         |yMaxSF| . #10#)
                                        (LETT |depVarMin|
                                         |xMin| . #10#)
                                        (LETT |depVarMax|
                                         |xMax| . #10#)
                                        (LETT |depVarMinSF|
                                         |xMinSF| . #10#)
                                        (EXIT
                                         (LETT |depVarMaxSF|
                                          |xMaxSF| . #10#))))
                                      ('T
                                       (SEQ
                                        (LETT |indVarMin|
                                         |xMin| . #10#)
                                        (LETT |indVarMax|
                                         |xMax| . #10#)
                                        (LETT |indVarMinNF|
                                         |xMinNF| . #10#)
                                        (LETT |indVarMaxNF|
                                         |xMaxNF| . #10#)
                                        (LETT |indVarMinSF|
                                         |xMinSF| . #10#)
                                        (LETT |indVarMaxSF|
                                         |xMaxSF| . #10#)
                                        (LETT |depVarMin|
                                         |yMin| . #10#)
                                        (LETT |depVarMax|
                                         |yMax| . #10#)
                                        (LETT |depVarMinSF|
                                         |yMinSF| . #10#)
                                        (EXIT
                                         (LETT |depVarMaxSF|
                                          |yMaxSF| . #10#)))))
                                    (LETT |htanPts|
                                     (SPADCALL (LIST |p| |dpdx|)
                                      (LIST |x| |y|) (QREFELT $ 12)
                                      (QREFELT $ 99)) . #10#)
                                    (LETT |vtanPts|
                                     (SPADCALL (LIST |p| |dpdy|)
                                      (LIST |x| |y|) (QREFELT $ 12)
                                      (QREFELT $ 99)) . #10#)
                                    (LETT |htans|
                                     (|ACPLOT;listPtsInRect| |htanPts|
                                      |xMinNF| |xMaxNF| |yMinNF|
                                      |yMaxNF| $) . #10#)
                                    (LETT |vtans|
                                     (|ACPLOT;listPtsInRect| |vtanPts|
                                      |xMinNF| |xMaxNF| |yMinNF|
                                      |yMaxNF| $) . #10#)
                                    (LETT |lf| NIL . #10#)
                                    (LETT |rt| NIL . #10#)
                                    (LETT |bt| NIL . #10#)
                                    (LETT |tp| NIL . #10#)
                                    (LETT |singList|
                                     (SEQ
                                      (LETT |roots|
                                       (SPADCALL |den| (QREFELT $ 12)
                                        (QREFELT $ 85)) . #10#)
                                      (LETT |outList| NIL . #10#)
                                      (SEQ (LETT |root| NIL . #10#)
                                       (LETT #0# |roots| . #10#) G190
                                       (COND
                                         ((OR (ATOM #0#)
                                           (PROGN
                                             (LETT |root|
                                              (CAR #0#) . #10#)
                                             NIL))
                                          #11=(GO G191)))
                                       (SEQ
                                        (EXIT
                                         (COND
                                           ((SPADCALL |indVarMinNF|
                                             |root| (QREFELT $ 67))
                                            (COND
                                              ((SPADCALL |root|
                                                |indVarMaxNF|
                                                (QREFELT $ 67))
                                               (LETT |outList|
                                                (CONS
                                                 (|ACPLOT;NFtoSF|
                                                  |root| $)
                                                 |outList|) . #10#)))))))
                                       (LETT #0# (CDR #0#) . #10#)
                                       #12=(GO G190) G191 (EXIT NIL))
                                      (EXIT
                                       (SPADCALL
                                        (CONS
                                         #'|ACPLOT;makeRatFcnSketch!1|
                                         $)
                                        |outList| (QREFELT $ 102)))) . #10#)
                                    (LETT |topList|
                                     (SEQ
                                      (LETT |roots|
                                       (SPADCALL
                                        (SPADCALL |pRN| |depVar|
                                         |depVarMax| (QREFELT $ 63))
                                        (QREFELT $ 12) (QREFELT $ 66)) . #10#)
                                      (LETT |outList| NIL . #10#)
                                      (SEQ (LETT |root| NIL . #10#)
                                       (LETT #1# |roots| . #10#) G190
                                       (COND
                                         ((OR (ATOM #1#)
                                           (PROGN
                                             (LETT |root|
                                              (CAR #1#) . #10#)
                                             NIL))
                                          #11#))
                                       (SEQ
                                        (EXIT
                                         (COND
                                           ((SPADCALL |indVarMinNF|
                                             |root| (QREFELT $ 67))
                                            (COND
                                              ((SPADCALL |root|
                                                |indVarMaxNF|
                                                (QREFELT $ 67))
                                               (LETT |outList|
                                                (CONS
                                                 (|ACPLOT;NFtoSF|
                                                  |root| $)
                                                 |outList|) . #10#)))))))
                                       (LETT #1# (CDR #1#) . #10#) #12#
                                       G191 (EXIT NIL))
                                      (EXIT
                                       (SPADCALL
                                        (CONS
                                         #'|ACPLOT;makeRatFcnSketch!2|
                                         $)
                                        |outList| (QREFELT $ 102)))) . #10#)
                                    (LETT |botList|
                                     (SEQ
                                      (LETT |roots|
                                       (SPADCALL
                                        (SPADCALL |pRN| |depVar|
                                         |depVarMin| (QREFELT $ 63))
                                        (QREFELT $ 12) (QREFELT $ 66)) . #10#)
                                      (LETT |outList| NIL . #10#)
                                      (SEQ (LETT |root| NIL . #10#)
                                       (LETT #2# |roots| . #10#) G190
                                       (COND
                                         ((OR (ATOM #2#)
                                           (PROGN
                                             (LETT |root|
                                              (CAR #2#) . #10#)
                                             NIL))
                                          #11#))
                                       (SEQ
                                        (EXIT
                                         (COND
                                           ((SPADCALL |indVarMinNF|
                                             |root| (QREFELT $ 67))
                                            (COND
                                              ((SPADCALL |root|
                                                |indVarMaxNF|
                                                (QREFELT $ 67))
                                               (LETT |outList|
                                                (CONS
                                                 (|ACPLOT;NFtoSF|
                                                  |root| $)
                                                 |outList|) . #10#)))))))
                                       (LETT #2# (CDR #2#) . #10#) #12#
                                       G191 (EXIT NIL))
                                      (EXIT
                                       (SPADCALL
                                        (CONS
                                         #'|ACPLOT;makeRatFcnSketch!3|
                                         $)
                                        |outList| (QREFELT $ 102)))) . #10#)
                                    (LETT |denUPolyRN|
                                     (|ACPLOT;RNPolyToUPoly|
                                      (|ACPLOT;coerceCoefsToRNs| |den|
                                       $)
                                      $) . #10#)
                                    (COND
                                      ((SPADCALL
                                        (SPADCALL |denUPolyRN|
                                         |indVarMin| (QREFELT $ 103))
                                        (|spadConstant| $ 104)
                                        (QREFELT $ 105))
                                       (LETT |leftVal|
                                        (- |depVarMinSF|
                                         (+
                                          (FLOAT-SIGN 1.0
                                           |depVarMinSF|)
                                          1.0)) . #10#))
                                      ('T
                                       (LETT |leftVal|
                                        (SPADCALL |indVarMinSF| |f|) . #10#)))
                                    (COND
                                      ((SPADCALL
                                        (SPADCALL |denUPolyRN|
                                         |indVarMax| (QREFELT $ 103))
                                        (|spadConstant| $ 104)
                                        (QREFELT $ 105))
                                       (LETT |rightVal|
                                        (- |depVarMinSF|
                                         (+
                                          (FLOAT-SIGN 1.0
                                           |depVarMinSF|)
                                          1.0)) . #10#))
                                      ('T
                                       (LETT |rightVal|
                                        (SPADCALL |indVarMaxSF| |f|) . #10#)))
                                    (COND
                                      ((EQUAL |depVar| |x|)
                                       (SEQ
                                        (COND
                                          ((< |xMinSF| |leftVal|)
                                           (COND
                                             ((< |leftVal| |xMaxSF|)
                                              (LETT |bt|
                                               (CONS
                                                (|ACPLOT;makePt|
                                                 |leftVal| |yMinSF| $)
                                                |bt|) . #10#)))))
                                        (COND
                                          ((< |xMinSF| |rightVal|)
                                           (COND
                                             ((< |rightVal| |xMaxSF|)
                                              (LETT |tp|
                                               (CONS
                                                (|ACPLOT;makePt|
                                                 |rightVal| |yMaxSF| $)
                                                |tp|) . #10#)))))
                                        (SEQ (LETT |val| NIL . #10#)
                                         (LETT #3# |botList| . #10#)
                                         G190
                                         (COND
                                           ((OR (ATOM #3#)
                                             (PROGN
                                               (LETT |val|
                                                (CAR #3#) . #10#)
                                               NIL))
                                            #11#))
                                         (SEQ
                                          (EXIT
                                           (LETT |lf|
                                            (CONS
                                             (|ACPLOT;makePt| |xMinSF|
                                              |val| $)
                                             |lf|) . #10#)))
                                         (LETT #3# (CDR #3#) . #10#)
                                         #12# G191 (EXIT NIL))
                                        (EXIT
                                         (SEQ (LETT |val| NIL . #10#)
                                          (LETT #4# |topList| . #10#)
                                          G190
                                          (COND
                                            ((OR (ATOM #4#)
                                              (PROGN
                                                (LETT |val|
                                                 (CAR #4#) . #10#)
                                                NIL))
                                             #11#))
                                          (SEQ
                                           (EXIT
                                            (LETT |rt|
                                             (CONS
                                              (|ACPLOT;makePt| |xMaxSF|
                                               |val| $)
                                              |rt|) . #10#)))
                                          (LETT #4# (CDR #4#) . #10#)
                                          #12# G191 (EXIT NIL)))))
                                      ('T
                                       (SEQ
                                        (COND
                                          ((< |yMinSF| |leftVal|)
                                           (COND
                                             ((< |leftVal| |yMaxSF|)
                                              (LETT |lf|
                                               (CONS
                                                (|ACPLOT;makePt|
                                                 |xMinSF| |leftVal| $)
                                                |lf|) . #10#)))))
                                        (COND
                                          ((< |yMinSF| |rightVal|)
                                           (COND
                                             ((< |rightVal| |yMaxSF|)
                                              (LETT |rt|
                                               (CONS
                                                (|ACPLOT;makePt|
                                                 |xMaxSF| |rightVal| $)
                                                |rt|) . #10#)))))
                                        (SEQ (LETT |val| NIL . #10#)
                                         (LETT #5# |botList| . #10#)
                                         G190
                                         (COND
                                           ((OR (ATOM #5#)
                                             (PROGN
                                               (LETT |val|
                                                (CAR #5#) . #10#)
                                               NIL))
                                            #11#))
                                         (SEQ
                                          (EXIT
                                           (LETT |bt|
                                            (CONS
                                             (|ACPLOT;makePt| |val|
                                              |yMinSF| $)
                                             |bt|) . #10#)))
                                         (LETT #5# (CDR #5#) . #10#)
                                         #12# G191 (EXIT NIL))
                                        (EXIT
                                         (SEQ (LETT |val| NIL . #10#)
                                          (LETT #6# |topList| . #10#)
                                          G190
                                          (COND
                                            ((OR (ATOM #6#)
                                              (PROGN
                                                (LETT |val|
                                                 (CAR #6#) . #10#)
                                                NIL))
                                             #11#))
                                          (SEQ
                                           (EXIT
                                            (LETT |tp|
                                             (CONS
                                              (|ACPLOT;makePt| |val|
                                               |yMaxSF| $)
                                              |tp|) . #10#)))
                                          (LETT #6# (CDR #6#) . #10#)
                                          #12# G191 (EXIT NIL))))))
                                    (LETT |bran| NIL . #10#)
                                    (COND
                                      ((< |depVarMinSF| |leftVal|)
                                       (COND
                                         ((< |leftVal| |depVarMaxSF|)
                                          (LETT |lo|
                                           |indVarMinSF| . #10#))
                                         ((NULL |topList|)
                                          (COND
                                            ((NULL |botList|)
                                             (PROGN
                                               (LETT #7#
                                                (VECTOR |p| |x| |y|
                                                 |xMin| |xMax| |yMin|
                                                 |yMax|
                                                 (VECTOR |lf| |rt| |bt|
                                                  |tp|)
                                                 |htans| |vtans|
                                                 |bran|) . #10#)
                                               (GO #7#)))
                                            ('T
                                             (SEQ
                                              (LETT |lo|
                                               (|SPADfirst| |botList|) . #10#)
                                              (EXIT
                                               (LETT |botList|
                                                (CDR |botList|) . #10#))))))
                                         ((NULL |botList|)
                                          (SEQ
                                           (LETT |lo|
                                            (|SPADfirst| |topList|) . #10#)
                                           (EXIT
                                            (LETT |topList|
                                             (CDR |topList|) . #10#))))
                                         ('T
                                          (SEQ
                                           (LETT |bot|
                                            (|SPADfirst| |botList|) . #10#)
                                           (LETT |top|
                                            (|SPADfirst| |topList|) . #10#)
                                           (EXIT
                                            (COND
                                              ((< |bot| |top|)
                                               (SEQ
                                                (LETT |lo|
                                                 |bot| . #10#)
                                                (EXIT
                                                 (LETT |botList|
                                                  (CDR |botList|) . #10#))))
                                              ('T
                                               (SEQ
                                                (LETT |lo|
                                                 |top| . #10#)
                                                (EXIT
                                                 (LETT |topList|
                                                  (CDR |topList|) . #10#))))))))))
                                      ((NULL |topList|)
                                       (COND
                                         ((NULL |botList|)
                                          (PROGN
                                            (LETT #7#
                                             (VECTOR |p| |x| |y| |xMin|
                                              |xMax| |yMin| |yMax|
                                              (VECTOR |lf| |rt| |bt|
                                               |tp|)
                                              |htans| |vtans| |bran|) . #10#)
                                            (GO #7#)))
                                         ('T
                                          (SEQ
                                           (LETT |lo|
                                            (|SPADfirst| |botList|) . #10#)
                                           (EXIT
                                            (LETT |botList|
                                             (CDR |botList|) . #10#))))))
                                      ((NULL |botList|)
                                       (SEQ
                                        (LETT |lo|
                                         (|SPADfirst| |topList|) . #10#)
                                        (EXIT
                                         (LETT |topList|
                                          (CDR |topList|) . #10#))))
                                      ('T
                                       (SEQ
                                        (LETT |bot|
                                         (|SPADfirst| |botList|) . #10#)
                                        (LETT |top|
                                         (|SPADfirst| |topList|) . #10#)
                                        (EXIT
                                         (COND
                                           ((< |bot| |top|)
                                            (SEQ
                                             (LETT |lo| |bot| . #10#)
                                             (EXIT
                                              (LETT |botList|
                                               (CDR |botList|) . #10#))))
                                           ('T
                                            (SEQ
                                             (LETT |lo| |top| . #10#)
                                             (EXIT
                                              (LETT |topList|
                                               (CDR |topList|) . #10#)))))))))
                                    (LETT |hi| 0.0 . #10#)
                                    (COND
                                      ((< |depVarMinSF| |rightVal|)
                                       (COND
                                         ((< |rightVal| |depVarMaxSF|)
                                          (LETT |hi|
                                           |indVarMaxSF| . #10#))
                                         ((NULL |topList|)
                                          (COND
                                            ((NULL |botList|)
                                             (|error|
                                              "makeRatFcnSketch: plot domain"))
                                            ('T
                                             (SEQ
                                              (LETT |hi|
                                               (SPADCALL |botList|
                                                (QREFELT $ 106)) . #10#)
                                              (EXIT
                                               (LETT |botList|
                                                (SPADCALL |hi|
                                                 |botList|
                                                 (QREFELT $ 107)) . #10#))))))
                                         ((NULL |botList|)
                                          (SEQ
                                           (LETT |hi|
                                            (SPADCALL |topList|
                                             (QREFELT $ 106)) . #10#)
                                           (EXIT
                                            (LETT |topList|
                                             (SPADCALL |hi| |topList|
                                              (QREFELT $ 107)) . #10#))))
                                         ('T
                                          (SEQ
                                           (LETT |bot|
                                            (SPADCALL |botList|
                                             (QREFELT $ 106)) . #10#)
                                           (LETT |top|
                                            (SPADCALL |topList|
                                             (QREFELT $ 106)) . #10#)
                                           (EXIT
                                            (COND
                                              ((< |top| |bot|)
                                               (SEQ
                                                (LETT |hi|
                                                 |bot| . #10#)
                                                (EXIT
                                                 (LETT |botList|
                                                  (SPADCALL |hi|
                                                   |botList|
                                                   (QREFELT $ 107)) . #10#))))
                                              ('T
                                               (SEQ
                                                (LETT |hi|
                                                 |top| . #10#)
                                                (EXIT
                                                 (LETT |topList|
                                                  (SPADCALL |hi|
                                                   |topList|
                                                   (QREFELT $ 107)) . #10#))))))))))
                                      ((NULL |topList|)
                                       (COND
                                         ((NULL |botList|)
                                          (|error|
                                           "makeRatFcnSketch: plot domain"))
                                         ('T
                                          (SEQ
                                           (LETT |hi|
                                            (SPADCALL |botList|
                                             (QREFELT $ 106)) . #10#)
                                           (EXIT
                                            (LETT |botList|
                                             (SPADCALL |hi| |botList|
                                              (QREFELT $ 107)) . #10#))))))
                                      ((NULL |botList|)
                                       (SEQ
                                        (LETT |hi|
                                         (SPADCALL |topList|
                                          (QREFELT $ 106)) . #10#)
                                        (EXIT
                                         (LETT |topList|
                                          (SPADCALL |hi| |topList|
                                           (QREFELT $ 107)) . #10#))))
                                      ('T
                                       (SEQ
                                        (LETT |bot|
                                         (SPADCALL |botList|
                                          (QREFELT $ 106)) . #10#)
                                        (LETT |top|
                                         (SPADCALL |topList|
                                          (QREFELT $ 106)) . #10#)
                                        (EXIT
                                         (COND
                                           ((< |top| |bot|)
                                            (SEQ
                                             (LETT |hi| |bot| . #10#)
                                             (EXIT
                                              (LETT |botList|
                                               (SPADCALL |hi| |botList|
                                                (QREFELT $ 107)) . #10#))))
                                           ('T
                                            (SEQ
                                             (LETT |hi| |top| . #10#)
                                             (EXIT
                                              (LETT |topList|
                                               (SPADCALL |hi| |topList|
                                                (QREFELT $ 107)) . #10#)))))))))
                                    (COND
                                      ((EQUAL |depVar| |x|)
                                       (SEQ
                                        (LETT |minSF| |xMinSF| . #10#)
                                        (EXIT
                                         (LETT |maxSF| |xMaxSF| . #10#))))
                                      ('T
                                       (SEQ
                                        (LETT |minSF| |yMinSF| . #10#)
                                        (EXIT
                                         (LETT |maxSF| |yMaxSF| . #10#)))))
                                    (LETT |segList| NIL . #10#)
                                    (SEQ
                                     (EXIT
                                      (SEQ G190 NIL
                                       (SEQ
                                        (LETT |segInfo|
                                         (|ACPLOT;segmentInfo| |f| |lo|
                                          |hi| |botList| |topList|
                                          |singList| |minSF| |maxSF| $) . #10#)
                                        (LETT |segList|
                                         (CONS (QVELT |segInfo| 0)
                                          |segList|) . #10#)
                                        (LETT |lo|
                                         (QVELT |segInfo| 1) . #10#)
                                        (LETT |botList|
                                         (QVELT |segInfo| 2) . #10#)
                                        (LETT |topList|
                                         (QVELT |segInfo| 3) . #10#)
                                        (EXIT
                                         (COND
                                           ((= |lo| |hi|)
                                            (PROGN
                                              (LETT #8#
                                               |$NoValue| . #10#)
                                              (GO #8#))))))
                                       NIL #12# G191 (EXIT NIL)))
                                     #8# (EXIT #8#))
                                    (SEQ (LETT |segment| NIL . #10#)
                                     (LETT #9# |segList| . #10#) G190
                                     (COND
                                       ((OR (ATOM #9#)
                                         (PROGN
                                           (LETT |segment|
                                            (CAR #9#) . #10#)
                                           NIL))
                                        #11#))
                                     (SEQ
                                      (LETT |RFPlot|
                                       (SPADCALL |f| |segment|
                                        (QREFELT $ 110)) . #10#)
                                      (LETT |curve|
                                       (|SPADfirst|
                                        (SPADCALL |RFPlot|
                                         (QREFELT $ 112))) . #10#)
                                      (EXIT
                                       (COND
                                         ((EQUAL |depVar| |y|)
                                          (LETT |bran|
                                           (CONS |curve| |bran|) . #10#))
                                         ('T
                                          (LETT |bran|
                                           (CONS
                                            (SPADCALL
                                             (CONS
                                              (|function|
                                               |ACPLOT;swapCoords|)
                                              $)
                                             |curve| (QREFELT $ 115))
                                            |bran|) . #10#)))))
                                     (LETT #9# (CDR #9#) . #10#) #12#
                                     G191 (EXIT NIL))
                                    (EXIT
                                     (VECTOR |p| |x| |y| |xMin| |xMax|
                                      |yMin| |yMax|
                                      (VECTOR |lf| |rt| |bt| |tp|)
                                      |htans| |vtans| |bran|))))))))
           #7# (EXIT #7#))))) 

(DEFUN |ACPLOT;makeRatFcnSketch!3| (|#1| |#2| $)
  (SPADCALL |#1| |#2| (QREFELT $ 100))) 

(DEFUN |ACPLOT;makeRatFcnSketch!2| (|#1| |#2| $)
  (SPADCALL |#1| |#2| (QREFELT $ 100))) 

(DEFUN |ACPLOT;makeRatFcnSketch!1| (|#1| |#2| $)
  (SPADCALL |#1| |#2| (QREFELT $ 100))) 

(DEFUN |ACPLOT;makeRatFcnSketch!0| (|#1| $$)
  (PROG ($)
    (LETT $ (QREFELT $$ 1) |ACPLOT;makeRatFcnSketch|)
    (RETURN
      (PROGN
        (SPADCALL (SPADCALL (QREFELT $$ 2) |#1| (QREFELT $ 95))
            (SPADCALL (QREFELT $$ 0) |#1| (QREFELT $ 95))
            (QREFELT $ 96)))))) 

(DEFUN |ACPLOT;makeGeneralSketch|
       (|pol| |x| |y| |xMin| |xMax| |yMin| |yMax| $)
  (PROG (|factoredPol| |p| |dpdx| |dpdy| |singPts| |htanPts| |vtanPts|
            |critPts| |hInc| |vInc| |xMinNF| |xMaxNF| |yMinNF| |foo|
            |yMaxNF| |htans| |vtans| |crits| |xMinSF| |xMaxSF| |yMinSF|
            |yMaxSF| |corners| |pSF| |dpdxSF| |dpdySF| |delta| |err|
            |bound| |pRN| |lf| |rt| |bt| |tp| |bdPts| |bran|)
    (RETURN
      (SEQ (LETT |factoredPol| (SPADCALL |pol| (QREFELT $ 91))
                 . #0=(|ACPLOT;makeGeneralSketch|))
           (EXIT (COND
                   ((< 1 (SPADCALL |factoredPol| (QREFELT $ 92)))
                    (|error| "reducible polynomial"))
                   ('T
                    (SEQ (LETT |p|
                               (SPADCALL |factoredPol| 1
                                   (QREFELT $ 116)) . #0#)
                         (LETT |dpdx|
                               (SPADCALL |p| |x| (QREFELT $ 93)) . #0#)
                         (LETT |dpdy|
                               (SPADCALL |p| |y| (QREFELT $ 93)) . #0#)
                         (LETT |xMinNF|
                               (|ACPLOT;RNtoNF| |xMin| $) . #0#)
                         (LETT |xMaxNF|
                               (|ACPLOT;RNtoNF| |xMax| $) . #0#)
                         (LETT |yMinNF|
                               (|ACPLOT;RNtoNF| |yMin| $) . #0#)
                         (LETT |yMaxNF|
                               (|ACPLOT;RNtoNF| |yMax| $) . #0#)
                         (LETT |singPts|
                               (SPADCALL (LIST |p| |dpdx| |dpdy|)
                                   (LIST |x| |y|) (QREFELT $ 12)
                                   (QREFELT $ 99)) . #0#)
                         (LETT |foo|
                               (CONS #'|ACPLOT;makeGeneralSketch!0|
                                     (VECTOR $ |yMaxNF| |yMinNF|
                                      |xMaxNF| |xMinNF|)) . #0#)
                         (EXIT (COND
                                 ((|ACPLOT;ptsSuchThat?| |singPts|
                                      |foo| $)
                                  (|error| "singular pts in region of sketch"))
                                 ('T
                                  (SEQ (LETT |htanPts|
                                        (SPADCALL (LIST |p| |dpdx|)
                                         (LIST |x| |y|) (QREFELT $ 12)
                                         (QREFELT $ 99)) . #0#)
                                       (LETT |vtanPts|
                                        (SPADCALL (LIST |p| |dpdy|)
                                         (LIST |x| |y|) (QREFELT $ 12)
                                         (QREFELT $ 99)) . #0#)
                                       (LETT |critPts|
                                        (APPEND |htanPts| |vtanPts|) . #0#)
                                       (LETT |hInc|
                                        (SPADCALL
                                         (SPADCALL 1 20
                                          (QREFELT $ 117))
                                         (SPADCALL |xMax| |xMin|
                                          (QREFELT $ 118))
                                         (QREFELT $ 119)) . #0#)
                                       (LETT |vInc|
                                        (SPADCALL
                                         (SPADCALL 1 20
                                          (QREFELT $ 117))
                                         (SPADCALL |yMax| |yMin|
                                          (QREFELT $ 118))
                                         (QREFELT $ 119)) . #0#)
                                       (LETT |foo|
                                        (CONS
                                         #'|ACPLOT;makeGeneralSketch!1|
                                         (VECTOR $ |xMinNF| |yMaxNF|
                                          |yMinNF|)) . #0#)
                                       (COND
                                         ((|ACPLOT;ptsSuchThat?|
                                           |critPts| |foo| $)
                                          (SEQ
                                           (LETT |xMin|
                                            (|ACPLOT;newX| |critPts|
                                             |singPts| |yMinNF|
                                             |yMaxNF| |xMinNF| |xMin|
                                             (SPADCALL |hInc|
                                              (QREFELT $ 120))
                                             $) . #0#)
                                           (EXIT
                                            (LETT |xMinNF|
                                             (|ACPLOT;RNtoNF| |xMin| $) . #0#)))))
                                       (LETT |foo|
                                        (CONS
                                         #'|ACPLOT;makeGeneralSketch!2|
                                         (VECTOR $ |xMaxNF| |yMaxNF|
                                          |yMinNF|)) . #0#)
                                       (COND
                                         ((|ACPLOT;ptsSuchThat?|
                                           |critPts| |foo| $)
                                          (SEQ
                                           (LETT |xMax|
                                            (|ACPLOT;newX| |critPts|
                                             |singPts| |yMinNF|
                                             |yMaxNF| |xMaxNF| |xMax|
                                             |hInc| $) . #0#)
                                           (EXIT
                                            (LETT |xMaxNF|
                                             (|ACPLOT;RNtoNF| |xMax| $) . #0#)))))
                                       (LETT |foo|
                                        (CONS
                                         #'|ACPLOT;makeGeneralSketch!3|
                                         (VECTOR $ |yMinNF| |xMaxNF|
                                          |xMinNF|)) . #0#)
                                       (COND
                                         ((|ACPLOT;ptsSuchThat?|
                                           |critPts| |foo| $)
                                          (SEQ
                                           (LETT |yMin|
                                            (|ACPLOT;newY| |critPts|
                                             |singPts| |xMinNF|
                                             |xMaxNF| |yMinNF| |yMin|
                                             (SPADCALL |vInc|
                                              (QREFELT $ 120))
                                             $) . #0#)
                                           (EXIT
                                            (LETT |yMinNF|
                                             (|ACPLOT;RNtoNF| |yMin| $) . #0#)))))
                                       (LETT |foo|
                                        (CONS
                                         #'|ACPLOT;makeGeneralSketch!4|
                                         (VECTOR $ |yMaxNF| |xMaxNF|
                                          |xMinNF|)) . #0#)
                                       (COND
                                         ((|ACPLOT;ptsSuchThat?|
                                           |critPts| |foo| $)
                                          (SEQ
                                           (LETT |yMax|
                                            (|ACPLOT;newY| |critPts|
                                             |singPts| |xMinNF|
                                             |xMaxNF| |yMaxNF| |yMax|
                                             |vInc| $) . #0#)
                                           (EXIT
                                            (LETT |yMaxNF|
                                             (|ACPLOT;RNtoNF| |yMax| $) . #0#)))))
                                       (LETT |htans|
                                        (|ACPLOT;listPtsInRect|
                                         |htanPts| |xMinNF| |xMaxNF|
                                         |yMinNF| |yMaxNF| $) . #0#)
                                       (LETT |vtans|
                                        (|ACPLOT;listPtsInRect|
                                         |vtanPts| |xMinNF| |xMaxNF|
                                         |yMinNF| |yMaxNF| $) . #0#)
                                       (LETT |crits|
                                        (APPEND |htans| |vtans|) . #0#)
                                       (LETT |xMinSF|
                                        (|ACPLOT;RNtoSF| |xMin| $) . #0#)
                                       (LETT |xMaxSF|
                                        (|ACPLOT;RNtoSF| |xMax| $) . #0#)
                                       (LETT |yMinSF|
                                        (|ACPLOT;RNtoSF| |yMin| $) . #0#)
                                       (LETT |yMaxSF|
                                        (|ACPLOT;RNtoSF| |yMax| $) . #0#)
                                       (LETT |corners|
                                        (|ACPLOT;makeCorners| |xMinSF|
                                         |xMaxSF| |yMinSF| |yMaxSF| $) . #0#)
                                       (LETT |pSF|
                                        (|ACPLOT;coerceCoefsToSFs| |p|
                                         $) . #0#)
                                       (LETT |dpdxSF|
                                        (|ACPLOT;coerceCoefsToSFs|
                                         |dpdx| $) . #0#)
                                       (LETT |dpdySF|
                                        (|ACPLOT;coerceCoefsToSFs|
                                         |dpdy| $) . #0#)
                                       (LETT |delta|
                                        (MIN
                                         (/ (- |xMaxSF| |xMinSF|) 25)
                                         (/ (- |yMaxSF| |yMinSF|) 25)) . #0#)
                                       (LETT |err|
                                        (MIN (/ |delta| 100)
                                         (/ (QREFELT $ 15) 100)) . #0#)
                                       (LETT |bound| 10 . #0#)
                                       (LETT |pRN|
                                        (|ACPLOT;coerceCoefsToRNs| |p|
                                         $) . #0#)
                                       (LETT |lf|
                                        (|ACPLOT;listPtsOnVertBdry|
                                         |pRN| |x| |xMin| |yMinNF|
                                         |yMaxNF| $) . #0#)
                                       (LETT |rt|
                                        (|ACPLOT;listPtsOnVertBdry|
                                         |pRN| |x| |xMax| |yMinNF|
                                         |yMaxNF| $) . #0#)
                                       (LETT |bt|
                                        (|ACPLOT;listPtsOnHorizBdry|
                                         |pRN| |y| |yMin| |xMinNF|
                                         |xMaxNF| $) . #0#)
                                       (LETT |tp|
                                        (|ACPLOT;listPtsOnHorizBdry|
                                         |pRN| |y| |yMax| |xMinNF|
                                         |xMaxNF| $) . #0#)
                                       (LETT |bdPts|
                                        (VECTOR |lf| |rt| |bt| |tp|) . #0#)
                                       (LETT |bran|
                                        (|ACPLOT;traceBranches| |pSF|
                                         |dpdxSF| |dpdySF| |x| |y|
                                         |corners| |delta| |err|
                                         |bound| |crits| |bdPts| $) . #0#)
                                       (EXIT
                                        (VECTOR |p| |x| |y| |xMin|
                                         |xMax| |yMin| |yMax| |bdPts|
                                         |htans| |vtans| |bran|)))))))))))))) 

(DEFUN |ACPLOT;makeGeneralSketch!4| (|#1| $$)
  (|ACPLOT;onHorzSeg?| |#1| (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;makeGeneralSketch!3| (|#1| $$)
  (|ACPLOT;onHorzSeg?| |#1| (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;makeGeneralSketch!2| (|#1| $$)
  (|ACPLOT;onVertSeg?| |#1| (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;makeGeneralSketch!1| (|#1| $$)
  (|ACPLOT;onVertSeg?| |#1| (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;makeGeneralSketch!0| (|#1| $$)
  (|ACPLOT;inRect?| |#1| (QREFELT $$ 4) (QREFELT $$ 3) (QREFELT $$ 2)
      (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |ACPLOT;refine;$Df$;34| (|plot| |stepFraction| $)
  (PROG (|p| |x| |y| |dpdx| |dpdy| |xMin| |xMax| |yMin| |yMax| |xMinSF|
             |xMaxSF| |yMinSF| |yMaxSF| |corners| |pSF| |dpdxSF|
             |dpdySF| |delta| |err| |bound| |crits| |bdPts| |bran|
             |htans| |vtans|)
    (RETURN
      (SEQ (LETT |p| (QVELT |plot| 0) . #0=(|ACPLOT;refine;$Df$;34|))
           (LETT |x| (QVELT |plot| 1) . #0#)
           (LETT |y| (QVELT |plot| 2) . #0#)
           (LETT |dpdx| (SPADCALL |p| |x| (QREFELT $ 93)) . #0#)
           (LETT |dpdy| (SPADCALL |p| |y| (QREFELT $ 93)) . #0#)
           (LETT |pSF| (|ACPLOT;coerceCoefsToSFs| |p| $) . #0#)
           (LETT |dpdxSF| (|ACPLOT;coerceCoefsToSFs| |dpdx| $) . #0#)
           (LETT |dpdySF| (|ACPLOT;coerceCoefsToSFs| |dpdy| $) . #0#)
           (LETT |xMin| (QVELT |plot| 3) . #0#)
           (LETT |xMax| (QVELT |plot| 4) . #0#)
           (LETT |yMin| (QVELT |plot| 5) . #0#)
           (LETT |yMax| (QVELT |plot| 6) . #0#)
           (LETT |xMinSF| (|ACPLOT;RNtoSF| |xMin| $) . #0#)
           (LETT |xMaxSF| (|ACPLOT;RNtoSF| |xMax| $) . #0#)
           (LETT |yMinSF| (|ACPLOT;RNtoSF| |yMin| $) . #0#)
           (LETT |yMaxSF| (|ACPLOT;RNtoSF| |yMax| $) . #0#)
           (LETT |corners|
                 (|ACPLOT;makeCorners| |xMinSF| |xMaxSF| |yMinSF|
                     |yMaxSF| $) . #0#)
           (LETT |pSF| (|ACPLOT;coerceCoefsToSFs| |p| $) . #0#)
           (LETT |dpdxSF| (|ACPLOT;coerceCoefsToSFs| |dpdx| $) . #0#)
           (LETT |dpdySF| (|ACPLOT;coerceCoefsToSFs| |dpdy| $) . #0#)
           (LETT |delta|
                 (* |stepFraction|
                    (MIN (/ (- |xMaxSF| |xMinSF|) 25)
                         (/ (- |yMaxSF| |yMinSF|) 25))) . #0#)
           (LETT |err|
                 (MIN (/ |delta| 100) (/ (QREFELT $ 15) 100)) . #0#)
           (LETT |bound| 10 . #0#)
           (LETT |crits|
                 (APPEND (QVELT |plot| 8) (QVELT |plot| 9)) . #0#)
           (LETT |bdPts| (QVELT |plot| 7) . #0#)
           (LETT |bran|
                 (|ACPLOT;traceBranches| |pSF| |dpdxSF| |dpdySF| |x|
                     |y| |corners| |delta| |err| |bound| |crits|
                     |bdPts| $) . #0#)
           (LETT |htans| (QVELT |plot| 8) . #0#)
           (LETT |vtans| (QVELT |plot| 9) . #0#)
           (EXIT (VECTOR |p| |x| |y| |xMin| |xMax| |yMin| |yMax|
                         |bdPts| |htans| |vtans| |bran|)))))) 

(DEFUN |ACPLOT;traceBranches|
       (|pSF| |dpdxSF| |dpdySF| |x| |y| |corners| |delta| |err| |bound|
              |crits| |bdPts| $)
  (PROG (|lf| |rt| |tp| |bt| |p0| |bdry| |pt| |segInfo| |bran|)
    (RETURN
      (SEQ (LETT |lf| (QVELT |bdPts| 0) . #0=(|ACPLOT;traceBranches|))
           (LETT |rt| (QVELT |bdPts| 1) . #0#)
           (LETT |tp| (QVELT |bdPts| 3) . #0#)
           (LETT |bt| (QVELT |bdPts| 2) . #0#)
           (LETT |bdry|
                 (APPEND (APPEND |lf| |rt|) (APPEND |bt| |tp|)) . #0#)
           (LETT |bran| NIL . #0#)
           (SEQ G190
                (COND
                  ((NULL (COND ((NULL |bdry|) 'NIL) ('T 'T)))
                   #1=(GO G191)))
                (SEQ (LETT |pt| (|SPADfirst| |bdry|) . #0#)
                     (LETT |p0|
                           (|ACPLOT;dummyFirstPt| |pt| |dpdxSF|
                               |dpdySF| |x| |y| |lf| |rt| |bt| |tp| $) . #0#)
                     (LETT |segInfo|
                           (|ACPLOT;listPtsOnSegment| |pSF| |dpdxSF|
                               |dpdySF| |x| |y| |p0| |pt| |corners|
                               |delta| |err| |bound| |crits| |bdry| $) . #0#)
                     (LETT |bran|
                           (CONS (|SPADfirst| |segInfo|) |bran|) . #0#)
                     (LETT |crits|
                           (SPADCALL |segInfo| (QREFELT $ 123)) . #0#)
                     (EXIT (LETT |bdry|
                                 (SPADCALL |segInfo| (QREFELT $ 124)) . #0#)))
                NIL #2=(GO G190) G191 (EXIT NIL))
           (SEQ G190
                (COND
                  ((NULL (COND ((NULL |crits|) 'NIL) ('T 'T))) #1#))
                (SEQ (LETT |pt| (|SPADfirst| |crits|) . #0#)
                     (LETT |segInfo|
                           (|ACPLOT;listPtsOnLoop| |pSF| |dpdxSF|
                               |dpdySF| |x| |y| |pt| |corners| |delta|
                               |err| |bound| |crits| |bdry| $) . #0#)
                     (LETT |bran|
                           (CONS (|SPADfirst| |segInfo|) |bran|) . #0#)
                     (EXIT (LETT |crits|
                                 (SPADCALL |segInfo| (QREFELT $ 123)) . #0#)))
                NIL #2# G191 (EXIT NIL))
           (EXIT |bran|))))) 

(DEFUN |ACPLOT;dummyFirstPt|
       (|p1| |dpdxSF| |dpdySF| |x| |y| |lf| |rt| |bt| |tp| $)
  (PROG (|x1| |y1| |zero| |one| |px| |py|)
    (RETURN
      (SEQ (LETT |x1| (SPADCALL |p1| (QREFELT $ 28))
                 . #0=(|ACPLOT;dummyFirstPt|))
           (LETT |y1| (SPADCALL |p1| (QREFELT $ 27)) . #0#)
           (LETT |zero| 0.0 . #0#) (LETT |one| 1.0 . #0#)
           (LETT |px|
                 (SPADCALL
                     (SPADCALL |dpdxSF| (LIST |x| |y|) (LIST |x1| |y1|)
                         (QREFELT $ 125))
                     (QREFELT $ 126)) . #0#)
           (LETT |py|
                 (SPADCALL
                     (SPADCALL |dpdySF| (LIST |x| |y|) (LIST |x1| |y1|)
                         (QREFELT $ 125))
                     (QREFELT $ 126)) . #0#)
           (EXIT (COND
                   ((< (* |px| |py|) |zero|)
                    (COND
                      ((OR (SPADCALL |p1| |lf| (QREFELT $ 127))
                           (SPADCALL |p1| |bt| (QREFELT $ 127)))
                       (|ACPLOT;makePt| (- |x1| |one|) (- |y1| |one|)
                           $))
                      ('T
                       (|ACPLOT;makePt| (+ |x1| |one|) (+ |y1| |one|)
                           $))))
                   ((OR (SPADCALL |p1| |lf| (QREFELT $ 127))
                        (SPADCALL |p1| |tp| (QREFELT $ 127)))
                    (|ACPLOT;makePt| (- |x1| |one|) (+ |y1| |one|) $))
                   ('T
                    (|ACPLOT;makePt| (+ |x1| |one|) (- |y1| |one|) $)))))))) 

(DEFUN |ACPLOT;listPtsOnSegment|
       (|pSF| |dpdxSF| |dpdySF| |x| |y| |p0| |p1| |corners| |delta|
              |err| |bound| |crits| |bdry| $)
  (PROG (|pt0| |pt1| |ptInfo| |p2| #0=#:G2091 |pointList|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |bdry|
                            (SPADCALL |p1| |bdry| (QREFELT $ 128))
                            . #1=(|ACPLOT;listPtsOnSegment|))
                      (LETT |pointList| (LIST |p1|) . #1#)
                      (LETT |ptInfo|
                            (|ACPLOT;computeNextPt| |pSF| |dpdxSF|
                                |dpdySF| |x| |y| |p0| |p1| |corners|
                                |delta| |err| |bound| |crits| |bdry| $) . #1#)
                      (LETT |p2| (QCAR |ptInfo|) . #1#)
                      (EXIT (COND
                              ((EQUAL (QCDR |ptInfo|) (QREFELT $ 17))
                               (SEQ (LETT |bdry|
                                     (SPADCALL |p2| |bdry|
                                      (QREFELT $ 128)) . #1#)
                                    (LETT |pointList|
                                     (CONS |p2| |pointList|) . #1#)
                                    (EXIT
                                     (LIST |pointList| |crits| |bdry|))))
                              ('T
                               (SEQ (COND
                                      ((EQUAL (QCDR |ptInfo|)
                                        (QREFELT $ 18))
                                       (LETT |crits|
                                        (SPADCALL |p2| |crits|
                                         (QREFELT $ 128)) . #1#)))
                                    (LETT |pointList|
                                     (CONS |p2| |pointList|) . #1#)
                                    (SEQ G190 NIL
                                     (SEQ
                                      (LETT |pt0|
                                       (SPADCALL |pointList|
                                        (QREFELT $ 129)) . #1#)
                                      (LETT |pt1|
                                       (|SPADfirst| |pointList|) . #1#)
                                      (LETT |ptInfo|
                                       (|ACPLOT;computeNextPt| |pSF|
                                        |dpdxSF| |dpdySF| |x| |y| |pt0|
                                        |pt1| |corners| |delta| |err|
                                        |bound| |crits| |bdry| $) . #1#)
                                      (LETT |p2| (QCAR |ptInfo|) . #1#)
                                      (EXIT
                                       (COND
                                         ((EQUAL (QCDR |ptInfo|)
                                           (QREFELT $ 17))
                                          (SEQ
                                           (LETT |bdry|
                                            (SPADCALL |p2| |bdry|
                                             (QREFELT $ 128)) . #1#)
                                           (LETT |pointList|
                                            (CONS |p2| |pointList|) . #1#)
                                           (EXIT
                                            (PROGN
                                              (LETT #0#
                                               (LIST |pointList|
                                                |crits| |bdry|) . #1#)
                                              (GO #0#)))))
                                         ('T
                                          (SEQ
                                           (COND
                                             ((EQUAL (QCDR |ptInfo|)
                                               (QREFELT $ 18))
                                              (LETT |crits|
                                               (SPADCALL |p2| |crits|
                                                (QREFELT $ 128)) . #1#)))
                                           (EXIT
                                            (LETT |pointList|
                                             (CONS |p2| |pointList|) . #1#)))))))
                                     NIL (GO G190) G191 (EXIT NIL))
                                    (EXIT
                                     (LIST |pointList| |crits| |bdry|))))))))
           #0# (EXIT #0#))))) 

(DEFUN |ACPLOT;listPtsOnLoop|
       (|pSF| |dpdxSF| |dpdySF| |x| |y| |p1| |corners| |delta| |err|
              |bound| |crits| |bdry| $)
  (PROG (|x1| |y1| |px| |py| |p0| |pt0| |pt1| |ptInfo| |p2| #0=#:G2104
              |pointList|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |x1| (SPADCALL |p1| (QREFELT $ 28))
                            . #1=(|ACPLOT;listPtsOnLoop|))
                      (LETT |y1| (SPADCALL |p1| (QREFELT $ 27)) . #1#)
                      (LETT |px|
                            (SPADCALL
                                (SPADCALL |dpdxSF| (LIST |x| |y|)
                                    (LIST |x1| |y1|) (QREFELT $ 125))
                                (QREFELT $ 126)) . #1#)
                      (LETT |py|
                            (SPADCALL
                                (SPADCALL |dpdySF| (LIST |x| |y|)
                                    (LIST |x1| |y1|) (QREFELT $ 125))
                                (QREFELT $ 126)) . #1#)
                      (LETT |p0|
                            (|ACPLOT;makePt| (- |x1| 1.0) (- |y1| 1.0)
                                $) . #1#)
                      (LETT |pointList| (LIST |p1|) . #1#)
                      (LETT |ptInfo|
                            (|ACPLOT;computeNextPt| |pSF| |dpdxSF|
                                |dpdySF| |x| |y| |p0| |p1| |corners|
                                |delta| |err| |bound| |crits| |bdry| $) . #1#)
                      (LETT |p2| (QCAR |ptInfo|) . #1#)
                      (EXIT (COND
                              ((EQUAL (QCDR |ptInfo|) (QREFELT $ 17))
                               (|error| "boundary reached while on loop"))
                              ('T
                               (SEQ (COND
                                      ((EQUAL (QCDR |ptInfo|)
                                        (QREFELT $ 18))
                                       (COND
                                         ((SPADCALL |p1| |p2|
                                           (QREFELT $ 130))
                                          (|error|
                                           "first and second points on loop are identical"))
                                         ('T
                                          (LETT |crits|
                                           (SPADCALL |p2| |crits|
                                            (QREFELT $ 128)) . #1#)))))
                                    (LETT |pointList|
                                     (CONS |p2| |pointList|) . #1#)
                                    (SEQ G190 NIL
                                     (SEQ
                                      (LETT |pt0|
                                       (SPADCALL |pointList|
                                        (QREFELT $ 129)) . #1#)
                                      (LETT |pt1|
                                       (|SPADfirst| |pointList|) . #1#)
                                      (LETT |ptInfo|
                                       (|ACPLOT;computeNextPt| |pSF|
                                        |dpdxSF| |dpdySF| |x| |y| |pt0|
                                        |pt1| |corners| |delta| |err|
                                        |bound| |crits| |bdry| $) . #1#)
                                      (LETT |p2| (QCAR |ptInfo|) . #1#)
                                      (EXIT
                                       (COND
                                         ((EQUAL (QCDR |ptInfo|)
                                           (QREFELT $ 17))
                                          (|error|
                                           "boundary reached while on loop"))
                                         ('T
                                          (SEQ
                                           (COND
                                             ((EQUAL (QCDR |ptInfo|)
                                               (QREFELT $ 18))
                                              (SEQ
                                               (LETT |crits|
                                                (SPADCALL |p2| |crits|
                                                 (QREFELT $ 128)) . #1#)
                                               (EXIT
                                                (COND
                                                  ((SPADCALL |p1| |p2|
                                                    (QREFELT $ 130))
                                                   (SEQ
                                                    (LETT |pointList|
                                                     (CONS |p2|
                                                      |pointList|) . #1#)
                                                    (EXIT
                                                     (PROGN
                                                       (LETT #0#
                                                        (LIST
                                                         |pointList|
                                                         |crits|
                                                         |bdry|) . #1#)
                                                       (GO #0#))))))))))
                                           (EXIT
                                            (LETT |pointList|
                                             (CONS |p2| |pointList|) . #1#)))))))
                                     NIL (GO G190) G191 (EXIT NIL))
                                    (EXIT
                                     (LIST |pointList| |crits| |bdry|))))))))
           #0# (EXIT #0#))))) 

(DEFUN |ACPLOT;computeNextPt|
       (|pSF| |dpdxSF| |dpdySF| |x| |y| |p0| |p1| |corners| |delta|
              |err| |bound| |crits| |bdry| $)
  (PROG (|xMinSF| |xMaxSF| |yMinSF| |yMaxSF| |x0| |y0| |x1| |y1| |px|
            |py| |deltaX| |incVar0| |deltaY| |x2Approxx| |y2Approxx|
            #0=#:G2160 |xx| |yy| |xPointList| |xLo| |xHi| |yPointList|
            |yLo| |yHi| |y2Temp| |x2Temp| |pt1| |pt2| |critPt1|
            |critPt2| #1=#:G2131 |incVar| |lookingFor| |x2Approx|
            |y2Approx| |y2New| |y2| |f| |x2New| #2=#:G2159 |x2| |pt|
            |bdryPt| |critPt|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |xMinSF| (|ACPLOT;getXMin| |corners| $)
                            . #3=(|ACPLOT;computeNextPt|))
                      (LETT |xMaxSF|
                            (|ACPLOT;getXMax| |corners| $) . #3#)
                      (LETT |yMinSF|
                            (|ACPLOT;getYMin| |corners| $) . #3#)
                      (LETT |yMaxSF|
                            (|ACPLOT;getYMax| |corners| $) . #3#)
                      (LETT |x0| (SPADCALL |p0| (QREFELT $ 28)) . #3#)
                      (LETT |y0| (SPADCALL |p0| (QREFELT $ 27)) . #3#)
                      (LETT |x1| (SPADCALL |p1| (QREFELT $ 28)) . #3#)
                      (LETT |y1| (SPADCALL |p1| (QREFELT $ 27)) . #3#)
                      (LETT |px|
                            (SPADCALL
                                (SPADCALL |dpdxSF| (LIST |x| |y|)
                                    (LIST |x1| |y1|) (QREFELT $ 125))
                                (QREFELT $ 126)) . #3#)
                      (LETT |py|
                            (SPADCALL
                                (SPADCALL |dpdySF| (LIST |x| |y|)
                                    (LIST |x1| |y1|) (QREFELT $ 125))
                                (QREFELT $ 126)) . #3#)
                      (COND
                        ((< (FLOAT-SIGN 1.0 |px|)
                            (FLOAT-SIGN 1.0 |py|))
                         (SEQ (LETT |incVar0|
                                    (LETT |incVar| |x| . #3#) . #3#)
                              (LETT |deltaX|
                                    (COND
                                      ((< |x0| |x1|) |delta|)
                                      ('T (- |delta|))) . #3#)
                              (LETT |x2Approx| (+ |x1| |deltaX|) . #3#)
                              (EXIT (LETT |y2Approx|
                                     (+ |y1|
                                      (* (- (/ |px| |py|)) |deltaX|)) . #3#))))
                        ('T
                         (SEQ (LETT |incVar0|
                                    (LETT |incVar| |y| . #3#) . #3#)
                              (LETT |deltaY|
                                    (COND
                                      ((< |y0| |y1|) |delta|)
                                      ('T (- |delta|))) . #3#)
                              (LETT |x2Approx|
                                    (+ |x1|
                                     (* (- (/ |py| |px|)) |deltaY|)) . #3#)
                              (EXIT (LETT |y2Approx|
                                     (+ |y1| |deltaY|) . #3#)))))
                      (LETT |lookingFor| (QREFELT $ 16) . #3#)
                      (COND
                        ((< |x2Approx| |xMaxSF|)
                         (COND
                           ((NULL (< |xMinSF| |x2Approx|))
                            (SEQ (LETT |incVar| |x| . #3#)
                                 (LETT |lookingFor|
                                       (QREFELT $ 17) . #3#)
                                 (LETT |x2Approx| |xMinSF| . #3#)
                                 (EXIT (LETT |y2Approx|
                                        (+ |y1|
                                         (* (- (/ |px| |py|))
                                          (- |x2Approx| |x1|))) . #3#))))))
                        (#4='T
                         (SEQ (LETT |incVar| |x| . #3#)
                              (LETT |lookingFor| (QREFELT $ 17) . #3#)
                              (LETT |x2Approx| |xMaxSF| . #3#)
                              (EXIT (LETT |y2Approx|
                                     (+ |y1|
                                      (* (- (/ |px| |py|))
                                       (- |x2Approx| |x1|))) . #3#)))))
                      (COND
                        ((< |y2Approx| |yMaxSF|)
                         (COND
                           ((NULL (< |yMinSF| |y2Approx|))
                            (SEQ (LETT |incVar| |y| . #3#)
                                 (LETT |lookingFor|
                                       (QREFELT $ 17) . #3#)
                                 (LETT |y2Approx| |yMinSF| . #3#)
                                 (EXIT (LETT |x2Approx|
                                        (+ |x1|
                                         (* (- (/ |py| |px|))
                                          (- |y2Approx| |y1|))) . #3#))))))
                        (#4#
                         (SEQ (LETT |incVar| |y| . #3#)
                              (LETT |lookingFor| (QREFELT $ 17) . #3#)
                              (LETT |y2Approx| |yMaxSF| . #3#)
                              (EXIT (LETT |x2Approx|
                                     (+ |x1|
                                      (* (- (/ |py| |px|))
                                       (- |y2Approx| |y1|))) . #3#)))))
                      (COND
                        ((< |x1| |x2Approx|)
                         (SEQ (LETT |xLo| |x1| . #3#)
                              (EXIT (LETT |xHi| |x2Approx| . #3#))))
                        (#4#
                         (SEQ (LETT |xLo| |x2Approx| . #3#)
                              (EXIT (LETT |xHi| |x1| . #3#)))))
                      (COND
                        ((< |y1| |y2Approx|)
                         (SEQ (LETT |yLo| |y1| . #3#)
                              (EXIT (LETT |yHi| |y2Approx| . #3#))))
                        (#4#
                         (SEQ (LETT |yLo| |y2Approx| . #3#)
                              (EXIT (LETT |yHi| |y1| . #3#)))))
                      (LETT |x2Approxx| |x2Approx| . #3#)
                      (LETT |y2Approxx| |y2Approx| . #3#)
                      (LETT |xPointList| NIL . #3#)
                      (LETT |yPointList| NIL . #3#)
                      (SEQ (LETT |pt| NIL . #3#)
                           (LETT #0# |crits| . #3#) G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |pt| (CAR #0#) . #3#)
                                    NIL))
                              (GO G191)))
                           (SEQ (LETT |xx|
                                      (SPADCALL |pt| (QREFELT $ 28)) . #3#)
                                (LETT |yy|
                                      (SPADCALL |pt| (QREFELT $ 27)) . #3#)
                                (COND
                                  ((= |xx| |x2Approx|)
                                   (COND
                                     ((NULL (= |xx| |x1|))
                                      (COND
                                        ((<
                                          (MIN
                                           (FLOAT-SIGN 1.0
                                            (- |yy| |yLo|))
                                           (FLOAT-SIGN 1.0
                                            (- |yy| |yHi|)))
                                          |delta|)
                                         (LETT |xPointList|
                                          (CONS |pt| |xPointList|) . #3#)))))))
                                (COND
                                  ((< |xLo| |xx|)
                                   (COND
                                     ((< |xx| |xHi|)
                                      (COND
                                        ((<
                                          (MIN
                                           (FLOAT-SIGN 1.0
                                            (- |yy| |yLo|))
                                           (FLOAT-SIGN 1.0
                                            (- |yy| |yHi|)))
                                          |delta|)
                                         (SEQ
                                          (LETT |xPointList|
                                           (CONS |pt| NIL) . #3#)
                                          (LETT |x2Approx| |xx| . #3#)
                                          (EXIT
                                           (COND
                                             ((< |xx| |x1|)
                                              (LETT |xLo| |xx| . #3#))
                                             ('T
                                              (LETT |xHi| |xx| . #3#)))))))))))
                                (COND
                                  ((= |yy| |y2Approx|)
                                   (COND
                                     ((NULL (= |yy| |y1|))
                                      (LETT |yPointList|
                                       (CONS |pt| |yPointList|) . #3#)))))
                                (EXIT (COND
                                        ((< |yLo| |yy|)
                                         (COND
                                           ((< |yy| |yHi|)
                                            (COND
                                              ((<
                                                (MIN
                                                 (FLOAT-SIGN 1.0
                                                  (- |xx| |xLo|))
                                                 (FLOAT-SIGN 1.0
                                                  (- |xx| |xHi|)))
                                                |delta|)
                                               (SEQ
                                                (LETT |yPointList|
                                                 (CONS |pt| NIL) . #3#)
                                                (LETT |y2Approx|
                                                 |yy| . #3#)
                                                (EXIT
                                                 (COND
                                                   ((< |yy| |y1|)
                                                    (LETT |yLo|
                                                     |yy| . #3#))
                                                   ('T
                                                    (LETT |yHi|
                                                     |yy| . #3#)))))))))))))
                           (LETT #0# (CDR #0#) . #3#) (GO G190) G191
                           (EXIT NIL))
                      (COND
                        ((NULL (NULL |xPointList|))
                         (COND
                           ((NULL (NULL |yPointList|))
                            (COND
                              ((SPADCALL |xPointList| |yPointList|
                                   (QREFELT $ 131))
                               (SEQ (LETT |incVar| |incVar0| . #3#)
                                    (COND
                                      ((EQUAL |incVar| |x|)
                                       (LETT |y2Approx|
                                        (+ |y1|
                                         (* (- (/ |px| |py|))
                                          (- |x2Approx| |x1|))) . #3#))
                                      (#4#
                                       (LETT |x2Approx|
                                        (+ |x1|
                                         (* (- (/ |py| |px|))
                                          (- |y2Approx| |y1|))) . #3#)))
                                    (EXIT
                                     (LETT |lookingFor|
                                      (QREFELT $ 18) . #3#))))
                              ((EQUAL |incVar0| |x|)
                               (SEQ (LETT |x2Temp|
                                     (+ |x1|
                                      (* (- (/ |py| |px|))
                                       (- |y2Approx| |y1|))) . #3#)
                                    (LETT |f|
                                     (|ACPLOT;SFPolyToUPoly|
                                      (SPADCALL |pSF| |y| |y2Approx|
                                       (QREFELT $ 132))
                                      $) . #3#)
                                    (LETT |x2New|
                                     (|ACPLOT;newtonApprox| |f|
                                      |x2Temp| |err| |bound| $) . #3#)
                                    (EXIT
                                     (COND
                                       ((QEQCAR |x2New| 1)
                                        (SEQ
                                         (LETT |y2Approx|
                                          (+ |y1|
                                           (* (- (/ |px| |py|))
                                            (- |x2Approx| |x1|))) . #3#)
                                         (LETT |incVar| |x| . #3#)
                                         (EXIT
                                          (LETT |lookingFor|
                                           (QREFELT $ 18) . #3#))))
                                       (#4#
                                        (SEQ
                                         (LETT |y2Temp|
                                          (+ |y1|
                                           (* (- (/ |px| |py|))
                                            (- |x2Approx| |x1|))) . #3#)
                                         (LETT |f|
                                          (|ACPLOT;SFPolyToUPoly|
                                           (SPADCALL |pSF| |x|
                                            |x2Approx| (QREFELT $ 132))
                                           $) . #3#)
                                         (LETT |y2New|
                                          (|ACPLOT;newtonApprox| |f|
                                           |y2Temp| |err| |bound| $) . #3#)
                                         (EXIT
                                          (COND
                                            ((QEQCAR |y2New| 1)
                                             (PROGN
                                               (LETT #2#
                                                (|ACPLOT;computeNextPt|
                                                 |pSF| |dpdxSF|
                                                 |dpdySF| |x| |y| |p0|
                                                 |p1| |corners|
                                                 (FLOAT-SIGN 1.0
                                                  (/
                                                   (- |x2Approx| |x1|)
                                                   2))
                                                 |err| |bound| |crits|
                                                 |bdry| $) . #3#)
                                               (GO #2#)))
                                            (#4#
                                             (SEQ
                                              (LETT |pt1|
                                               (|ACPLOT;makePt|
                                                |x2Approx|
                                                (QCDR |y2New|) $) . #3#)
                                              (LETT |pt2|
                                               (|ACPLOT;makePt|
                                                (QCDR |x2New|)
                                                |y2Approx| $) . #3#)
                                              (LETT |critPt1|
                                               (|ACPLOT;findPtOnList|
                                                |pt1| |crits| $) . #3#)
                                              (LETT |critPt2|
                                               (|ACPLOT;findPtOnList|
                                                |pt2| |crits| $) . #3#)
                                              (COND
                                                ((QEQCAR |critPt1| 1)
                                                 (COND
                                                   ((QEQCAR |critPt2|
                                                     1)
                                                    (EXIT
                                                     (COND
                                                       ((<
                                                         (FLOAT-SIGN
                                                          1.0
                                                          (- |x2Temp|
                                                           |x1|))
                                                         (FLOAT-SIGN
                                                          1.0
                                                          (- |x2Approx|
                                                           |x1|)))
                                                        (PROGN
                                                          (LETT #2#
                                                           (CONS |pt1|
                                                            (QREFELT $
                                                             16)) . #3#)
                                                          (GO #2#)))
                                                       ('T
                                                        (PROGN
                                                          (LETT #2#
                                                           (CONS |pt2|
                                                            (QREFELT $
                                                             16)) . #3#)
                                                          (GO #2#)))))))))
                                              (EXIT
                                               (COND
                                                 ((QEQCAR |critPt1| 1)
                                                  (PROGN
                                                    (LETT #2#
                                                     (CONS
                                                      (PROG2
                                                       (LETT #1#
                                                        |critPt2| . #3#)
                                                       (QCDR #1#)
                                                        (|check-union|
                                                         (QEQCAR #1# 0)
                                                         (|Point|
                                                          (|DoubleFloat|))
                                                         #1#))
                                                      (QREFELT $ 18)) . #3#)
                                                    (GO #2#)))
                                                 ((QEQCAR |critPt2| 1)
                                                  (PROGN
                                                    (LETT #2#
                                                     (CONS
                                                      (QCDR |critPt1|)
                                                      (QREFELT $ 18)) . #3#)
                                                    (GO #2#)))
                                                 (#4#
                                                  (COND
                                                    ((<
                                                      (FLOAT-SIGN 1.0
                                                       (- |x2Temp|
                                                        |x1|))
                                                      (FLOAT-SIGN 1.0
                                                       (- |x2Approx|
                                                        |x1|)))
                                                     (PROGN
                                                       (LETT #2#
                                                        (CONS
                                                         (QCDR
                                                          |critPt2|)
                                                         (QREFELT $ 18)) . #3#)
                                                       (GO #2#)))
                                                    ('T
                                                     (PROGN
                                                       (LETT #2#
                                                        (CONS
                                                         (QCDR
                                                          |critPt1|)
                                                         (QREFELT $ 18)) . #3#)
                                                       (GO #2#)))))))))))))))))
                              (#4#
                               (SEQ (LETT |y2Temp|
                                     (+ |y1|
                                      (* (- (/ |px| |py|))
                                       (- |x2Approx| |x1|))) . #3#)
                                    (LETT |f|
                                     (|ACPLOT;SFPolyToUPoly|
                                      (SPADCALL |pSF| |x| |x2Approx|
                                       (QREFELT $ 132))
                                      $) . #3#)
                                    (LETT |y2New|
                                     (|ACPLOT;newtonApprox| |f|
                                      |y2Temp| |err| |bound| $) . #3#)
                                    (EXIT
                                     (COND
                                       ((QEQCAR |y2New| 1)
                                        (SEQ
                                         (LETT |x2Approx|
                                          (+ |x1|
                                           (* (- (/ |py| |px|))
                                            (- |y2Approx| |y1|))) . #3#)
                                         (LETT |incVar| |y| . #3#)
                                         (EXIT
                                          (LETT |lookingFor|
                                           (QREFELT $ 18) . #3#))))
                                       (#4#
                                        (SEQ
                                         (LETT |x2Temp|
                                          (+ |x1|
                                           (* (- (/ |py| |px|))
                                            (- |y2Approx| |y1|))) . #3#)
                                         (LETT |f|
                                          (|ACPLOT;SFPolyToUPoly|
                                           (SPADCALL |pSF| |y|
                                            |y2Approx| (QREFELT $ 132))
                                           $) . #3#)
                                         (LETT |x2New|
                                          (|ACPLOT;newtonApprox| |f|
                                           |x2Temp| |err| |bound| $) . #3#)
                                         (EXIT
                                          (COND
                                            ((QEQCAR |x2New| 1)
                                             (PROGN
                                               (LETT #2#
                                                (|ACPLOT;computeNextPt|
                                                 |pSF| |dpdxSF|
                                                 |dpdySF| |x| |y| |p0|
                                                 |p1| |corners|
                                                 (FLOAT-SIGN 1.0
                                                  (/
                                                   (- |y2Approx| |y1|)
                                                   2))
                                                 |err| |bound| |crits|
                                                 |bdry| $) . #3#)
                                               (GO #2#)))
                                            (#4#
                                             (SEQ
                                              (LETT |pt1|
                                               (|ACPLOT;makePt|
                                                |x2Approx|
                                                (QCDR |y2New|) $) . #3#)
                                              (LETT |pt2|
                                               (|ACPLOT;makePt|
                                                (QCDR |x2New|)
                                                |y2Approx| $) . #3#)
                                              (LETT |critPt1|
                                               (|ACPLOT;findPtOnList|
                                                |pt1| |crits| $) . #3#)
                                              (LETT |critPt2|
                                               (|ACPLOT;findPtOnList|
                                                |pt2| |crits| $) . #3#)
                                              (COND
                                                ((QEQCAR |critPt1| 1)
                                                 (COND
                                                   ((QEQCAR |critPt2|
                                                     1)
                                                    (EXIT
                                                     (COND
                                                       ((<
                                                         (FLOAT-SIGN
                                                          1.0
                                                          (- |y2Temp|
                                                           |y1|))
                                                         (FLOAT-SIGN
                                                          1.0
                                                          (- |y2Approx|
                                                           |y1|)))
                                                        (PROGN
                                                          (LETT #2#
                                                           (CONS |pt2|
                                                            (QREFELT $
                                                             16)) . #3#)
                                                          (GO #2#)))
                                                       ('T
                                                        (PROGN
                                                          (LETT #2#
                                                           (CONS |pt1|
                                                            (QREFELT $
                                                             16)) . #3#)
                                                          (GO #2#)))))))))
                                              (EXIT
                                               (COND
                                                 ((QEQCAR |critPt1| 1)
                                                  (PROGN
                                                    (LETT #2#
                                                     (CONS
                                                      (PROG2
                                                       (LETT #1#
                                                        |critPt2| . #3#)
                                                       (QCDR #1#)
                                                        (|check-union|
                                                         (QEQCAR #1# 0)
                                                         (|Point|
                                                          (|DoubleFloat|))
                                                         #1#))
                                                      (QREFELT $ 18)) . #3#)
                                                    (GO #2#)))
                                                 ((QEQCAR |critPt2| 1)
                                                  (PROGN
                                                    (LETT #2#
                                                     (CONS
                                                      (QCDR |critPt1|)
                                                      (QREFELT $ 18)) . #3#)
                                                    (GO #2#)))
                                                 (#4#
                                                  (COND
                                                    ((<
                                                      (FLOAT-SIGN 1.0
                                                       (- |y2Temp|
                                                        |y1|))
                                                      (FLOAT-SIGN 1.0
                                                       (- |y2Approx|
                                                        |y1|)))
                                                     (PROGN
                                                       (LETT #2#
                                                        (CONS
                                                         (QCDR
                                                          |critPt1|)
                                                         (QREFELT $ 18)) . #3#)
                                                       (GO #2#)))
                                                    ('T
                                                     (PROGN
                                                       (LETT #2#
                                                        (CONS
                                                         (QCDR
                                                          |critPt2|)
                                                         (QREFELT $ 18)) . #3#)
                                                       (GO #2#))))))))))))))))))))))
                      (COND
                        ((NULL (NULL |xPointList|))
                         (COND
                           ((NULL |yPointList|)
                            (SEQ (LETT |y2Approx|
                                       (+ |y1|
                                        (* (- (/ |px| |py|))
                                         (- |x2Approx| |x1|))) . #3#)
                                 (EXIT (COND
                                         ((EQUAL |incVar0| |x|)
                                          (SEQ
                                           (LETT |incVar| |x| . #3#)
                                           (EXIT
                                            (LETT |lookingFor|
                                             (QREFELT $ 18) . #3#))))
                                         (#4#
                                          (SEQ
                                           (LETT |f|
                                            (|ACPLOT;SFPolyToUPoly|
                                             (SPADCALL |pSF| |x|
                                              |x2Approx|
                                              (QREFELT $ 132))
                                             $) . #3#)
                                           (LETT |y2New|
                                            (|ACPLOT;newtonApprox| |f|
                                             |y2Approx| |err| |bound|
                                             $) . #3#)
                                           (EXIT
                                            (COND
                                              ((QEQCAR |y2New| 1)
                                               (SEQ
                                                (LETT |x2Approx|
                                                 |x2Approxx| . #3#)
                                                (EXIT
                                                 (LETT |y2Approx|
                                                  |y2Approxx| . #3#))))
                                              (#4#
                                               (SEQ
                                                (LETT |pt|
                                                 (|ACPLOT;makePt|
                                                  |x2Approx|
                                                  (QCDR |y2New|) $) . #3#)
                                                (LETT |critPt|
                                                 (|ACPLOT;findPtOnList|
                                                  |pt| |crits| $) . #3#)
                                                (EXIT
                                                 (COND
                                                   ((QEQCAR |critPt| 1)
                                                    (PROGN
                                                      (LETT #2#
                                                       (CONS |pt|
                                                        (QREFELT $ 16)) . #3#)
                                                      (GO #2#)))
                                                   (#4#
                                                    (PROGN
                                                      (LETT #2#
                                                       (CONS
                                                        (QCDR |critPt|)
                                                        (QREFELT $ 18)) . #3#)
                                                      (GO #2#))))))))))))))))))
                      (COND
                        ((NULL |xPointList|)
                         (COND
                           ((NULL (NULL |yPointList|))
                            (SEQ (LETT |x2Approx|
                                       (+ |x1|
                                        (* (- (/ |py| |px|))
                                         (- |y2Approx| |y1|))) . #3#)
                                 (EXIT (COND
                                         ((EQUAL |incVar0| |y|)
                                          (SEQ
                                           (LETT |incVar| |y| . #3#)
                                           (EXIT
                                            (LETT |lookingFor|
                                             (QREFELT $ 18) . #3#))))
                                         (#4#
                                          (SEQ
                                           (LETT |f|
                                            (|ACPLOT;SFPolyToUPoly|
                                             (SPADCALL |pSF| |y|
                                              |y2Approx|
                                              (QREFELT $ 132))
                                             $) . #3#)
                                           (LETT |x2New|
                                            (|ACPLOT;newtonApprox| |f|
                                             |x2Approx| |err| |bound|
                                             $) . #3#)
                                           (EXIT
                                            (COND
                                              ((QEQCAR |x2New| 1)
                                               (SEQ
                                                (LETT |x2Approx|
                                                 |x2Approxx| . #3#)
                                                (EXIT
                                                 (LETT |y2Approx|
                                                  |y2Approxx| . #3#))))
                                              (#4#
                                               (SEQ
                                                (LETT |pt|
                                                 (|ACPLOT;makePt|
                                                  (QCDR |x2New|)
                                                  |y2Approx| $) . #3#)
                                                (LETT |critPt|
                                                 (|ACPLOT;findPtOnList|
                                                  |pt| |crits| $) . #3#)
                                                (EXIT
                                                 (COND
                                                   ((QEQCAR |critPt| 1)
                                                    (PROGN
                                                      (LETT #2#
                                                       (CONS |pt|
                                                        (QREFELT $ 16)) . #3#)
                                                      (GO #2#)))
                                                   (#4#
                                                    (PROGN
                                                      (LETT #2#
                                                       (CONS
                                                        (QCDR |critPt|)
                                                        (QREFELT $ 18)) . #3#)
                                                      (GO #2#))))))))))))))))))
                      (COND
                        ((EQUAL |incVar| |x|)
                         (SEQ (LETT |x2| |x2Approx| . #3#)
                              (LETT |f|
                                    (|ACPLOT;SFPolyToUPoly|
                                     (SPADCALL |pSF| |x| |x2|
                                      (QREFELT $ 132))
                                     $) . #3#)
                              (LETT |y2New|
                                    (|ACPLOT;newtonApprox| |f|
                                     |y2Approx| |err| |bound| $) . #3#)
                              (EXIT (COND
                                      ((QEQCAR |y2New| 1)
                                       (PROGN
                                         (LETT #2#
                                          (|ACPLOT;computeNextPt| |pSF|
                                           |dpdxSF| |dpdySF| |x| |y|
                                           |p0| |p1| |corners|
                                           (FLOAT-SIGN 1.0
                                            (/ (- |x2| |x1|) 2))
                                           |err| |bound| |crits| |bdry|
                                           $) . #3#)
                                         (GO #2#)))
                                      (#4#
                                       (LETT |y2| (QCDR |y2New|) . #3#))))))
                        (#4#
                         (SEQ (LETT |y2| |y2Approx| . #3#)
                              (LETT |f|
                                    (|ACPLOT;SFPolyToUPoly|
                                     (SPADCALL |pSF| |y| |y2|
                                      (QREFELT $ 132))
                                     $) . #3#)
                              (LETT |x2New|
                                    (|ACPLOT;newtonApprox| |f|
                                     |x2Approx| |err| |bound| $) . #3#)
                              (EXIT (COND
                                      ((QEQCAR |x2New| 1)
                                       (PROGN
                                         (LETT #2#
                                          (|ACPLOT;computeNextPt| |pSF|
                                           |dpdxSF| |dpdySF| |x| |y|
                                           |p0| |p1| |corners|
                                           (FLOAT-SIGN 1.0
                                            (/ (- |y2| |y1|) 2))
                                           |err| |bound| |crits| |bdry|
                                           $) . #3#)
                                         (GO #2#)))
                                      (#4#
                                       (LETT |x2| (QCDR |x2New|) . #3#)))))))
                      (LETT |pt| (|ACPLOT;makePt| |x2| |y2| $) . #3#)
                      (EXIT (COND
                              ((EQUAL |lookingFor| (QREFELT $ 16))
                               (CONS |pt| |lookingFor|))
                              ((EQUAL |lookingFor| (QREFELT $ 17))
                               (SEQ (LETT |bdryPt|
                                     (|ACPLOT;findPtOnList| |pt| |bdry|
                                      $) . #3#)
                                    (EXIT
                                     (COND
                                       ((QEQCAR |bdryPt| 1)
                                        (|error|
                                         "couldn't find boundary point"))
                                       (#4#
                                        (CONS (QCDR |bdryPt|)
                                         (QREFELT $ 17)))))))
                              (#4#
                               (SEQ (LETT |critPt|
                                     (|ACPLOT;findPtOnList| |pt|
                                      |crits| $) . #3#)
                                    (EXIT
                                     (COND
                                       ((QEQCAR |critPt| 1)
                                        (CONS |pt| (QREFELT $ 16)))
                                       (#4#
                                        (CONS (QCDR |critPt|)
                                         (QREFELT $ 18)))))))))))
           #2# (EXIT #2#))))) 

(DEFUN |ACPLOT;newtonApprox| (|f| |a0| |err| |bound| $)
  (PROG (|Df| #0=#:G2167 |oldApprox| |newApprox| |i|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |Df| (SPADCALL |f| (QREFELT $ 133))
                            . #1=(|ACPLOT;newtonApprox|))
                      (LETT |oldApprox| |a0| . #1#)
                      (LETT |newApprox|
                            (- |a0|
                               (/ (SPADCALL |f| |a0| (QREFELT $ 95))
                                  (SPADCALL |Df| |a0| (QREFELT $ 95)))) . #1#)
                      (LETT |i| 1 . #1#)
                      (SEQ G190
                           (COND
                             ((NULL (< |err|
                                     (FLOAT-SIGN 1.0
                                      (- |newApprox| |oldApprox|))))
                              (GO G191)))
                           (SEQ (EXIT (COND
                                        ((EQL |i| |bound|)
                                         (PROGN
                                           (LETT #0#
                                            (CONS 1 "failed") . #1#)
                                           (GO #0#)))
                                        ('T
                                         (SEQ
                                          (LETT |oldApprox|
                                           |newApprox| . #1#)
                                          (LETT |newApprox|
                                           (- |oldApprox|
                                            (/
                                             (SPADCALL |f| |oldApprox|
                                              (QREFELT $ 95))
                                             (SPADCALL |Df| |oldApprox|
                                              (QREFELT $ 95)))) . #1#)
                                          (EXIT
                                           (LETT |i| (+ |i| 1) . #1#)))))))
                           NIL (GO G190) G191 (EXIT NIL))
                      (EXIT (CONS 0 |newApprox|))))
           #0# (EXIT #0#))))) 

(PUT '|ACPLOT;listBranches;$L;41| '|SPADreplace|
     '(XLAM (|acplot|) (QVELT |acplot| 10))) 

(DEFUN |ACPLOT;listBranches;$L;41| (|acplot| $) (QVELT |acplot| 10)) 

(DEFUN |ACPLOT;coerce;$Of;42| (|acplot| $)
  (PROG (|pp| |xx| |yy| |xLo| |xHi| |yLo| |yHi| |zip| |com| |les| |l|
              |branch| #0=#:G2174 #1=#:G2175 |p| #2=#:G2176 |ll| |f|
              |ff|)
    (RETURN
      (SEQ (LETT |pp| (SPADCALL (QVELT |acplot| 0) (QREFELT $ 136))
                 . #3=(|ACPLOT;coerce;$Of;42|))
           (LETT |xx|
                 (SPADCALL (QVELT |acplot| 1) (QREFELT $ 137)) . #3#)
           (LETT |yy|
                 (SPADCALL (QVELT |acplot| 2) (QREFELT $ 137)) . #3#)
           (LETT |xLo|
                 (SPADCALL (QVELT |acplot| 3) (QREFELT $ 138)) . #3#)
           (LETT |xHi|
                 (SPADCALL (QVELT |acplot| 4) (QREFELT $ 138)) . #3#)
           (LETT |yLo|
                 (SPADCALL (QVELT |acplot| 5) (QREFELT $ 138)) . #3#)
           (LETT |yHi|
                 (SPADCALL (QVELT |acplot| 6) (QREFELT $ 138)) . #3#)
           (LETT |zip| (SPADCALL " = 0" (QREFELT $ 140)) . #3#)
           (LETT |com| (SPADCALL ",   " (QREFELT $ 140)) . #3#)
           (LETT |les| (SPADCALL " <= " (QREFELT $ 140)) . #3#)
           (LETT |l|
                 (LIST |pp| |zip| |com| |xLo| |les| |xx| |les| |xHi|
                       |com| |yLo| |les| |yy| |les| |yHi|) . #3#)
           (LETT |f| NIL . #3#)
           (SEQ (LETT |branch| NIL . #3#)
                (LETT #0# (QVELT |acplot| 10) . #3#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |branch| (CAR #0#) . #3#) NIL))
                   #4=(GO G191)))
                (SEQ (LETT |ll|
                           (PROGN
                             (LETT #1# NIL . #3#)
                             (SEQ (LETT |p| NIL . #3#)
                                  (LETT #2# |branch| . #3#) G190
                                  (COND
                                    ((OR (ATOM #2#)
                                      (PROGN
                                        (LETT |p| (CAR #2#) . #3#)
                                        NIL))
                                     #4#))
                                  (SEQ (EXIT
                                        (LETT #1#
                                         (CONS
                                          (SPADCALL |p|
                                           (QREFELT $ 141))
                                          #1#) . #3#)))
                                  (LETT #2# (CDR #2#) . #3#)
                                  #5=(GO G190) G191
                                  (EXIT (NREVERSE0 #1#)))) . #3#)
                     (EXIT (LETT |f|
                                 (CONS (SPADCALL |ll| (QREFELT $ 143))
                                       |f|) . #3#)))
                (LETT #0# (CDR #0#) . #3#) #5# G191 (EXIT NIL))
           (LETT |ff|
                 (SPADCALL (SPADCALL |l| (QREFELT $ 144))
                     (SPADCALL |f| (QREFELT $ 143)) (QREFELT $ 145)) . #3#)
           (EXIT (SPADCALL (SPADCALL "ACPLOT" (QREFELT $ 140)) |ff|
                     (QREFELT $ 145))))))) 

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

(DEFUN |PlaneAlgebraicCurvePlot;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|PlaneAlgebraicCurvePlot|)
              . #0=(|PlaneAlgebraicCurvePlot|))
        (LETT $ (GETREFV 147) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|PlaneAlgebraicCurvePlot| NIL
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6
            (|Record| (|:| |poly| (|Polynomial| (|Integer|)))
                (|:| |xVar| (|Symbol|)) (|:| |yVar| (|Symbol|))
                (|:| |minXVal| (|Fraction| (|Integer|)))
                (|:| |maxXVal| (|Fraction| (|Integer|)))
                (|:| |minYVal| (|Fraction| (|Integer|)))
                (|:| |maxYVal| (|Fraction| (|Integer|)))
                (|:| |bdryPts|
                     (|Record| (|:| |left|
                                    (|List| (|Point| (|DoubleFloat|))))
                               (|:| |right|
                                    (|List| (|Point| (|DoubleFloat|))))
                               (|:| |bottom|
                                    (|List| (|Point| (|DoubleFloat|))))
                               (|:| |top|
                                    (|List| (|Point| (|DoubleFloat|))))))
                (|:| |hTanPts| (|List| (|Point| (|DoubleFloat|))))
                (|:| |vTanPts| (|List| (|Point| (|DoubleFloat|))))
                (|:| |branches|
                     (|List| (|List| (|Point| (|DoubleFloat|)))))))
        (QSETREFV $ 12 (SPADCALL 1 -6 10 (QREFELT $ 11)))
        (QSETREFV $ 15 (SPADCALL 1 -3 10 (QREFELT $ 14)))
        (QSETREFV $ 16 "nothing in particular")
        (QSETREFV $ 17 "boundary point")
        (QSETREFV $ 18 "critical point")
        (QSETREFV $ 19 "bottom")
        (QSETREFV $ 20 "top")
        $)))) 

(MAKEPROP '|PlaneAlgebraicCurvePlot| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL '|Rep| (|Float|) (0 . |One|)
             (|Integer|) (|PositiveInteger|) (4 . |float|) 'EPSILON
             (|DoubleFloat|) (11 . |float|) 'PLOTERR 'NADA 'BDRY 'CRIT
             'BOTTOM 'TOP (18 . |Zero|) (22 . |convert|) (|List| 13)
             (|Point| 13) (27 . |point|) (|PointPackage| 13)
             (32 . |yCoord|) (37 . |xCoord|) (|Boolean|)
             (|Polynomial| 13) (42 . |zero?|)
             (|SparseUnivariatePolynomial| 13) (47 . |Zero|)
             (51 . |leadingCoefficient|) (|NonNegativeInteger|)
             (56 . |totalDegree|) (61 . |monomial|) (67 . |reductum|)
             (72 . +) (|Polynomial| 44) (78 . |zero?|)
             (|SparseUnivariatePolynomial| 44) (83 . |Zero|)
             (|Fraction| 9) (87 . |leadingCoefficient|)
             (92 . |totalDegree|) (97 . |monomial|) (103 . |reductum|)
             (108 . +) (114 . |coerce|) (|Mapping| 13 9)
             (|Polynomial| 9) (|PolynomialFunctions2| 9 13)
             (119 . |map|) (125 . |coerce|) (|Mapping| 44 9)
             (|PolynomialFunctions2| 9 44) (130 . |map|)
             (136 . |coerce|) (141 . |coerce|) (146 . |convert|)
             (|Symbol|) (151 . |eval|) (|List| 7) (|RealSolvePackage|)
             (158 . |solve|) (164 . <) (170 . |second|) (175 . =)
             (181 . +) (187 . |max|) (193 . |min|) (199 . /) (205 . +)
             (|Segment| 44) (211 . |lo|) (216 . |hi|) (221 . <)
             (|List| 62) (227 . |variables|) (232 . |member?|)
             (238 . |totalDegree|) (243 . |degree|)
             |ACPLOT;makeSketch;P2S2S$;27| (249 . |solve|)
             (255 . |coefficient|) (262 . |ground|) (|Segment| 13)
             (267 . |segment|) (|Factored| 52) (273 . |coerce|)
             (278 . |numberOfFactors|) (283 . |differentiate|)
             (289 . -) (294 . |elt|) (300 . /) (|List| 64) (|List| 52)
             (306 . |realSolve|) (313 . <) (|Mapping| 29 13 13)
             (319 . |sort|) (325 . |elt|) (331 . |Zero|) (335 . =)
             (341 . |last|) (346 . |remove|) (|Mapping| 13 13) (|Plot|)
             (352 . |plot|) (|List| 114) (358 . |listBranches|)
             (|Mapping| 24 24) (|List| 24) (363 . |map|)
             (369 . |nthFactor|) (375 . /) (381 . -) (387 . *)
             (393 . -) (398 . |min|) |ACPLOT;refine;$Df$;34|
             (402 . |second|) (407 . |third|) (412 . |eval|)
             (419 . |ground|) (424 . |member?|) (430 . |remove|)
             (436 . |second|) (441 . =) (447 . =) (453 . |eval|)
             (460 . |differentiate|) |ACPLOT;listBranches;$L;41|
             (|OutputForm|) (465 . |coerce|) (470 . |coerce|)
             (475 . |coerce|) (|String|) (480 . |message|)
             (485 . |coerce|) (|List| $) (490 . |vconcat|)
             (495 . |hconcat|) (500 . |vconcat|)
             |ACPLOT;coerce;$Of;42|)
          '#(|yRange| 506 |xRange| 511 |refine| 516 |makeSketch| 522
             |listBranches| 531 |coerce| 536)
          'NIL
          (CONS (|makeByteWordVec2| 1 '(0 0))
                (CONS '#(NIL NIL)
                      (CONS '#((|PlottablePlaneCurveCategory|)
                               (|CoercibleTo| 135))
                            (|makeByteWordVec2| 146
                                '(0 7 0 8 3 7 0 9 9 10 11 3 13 0 9 9 10
                                  14 0 7 0 21 1 7 13 0 22 1 24 0 23 25
                                  1 26 13 24 27 1 26 13 24 28 1 30 29 0
                                  31 0 32 0 33 1 30 13 0 34 1 30 35 0
                                  36 2 32 0 13 35 37 1 30 0 0 38 2 32 0
                                  0 0 39 1 40 29 0 41 0 42 0 43 1 40 44
                                  0 45 1 40 35 0 46 2 42 0 44 35 47 1
                                  40 0 0 48 2 42 0 0 0 49 1 13 0 9 50 2
                                  53 30 51 52 54 1 44 0 9 55 2 57 40 56
                                  52 58 1 13 0 44 59 1 7 0 44 60 1 7 0
                                  13 61 3 40 0 0 62 44 63 2 65 64 40 7
                                  66 2 7 29 0 0 67 1 64 7 0 68 2 7 29 0
                                  0 69 2 7 0 0 0 70 2 7 0 0 0 71 2 7 0
                                  0 0 72 2 44 0 0 0 73 2 44 0 0 0 74 1
                                  75 44 0 76 1 75 44 0 77 2 44 29 0 0
                                  78 1 52 79 0 80 2 79 29 62 0 81 1 52
                                  35 0 82 2 52 35 0 62 83 2 65 64 52 7
                                  85 3 52 0 0 62 35 86 1 52 9 0 87 2 88
                                  0 13 13 89 1 90 0 52 91 1 90 35 0 92
                                  2 52 0 0 62 93 1 52 0 0 94 2 32 13 0
                                  13 95 2 13 0 0 0 96 3 65 97 98 79 7
                                  99 2 13 29 0 0 100 2 23 0 101 0 102 2
                                  42 44 0 44 103 0 44 0 104 2 44 29 0 0
                                  105 1 23 13 0 106 2 23 0 13 0 107 2
                                  109 0 108 88 110 1 109 111 0 112 2
                                  114 0 113 0 115 2 90 52 0 9 116 2 44
                                  0 9 9 117 2 44 0 0 0 118 2 44 0 0 0
                                  119 1 44 0 0 120 0 7 0 121 1 111 114
                                  0 123 1 111 114 0 124 3 30 0 0 79 23
                                  125 1 30 13 0 126 2 114 29 24 0 127 2
                                  114 0 24 0 128 1 114 24 0 129 2 24 29
                                  0 0 130 2 114 29 0 0 131 3 30 0 0 62
                                  13 132 1 32 0 0 133 1 52 135 0 136 1
                                  62 135 0 137 1 44 135 0 138 1 135 0
                                  139 140 1 24 135 0 141 1 135 0 142
                                  143 1 135 0 142 144 2 135 0 0 0 145 1
                                  0 88 0 1 1 0 88 0 1 2 0 0 0 13 122 5
                                  0 0 52 62 62 75 75 84 1 0 111 0 134 1
                                  0 135 0 146)))))
          '|lookupComplete|)) 

(MAKEPROP '|PlaneAlgebraicCurvePlot| 'NILADIC T) 
