
(/VERSIONCHECK 2) 

(DEFUN |DHMATRIX;identity;$;1| ($)
  (SPADCALL
      (LIST (LIST (|spadConstant| $ 7) (|spadConstant| $ 8)
                  (|spadConstant| $ 8) (|spadConstant| $ 8))
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 7)
                  (|spadConstant| $ 8) (|spadConstant| $ 8))
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 8)
                  (|spadConstant| $ 7) (|spadConstant| $ 8))
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 8)
                  (|spadConstant| $ 8) (|spadConstant| $ 7)))
      (QREFELT $ 10))) 

(DEFUN |DHMATRIX;*;$2P;2| (|d| |p| $)
  (PROG (|v|)
    (RETURN
      (SEQ (LETT |v| |p| . #0=(|DHMATRIX;*;$2P;2|))
           (LETT |v|
                 (SPADCALL |v| (|spadConstant| $ 7) (QREFELT $ 13)) . #0#)
           (LETT |v| (SPADCALL |d| |v| (QREFELT $ 14)) . #0#)
           (EXIT (SPADCALL
                     (LIST (SPADCALL |v| 1 (QREFELT $ 16))
                           (SPADCALL |v| 2 (QREFELT $ 16))
                           (SPADCALL |v| 3 (QREFELT $ 16)))
                     (QREFELT $ 19))))))) 

(DEFUN |DHMATRIX;rotatex;R$;3| (|degree| $)
  (PROG (|angle| |cosAngle| |sinAngle|)
    (RETURN
      (SEQ (LETT |angle|
                 (SPADCALL
                     (SPADCALL |degree| (SPADCALL (QREFELT $ 21))
                         (QREFELT $ 22))
                     (SPADCALL 180 (QREFELT $ 23)) (QREFELT $ 24))
                 . #0=(|DHMATRIX;rotatex;R$;3|))
           (LETT |cosAngle| (SPADCALL |angle| (QREFELT $ 25)) . #0#)
           (LETT |sinAngle| (SPADCALL |angle| (QREFELT $ 26)) . #0#)
           (EXIT (SPADCALL
                     (LIST (LIST (|spadConstant| $ 7)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8))
                           (LIST (|spadConstant| $ 8) |cosAngle|
                                 (SPADCALL |sinAngle| (QREFELT $ 27))
                                 (|spadConstant| $ 8))
                           (LIST (|spadConstant| $ 8) |sinAngle|
                                 |cosAngle| (|spadConstant| $ 8))
                           (LIST (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 7)))
                     (QREFELT $ 10))))))) 

(DEFUN |DHMATRIX;rotatey;R$;4| (|degree| $)
  (PROG (|angle| |cosAngle| |sinAngle|)
    (RETURN
      (SEQ (LETT |angle|
                 (SPADCALL
                     (SPADCALL |degree| (SPADCALL (QREFELT $ 21))
                         (QREFELT $ 22))
                     (SPADCALL 180 (QREFELT $ 23)) (QREFELT $ 24))
                 . #0=(|DHMATRIX;rotatey;R$;4|))
           (LETT |cosAngle| (SPADCALL |angle| (QREFELT $ 25)) . #0#)
           (LETT |sinAngle| (SPADCALL |angle| (QREFELT $ 26)) . #0#)
           (EXIT (SPADCALL
                     (LIST (LIST |cosAngle| (|spadConstant| $ 8)
                                 |sinAngle| (|spadConstant| $ 8))
                           (LIST (|spadConstant| $ 8)
                                 (|spadConstant| $ 7)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8))
                           (LIST (SPADCALL |sinAngle| (QREFELT $ 27))
                                 (|spadConstant| $ 8) |cosAngle|
                                 (|spadConstant| $ 8))
                           (LIST (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 7)))
                     (QREFELT $ 10))))))) 

(DEFUN |DHMATRIX;rotatez;R$;5| (|degree| $)
  (PROG (|angle| |cosAngle| |sinAngle|)
    (RETURN
      (SEQ (LETT |angle|
                 (SPADCALL
                     (SPADCALL |degree| (SPADCALL (QREFELT $ 21))
                         (QREFELT $ 22))
                     (SPADCALL 180 (QREFELT $ 23)) (QREFELT $ 24))
                 . #0=(|DHMATRIX;rotatez;R$;5|))
           (LETT |cosAngle| (SPADCALL |angle| (QREFELT $ 25)) . #0#)
           (LETT |sinAngle| (SPADCALL |angle| (QREFELT $ 26)) . #0#)
           (EXIT (SPADCALL
                     (LIST (LIST |cosAngle|
                                 (SPADCALL |sinAngle| (QREFELT $ 27))
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8))
                           (LIST |sinAngle| |cosAngle|
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8))
                           (LIST (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 7)
                                 (|spadConstant| $ 8))
                           (LIST (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 8)
                                 (|spadConstant| $ 7)))
                     (QREFELT $ 10))))))) 

(DEFUN |DHMATRIX;scale;3R$;6| (|scalex| |scaley| |scalez| $)
  (SPADCALL
      (LIST (LIST |scalex| (|spadConstant| $ 8) (|spadConstant| $ 8)
                  (|spadConstant| $ 8))
            (LIST (|spadConstant| $ 8) |scaley| (|spadConstant| $ 8)
                  (|spadConstant| $ 8))
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 8) |scalez|
                  (|spadConstant| $ 8))
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 8)
                  (|spadConstant| $ 8) (|spadConstant| $ 7)))
      (QREFELT $ 10))) 

(DEFUN |DHMATRIX;translate;3R$;7| (|x| |y| |z| $)
  (SPADCALL
      (LIST (LIST (|spadConstant| $ 7) (|spadConstant| $ 8)
                  (|spadConstant| $ 8) |x|)
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 7)
                  (|spadConstant| $ 8) |y|)
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 8)
                  (|spadConstant| $ 7) |z|)
            (LIST (|spadConstant| $ 8) (|spadConstant| $ 8)
                  (|spadConstant| $ 8) (|spadConstant| $ 7)))
      (QREFELT $ 10))) 

