
(/VERSIONCHECK 2) 

(DEFUN |SCRT;colinearity;2$Df;1| (|x| |y| $)
  (DIV-DF (EXPT-DF-I (SPADCALL |x| |y| (QREFELT $ 8)) 2)
          (MUL-DF (SPADCALL |x| |x| (QREFELT $ 8))
                  (SPADCALL |y| |y| (QREFELT $ 8))))) 

(DEFUN |SCRT;sipnt;2I$;2| (|a| |b| $)
  (SPADCALL (FLOAT |a| MOST-POSITIVE-DOUBLE-FLOAT)
            (FLOAT |b| MOST-POSITIVE-DOUBLE-FLOAT) (QREFELT $ 10))) 

(DEFUN |SCRT;sipnt;3I$;3| (|a| |b| |c| $)
  (SPADCALL (FLOAT |a| MOST-POSITIVE-DOUBLE-FLOAT)
            (FLOAT |b| MOST-POSITIVE-DOUBLE-FLOAT)
            (FLOAT |c| MOST-POSITIVE-DOUBLE-FLOAT) (QREFELT $ 13))) 

(DEFUN |SCRT;sivec;2I$;4| (|a| |b| $)
  (SPADCALL (FLOAT |a| MOST-POSITIVE-DOUBLE-FLOAT)
            (FLOAT |b| MOST-POSITIVE-DOUBLE-FLOAT) (QREFELT $ 15))) 

(DEFUN |SCRT;sivec;3I$;5| (|a| |b| |c| $)
  (SPADCALL (FLOAT |a| MOST-POSITIVE-DOUBLE-FLOAT)
            (FLOAT |b| MOST-POSITIVE-DOUBLE-FLOAT)
            (FLOAT |c| MOST-POSITIVE-DOUBLE-FLOAT) (QREFELT $ 17))) 

(DEFUN |SCRT;distance;2$Df;6| (|p1| |p2| $)
  (SPADCALL (SPADCALL |p1| |p2| (QREFELT $ 19)) (QREFELT $ 20))) 

(DEFUN |SCRT;spnt;2Df$;7| (|a| |b| $)
  (PROG (|pt|)
    (RETURN
     (SEQ (LETT |pt| (MAKEARR1 (+ (QREFELT $ 6) 1) 0.0) |SCRT;spnt;2Df$;7|)
          (QSETAREF1 |pt| 0 |a|) (QSETAREF1 |pt| 1 |b|)
          (QSETAREF1 |pt| (QREFELT $ 6) 1.0) (EXIT |pt|))))) 

(DEFUN |SCRT;spnt;3Df$;8| (|a| |b| |c| $)
  (PROG (|pt|)
    (RETURN
     (SEQ (LETT |pt| (MAKEARR1 (+ (QREFELT $ 6) 1) 0.0) |SCRT;spnt;3Df$;8|)
          (QSETAREF1 |pt| 0 |a|) (QSETAREF1 |pt| 1 |b|)
          (COND ((< 2 (QREFELT $ 6)) (QSETAREF1 |pt| 2 |c|)))
          (QSETAREF1 |pt| (QREFELT $ 6) 1.0) (EXIT |pt|))))) 

(DEFUN |SCRT;svec;2Df$;9| (|a| |b| $)
  (PROG (|pt|)
    (RETURN
     (SEQ (LETT |pt| (MAKEARR1 (+ (QREFELT $ 6) 1) 0.0) |SCRT;svec;2Df$;9|)
          (QSETAREF1 |pt| 0 |a|) (QSETAREF1 |pt| 1 |b|)
          (QSETAREF1 |pt| (QREFELT $ 6) 0.0) (EXIT |pt|))))) 

(DEFUN |SCRT;svec;3Df$;10| (|a| |b| |c| $)
  (PROG (|pt|)
    (RETURN
     (SEQ (LETT |pt| (MAKEARR1 (+ (QREFELT $ 6) 1) 0.0) |SCRT;svec;3Df$;10|)
          (QSETAREF1 |pt| 0 |a|) (QSETAREF1 |pt| 1 |b|)
          (COND ((< 2 (QREFELT $ 6)) (QSETAREF1 |pt| 2 |c|)))
          (QSETAREF1 |pt| (QREFELT $ 6) 0.0) (EXIT |pt|))))) 

(PUT '|SCRT;dimension;$Pi;11| '|SPADreplace| '(XLAM (|p|) 3)) 

(DEFUN |SCRT;dimension;$Pi;11| (|p| $) 3) 

(DEFUN |SCRT;nan?| (|x| $) (COND ((EQL-DF |x| |x|) 'NIL) ('T 'T))) 

(DEFUN |SCRT;Pnan?;$B;13| (|p| $)
  (SEQ
   (COND
    ((OR (|SCRT;nan?| (QAREF1 |p| 0) $) (|SCRT;nan?| (QAREF1 |p| 1) $)) 'T)
    ('T
     (SEQ
      (COND
       ((< 2 (QREFELT $ 6)) (COND ((|SCRT;nan?| (QAREF1 |p| 2) $) (EXIT 'T)))))
      (EXIT 'NIL)))))) 

(DEFUN |SCRT;parallel;2$Df;14| (|x| |y| $)
  (ADD-DF
   (ADD-DF (MUL-DF (QAREF1 |x| 0) (QAREF1 |y| 0))
           (MUL-DF (QAREF1 |x| 1) (QAREF1 |y| 1)))
   (MUL-DF (QAREF1 |x| 2) (QAREF1 |y| 2)))) 

(DEFUN |SCRT;unitVector;2$;15| (|p| $)
  (PROG (|pt| |factor|)
    (RETURN
     (SEQ
      (LETT |factor|
            (COND
             ((< 2 (QREFELT $ 6))
              (SPADCALL
               (ADD-DF
                (ADD-DF (MUL-DF (QAREF1 |p| 0) (QAREF1 |p| 0))
                        (MUL-DF (QAREF1 |p| 1) (QAREF1 |p| 1)))
                (MUL-DF (QAREF1 |p| 2) (QAREF1 |p| 2)))
               (QREFELT $ 20)))
             ('T
              (SPADCALL
               (ADD-DF (MUL-DF (QAREF1 |p| 0) (QAREF1 |p| 0))
                       (MUL-DF (QAREF1 |p| 1) (QAREF1 |p| 1)))
               (QREFELT $ 20))))
            . #1=(|SCRT;unitVector;2$;15|))
      (LETT |pt| (MAKEARR1 (+ (QREFELT $ 6) 1) 0.0) . #1#)
      (QSETAREF1 |pt| 0 (DIV-DF (QAREF1 |p| 0) |factor|))
      (QSETAREF1 |pt| 1 (DIV-DF (QAREF1 |p| 1) |factor|))
      (COND
       ((< 2 (QREFELT $ 6))
        (QSETAREF1 |pt| 2 (DIV-DF (QAREF1 |p| 2) |factor|))))
      (QSETAREF1 |pt| (QREFELT $ 6) 0.0) (EXIT |pt|))))) 

(DEFUN |SCRT;distanceSquared;2$Df;16| (|p1| |p2| $)
  (PROG (#1=#:G1833)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (COND
         ((< 2 (QREFELT $ 6))
          (PROGN
           (LETT #1#
                 (ADD-DF
                  (ADD-DF
                   (EXPT-DF-I (SUB-DF (QAREF1 |p1| 0) (QAREF1 |p2| 0)) 2)
                   (EXPT-DF-I (SUB-DF (QAREF1 |p1| 1) (QAREF1 |p2| 1)) 2))
                  (EXPT-DF-I (SUB-DF (QAREF1 |p1| 2) (QAREF1 |p2| 2)) 2))
                 |SCRT;distanceSquared;2$Df;16|)
           (GO #1#))))
        (EXIT
         (ADD-DF (EXPT-DF-I (SUB-DF (QAREF1 |p1| 0) (QAREF1 |p2| 0)) 2)
                 (EXPT-DF-I (SUB-DF (QAREF1 |p1| 1) (QAREF1 |p2| 1)) 2)))))
      #1# (EXIT #1#))))) 

(DEFUN |SCRT;perpendicular;3$;17| (|x| |y| $)
  (PROG (#1=#:G1835 |pt|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |pt| (MAKEARR1 (+ (QREFELT $ 6) 1) 0.0)
              . #2=(|SCRT;perpendicular;3$;17|))
        (COND
         ((< (QREFELT $ 6) 3)
          (PROGN (LETT #1# (SPADCALL 0 0 (QREFELT $ 12)) . #2#) (GO #1#))))
        (QSETAREF1 |pt| 0
                   (SUB-DF (MUL-DF (QAREF1 |x| 1) (QAREF1 |y| 2))
                           (MUL-DF (QAREF1 |x| 2) (QAREF1 |y| 1))))
        (QSETAREF1 |pt| 1
                   (SUB-DF (MUL-DF (QAREF1 |x| 2) (QAREF1 |y| 0))
                           (MUL-DF (QAREF1 |x| 0) (QAREF1 |y| 2))))
        (QSETAREF1 |pt| 2
                   (SUB-DF (MUL-DF (QAREF1 |x| 0) (QAREF1 |y| 1))
                           (MUL-DF (QAREF1 |x| 1) (QAREF1 |y| 0))))
        (QSETAREF1 |pt| (QREFELT $ 6) 0.0) (EXIT |pt|)))
      #1# (EXIT #1#))))) 

(DEFUN |SCRT;*;Df2$;18| (|s| |x| $)
  (PROG (|pt|)
    (RETURN
     (SEQ (LETT |pt| (MAKEARR1 (+ (QREFELT $ 6) 1) 0.0) |SCRT;*;Df2$;18|)
          (QSETAREF1 |pt| 0 (MUL-DF (QAREF1 |x| 0) |s|))
          (QSETAREF1 |pt| 1 (MUL-DF (QAREF1 |x| 1) |s|))
          (COND
           ((< 2 (QREFELT $ 6))
            (QSETAREF1 |pt| 2 (MUL-DF (QAREF1 |x| 2) |s|))))
          (QSETAREF1 |pt| (QREFELT $ 6) 1.0) (EXIT |pt|))))) 

(DEFUN |SCRT;+;3$;19| (|x| |y| $)
  (PROG (|pt|)
    (RETURN
     (SEQ (LETT |pt| (MAKEARR1 4 0.0) |SCRT;+;3$;19|)
          (QSETAREF1 |pt| 0 (ADD-DF (QAREF1 |x| 0) (QAREF1 |y| 0)))
          (QSETAREF1 |pt| 1 (ADD-DF (QAREF1 |x| 1) (QAREF1 |y| 1)))
          (COND
           ((< 2 (QREFELT $ 6))
            (QSETAREF1 |pt| 2 (ADD-DF (QAREF1 |x| 2) (QAREF1 |y| 2)))))
          (QSETAREF1 |pt| (QREFELT $ 6) 1.0) (EXIT |pt|))))) 

(DEFUN |SCRT;-;3$;20| (|x| |y| $)
  (PROG (|pt|)
    (RETURN
     (SEQ (LETT |pt| (MAKEARR1 4 0.0) |SCRT;-;3$;20|)
          (QSETAREF1 |pt| 0 (SUB-DF (QAREF1 |x| 0) (QAREF1 |y| 0)))
          (QSETAREF1 |pt| 1 (SUB-DF (QAREF1 |x| 1) (QAREF1 |y| 1)))
          (COND
           ((< 2 (QREFELT $ 6))
            (QSETAREF1 |pt| 2 (SUB-DF (QAREF1 |x| 2) (QAREF1 |y| 2)))))
          (QSETAREF1 |pt| (QREFELT $ 6) 1.0) (EXIT |pt|))))) 

(DEFUN |SCRT;inBounds?;3$B;21| (|pt| |mns| |mxs| $)
  (COND
   ((OR (LESS-DF (QAREF1 |pt| 0) (QAREF1 |mns| 0))
        (OR (LESS-DF (QAREF1 |mxs| 0) (QAREF1 |pt| 0))
            (OR (LESS-DF (QAREF1 |pt| 1) (QAREF1 |mns| 1))
                (LESS-DF (QAREF1 |mxs| 1) (QAREF1 |pt| 1)))))
    'NIL)
   ('T 'T))) 

(PUT '|SCRT;screenCoordX;$Df;22| '|SPADreplace| '(XLAM (|pt|) (QAREF1 |pt| 0))) 

(DEFUN |SCRT;screenCoordX;$Df;22| (|pt| $) (QAREF1 |pt| 0)) 

(PUT '|SCRT;screenCoordY;$Df;23| '|SPADreplace| '(XLAM (|pt|) (QAREF1 |pt| 1))) 

(DEFUN |SCRT;screenCoordY;$Df;23| (|pt| $) (QAREF1 |pt| 1)) 

(DEFUN |SCRT;screenCoordZ;$Df;24| (|pt| $)
  (COND ((< 2 (QREFELT $ 6)) (QAREF1 |pt| 2)) ('T 0.0))) 

(DEFUN |SCRT;screenCoords;$L;25| (|pt| $)
  (SEQ
   (COND
    ((< 2 (QREFELT $ 6))
     (LIST (QAREF1 |pt| 0) (QAREF1 |pt| 1) (QAREF1 |pt| 2))))
   (EXIT (LIST (QAREF1 |pt| 0) (QAREF1 |pt| 1))))) 

(DEFUN |SCRT;extendedCoords;$L;26| (|pt| $) (SPADCALL |pt| (QREFELT $ 41))) 

(PUT '|SCRT;hash;$Si;27| '|SPADreplace| '(XLAM (|s|) 0)) 

(DEFUN |SCRT;hash;$Si;27| (|s| $) 0) 

(PUT '|SCRT;latex;$S;28| '|SPADreplace|
     '(XLAM (|s|) "\\mbox{\\bf Unimplemented}")) 

(DEFUN |SCRT;latex;$S;28| (|s| $) "\\mbox{\\bf Unimplemented}") 

(DEFUN |SCRT;=;2$B;29| (|x| |y| $)
  (PROG (#1=#:G1863 #2=#:G1864 |i|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (SEQ (LETT |i| 0 . #3=(|SCRT;=;2$B;29|))
             (LETT #2# (+ (QREFELT $ 6) 1) . #3#) G190
             (COND ((QSGREATERP |i| #2#) (GO G191)))
             (SEQ
              (EXIT
               (COND
                ((NULL (EQL-DF (QAREF1 |x| |i|) (QAREF1 |y| |i|)))
                 (PROGN (LETT #1# 'NIL . #3#) (GO #1#))))))
             (LETT |i| (QSADD1 |i|) . #3#) (GO G190) G191 (EXIT NIL))
        (EXIT 'T)))
      #1# (EXIT #1#))))) 

(DEFUN |SCRT;~=;2$B;30| (|x| |y| $)
  (COND ((SPADCALL |x| |y| (QREFELT $ 47)) 'NIL) ('T 'T))) 

(DEFUN |SCRT;coerce;$Of;31| (|pt| $)
  (PROG (|s|)
    (RETURN
     (SEQ (LETT |s| "proj" . #1=(|SCRT;coerce;$Of;31|))
          (COND
           ((EQL-DF (QAREF1 |pt| (QREFELT $ 6)) 0.0) (LETT |s| "v" . #1#)))
          (COND
           ((EQL-DF (QAREF1 |pt| (QREFELT $ 6)) 1.0) (LETT |s| "p" . #1#)))
          (EXIT
           (SPADCALL
            (LIST (SPADCALL |s| (QREFELT $ 50))
                  (SPADCALL (QAREF1 |pt| 0) (QREFELT $ 51))
                  (SPADCALL (QAREF1 |pt| 1) (QREFELT $ 51))
                  (SPADCALL (QAREF1 |pt| 2) (QREFELT $ 51)))
            (QREFELT $ 53))))))) 

(DEFUN |SCartesian| (#1=#:G1870)
  (PROG ()
    (RETURN
     (PROG (#2=#:G1871)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache|
                                                 '|SCartesian|)
                                           '|domainEqualList|)
                . #3=(|SCartesian|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT (PROG1 (|SCartesian;| #1#) (LETT #2# T . #3#))
            (COND ((NOT #2#) (HREM |$ConstructorCache| '|SCartesian|))))))))))) 

(DEFUN |SCartesian;| (|#1|)
  (PROG (|pv$| $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|SCartesian|))
      (LETT |dv$| (LIST '|SCartesian| DV$1) . #1#)
      (LETT $ (GETREFV 55) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|SCartesian| (LIST DV$1) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (SETF |pv$| (QREFELT $ 3))
      (QSETREFV $ 22 (|PrimitiveArray| (|DoubleFloat|)))
      $)))) 

(MAKEPROP '|SCartesian| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|Type|) (|local| |#1|) (|DoubleFloat|)
              |SCRT;parallel;2$Df;14| |SCRT;colinearity;2$Df;1|
              |SCRT;spnt;2Df$;7| (|Integer|) |SCRT;sipnt;2I$;2|
              |SCRT;spnt;3Df$;8| |SCRT;sipnt;3I$;3| |SCRT;svec;2Df$;9|
              |SCRT;sivec;2I$;4| |SCRT;svec;3Df$;10| |SCRT;sivec;3I$;5|
              |SCRT;distanceSquared;2$Df;16| (0 . |sqrt|)
              |SCRT;distance;2$Df;6| '|Rep| (|PositiveInteger|)
              |SCRT;dimension;$Pi;11| (|Boolean|) |SCRT;Pnan?;$B;13|
              (|Fraction| 11) (5 . |One|) (9 . |Zero|) |SCRT;unitVector;2$;15|
              |SCRT;perpendicular;3$;17| |SCRT;*;Df2$;18| |SCRT;+;3$;19|
              |SCRT;-;3$;20| |SCRT;inBounds?;3$B;21| |SCRT;screenCoordX;$Df;22|
              |SCRT;screenCoordY;$Df;23| |SCRT;screenCoordZ;$Df;24| (|List| 7)
              |SCRT;screenCoords;$L;25| (13 . |entries|)
              |SCRT;extendedCoords;$L;26| (|SingleInteger|) |SCRT;hash;$Si;27|
              (|String|) |SCRT;latex;$S;28| |SCRT;=;2$B;29| |SCRT;~=;2$B;30|
              (|OutputForm|) (18 . |coerce|) (23 . |coerce|) (|List| $)
              (28 . |paren|) |SCRT;coerce;$Of;31|)
           '#(~= 33 |unitVector| 39 |svec| 44 |spnt| 57 |sivec| 70 |sipnt| 83
              |screenCoords| 96 |screenCoordZ| 101 |screenCoordY| 106
              |screenCoordX| 111 |perpendicular| 116 |parallel| 122 |latex| 128
              |inBounds?| 133 |hash| 140 |extendedCoords| 145 |distanceSquared|
              150 |distance| 156 |dimension| 162 |colinearity| 167 |coerce| 173
              |Pnan?| 178 = 183 - 189 + 195 * 201)
           'NIL
           (CONS (|makeByteWordVec2| 1 '(0 0 0 0))
                 (CONS '#(NIL |SetCategory&| |BasicType&| NIL)
                       (CONS
                        '#((|SPointCategory|) (|SetCategory|) (|BasicType|)
                           (|CoercibleTo| 49))
                        (|makeByteWordVec2| 54
                                            '(1 7 0 0 20 0 27 0 28 0 27 0 29 1
                                              22 39 0 41 1 45 49 0 50 1 7 49 0
                                              51 1 49 0 52 53 2 0 25 0 0 48 1 0
                                              0 0 30 3 0 0 7 7 7 17 2 0 0 7 7
                                              15 3 0 0 7 7 7 13 2 0 0 7 7 10 3
                                              0 0 11 11 11 18 2 0 0 11 11 16 3
                                              0 0 11 11 11 14 2 0 0 11 11 12 1
                                              0 39 0 40 1 0 7 0 38 1 0 7 0 37 1
                                              0 7 0 36 2 0 0 0 0 31 2 0 7 0 0 8
                                              1 0 45 0 46 3 0 25 0 0 0 35 1 0
                                              43 0 44 1 0 39 0 42 2 0 7 0 0 19
                                              2 0 7 0 0 21 1 0 23 0 24 2 0 7 0
                                              0 9 1 0 49 0 54 1 0 25 0 26 2 0
                                              25 0 0 47 2 0 0 0 0 34 2 0 0 0 0
                                              33 2 0 0 7 0 32)))))
           '|lookupComplete|)) 