(DEFUN |DenavitHartenbergMatrix| (#0=#:G1834)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1835)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (LIST (|devaluate| #0#))
                       (HGET |$ConstructorCache|
                             '|DenavitHartenbergMatrix|)
                       '|domainEqualList|)
                   . #2=(|DenavitHartenbergMatrix|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (|DenavitHartenbergMatrix;| #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache| '|DenavitHartenbergMatrix|))))))))))) 

(DEFUN |DenavitHartenbergMatrix;| (|#1|)
  (PROG (DV$1 |dv$| $ #0=#:G1833 |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #1=(|DenavitHartenbergMatrix|))
        (LETT |dv$| (LIST '|DenavitHartenbergMatrix| DV$1) . #1#)
        (LETT $ (GETREFV 47) . #1#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (LETT #0#
                                  (|HasCategory| |#1| '(|SetCategory|)) . #1#)
                            (AND #0#
                                 (|HasCategory| |#1|
                                     (LIST '|Evalable|
                                      (|devaluate| |#1|))))
                            (|HasCategory| |#1| '(|EuclideanDomain|))
                            (|HasCategory| |#1| '(|IntegralDomain|))
                            (|HasCategory| |#1| '(|CommutativeRing|))
                            (|HasCategory| |#1| '(|Field|)))) . #1#))
        (|haddProp| |$ConstructorCache| '|DenavitHartenbergMatrix|
            (LIST DV$1) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (AND (|HasCategory| $ '(|finiteAggregate|))
             (|augmentPredVector| $ 64))
        (AND (|HasCategory| $ '(|finiteAggregate|)) #0#
             (|augmentPredVector| $ 128))
        $)))) 

(MAKEPROP '|DenavitHartenbergMatrix| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL (|Matrix| 6) (|local| |#1|)
             (0 . |One|) (4 . |Zero|) (|List| 17) (8 . |matrix|)
             |DHMATRIX;identity;$;1| (|Vector| 6) (13 . |concat|)
             (19 . *) (|Integer|) (25 . |elt|) (|List| 6) (|Point| 6)
             (31 . |point|) |DHMATRIX;*;$2P;2| (36 . |pi|) (40 . *)
             (46 . |coerce|) (51 . /) (57 . |cos|) (62 . |sin|)
             (67 . -) |DHMATRIX;rotatex;R$;3| |DHMATRIX;rotatey;R$;4|
             |DHMATRIX;rotatez;R$;5| |DHMATRIX;scale;3R$;6|
             |DHMATRIX;translate;3R$;7| (|Boolean|)
             (|NonNegativeInteger|) (|List| 36) (|Equation| 6)
             (|Mapping| 33 6) (|List| 12) (|Union| $ '"failed")
             (|OutputForm|) (|SingleInteger|) (|String|) (|List| 15)
             (|List| $) (|Mapping| 6 6 6) (|Mapping| 6 6))
          '#(~= 72 |zero| 78 |vertConcat| 84 |transpose| 90 |translate|
             100 |symmetric?| 107 |swapRows!| 112 |swapColumns!| 119
             |subMatrix| 126 |squareTop| 135 |square?| 140 |size?| 145
             |setsubMatrix!| 151 |setelt| 159 |setRow!| 175
             |setColumn!| 182 |scale| 189 |scalarMatrix| 196 |sample|
             202 |rowEchelon| 206 |row| 211 |rotatez| 217 |rotatey| 222
             |rotatex| 227 |rank| 232 |qsetelt!| 237 |qelt| 245 |parts|
             252 |nullity| 257 |nullSpace| 262 |nrows| 267 |new| 272
             |ncols| 279 |more?| 284 |minordet| 290 |minRowIndex| 295
             |minColIndex| 300 |members| 305 |member?| 310
             |maxRowIndex| 316 |maxColIndex| 321 |matrix| 326 |map!|
             331 |map| 337 |listOfLists| 358 |less?| 363 |latex| 369
             |inverse| 374 |identity| 379 |horizConcat| 383 |hash| 389
             |fill!| 394 |exquo| 400 |every?| 406 |eval| 412 |eq?| 438
             |empty?| 444 |empty| 449 |elt| 453 |diagonalMatrix| 475
             |diagonal?| 485 |determinant| 490 |count| 495 |copy| 507
             |columnSpace| 512 |column| 517 |coerce| 523 |any?| 533
             |antisymmetric?| 539 |Pfaffian| 544 = 549 / 555 - 561 +
             572 ** 578 * 590 |#| 632)
          'NIL
          (CONS (|makeByteWordVec2| 2 '(0 0 0 0 2 1 0 0 0 2 1 1))
                (CONS '#(|MatrixCategory&|
                         |TwoDimensionalArrayCategory&|
                         |HomogeneousAggregate&| |Aggregate&|
                         |Evalable&| |SetCategory&| NIL NIL NIL
                         |InnerEvalable&| |BasicType&| NIL)
                      (CONS '#((|MatrixCategory| 6 (|Vector| 6)
                                   (|Vector| 6))
                               (|TwoDimensionalArrayCategory| 6
                                   (|Vector| 6) (|Vector| 6))
                               (|HomogeneousAggregate| 6) (|Aggregate|)
                               (|Evalable| 6) (|SetCategory|) (|Type|)
                               (|finiteAggregate|) (|shallowlyMutable|)
                               (|InnerEvalable| 6 6) (|BasicType|)
                               (|CoercibleTo| 40))
                            (|makeByteWordVec2| 46
                                '(0 6 0 7 0 6 0 8 1 0 0 9 10 2 12 0 0 6
                                  13 2 0 12 0 12 14 2 12 6 0 15 16 1 18
                                  0 17 19 0 6 0 21 2 6 0 0 0 22 1 6 0
                                  15 23 2 6 0 0 0 24 1 6 0 0 25 1 6 0 0
                                  26 1 6 0 0 27 2 1 33 0 0 1 2 0 0 34
                                  34 1 2 0 0 0 0 1 1 0 0 0 1 1 0 0 12 1
                                  3 0 0 6 6 6 32 1 0 33 0 1 3 0 0 0 15
                                  15 1 3 0 0 0 15 15 1 5 0 0 0 15 15 15
                                  15 1 1 0 0 0 1 1 0 33 0 1 2 0 33 0 34
                                  1 4 0 0 0 15 15 0 1 4 0 0 0 43 43 0 1
                                  4 0 6 0 15 15 6 1 3 0 0 0 15 12 1 3 0
                                  0 0 15 12 1 3 0 0 6 6 6 31 2 0 0 34 6
                                  1 0 0 0 1 1 3 0 0 1 2 0 12 0 15 1 1 0
                                  0 6 30 1 0 0 6 29 1 0 0 6 28 1 4 34 0
                                  1 4 0 6 0 15 15 6 1 3 0 6 0 15 15 1 1
                                  0 17 0 1 1 4 34 0 1 1 4 38 0 1 1 0 34
                                  0 1 3 0 0 34 34 6 1 1 0 34 0 1 2 0 33
                                  0 34 1 1 5 6 0 1 1 0 15 0 1 1 0 15 0
                                  1 1 7 17 0 1 2 8 33 6 0 1 1 0 15 0 1
                                  1 0 15 0 1 1 0 0 9 10 2 0 0 46 0 1 4
                                  0 0 45 0 0 6 1 3 0 0 45 0 0 1 2 0 0
                                  46 0 1 1 0 9 0 1 2 0 33 0 34 1 1 1 42
                                  0 1 1 6 39 0 1 0 0 0 11 2 0 0 0 0 1 1
                                  1 41 0 1 2 0 0 0 6 1 2 4 39 0 6 1 2 7
                                  33 37 0 1 3 2 0 0 17 17 1 3 2 0 0 6 6
                                  1 2 2 0 0 35 1 2 2 0 0 36 1 2 0 33 0
                                  0 1 1 0 33 0 1 0 0 0 1 3 0 0 0 43 43
                                  1 4 0 6 0 15 15 6 1 3 0 6 0 15 15 1 1
                                  0 0 44 1 1 0 0 17 1 1 0 33 0 1 1 5 6
                                  0 1 2 8 34 6 0 1 2 7 34 37 0 1 1 0 0
                                  0 1 1 3 38 0 1 2 0 12 0 15 1 1 1 40 0
                                  1 1 0 0 12 1 2 7 33 37 0 1 1 0 33 0 1
                                  1 5 6 0 1 2 1 33 0 0 1 2 6 0 0 6 1 1
                                  0 0 0 1 2 0 0 0 0 1 2 0 0 0 0 1 2 6 0
                                  0 15 1 2 0 0 0 34 1 2 0 18 0 18 20 2
                                  0 12 12 0 1 2 0 12 0 12 14 2 0 0 0 6
                                  1 2 0 0 15 0 1 2 0 0 6 0 1 2 0 0 0 0
                                  1 1 7 34 0 1)))))
          '|lookupComplete|)) 
