perm filename CYCDR5[1,LMM] blob sn#033102 filedate 1973-04-04 generic text, type T, neo UTF8
  (DE SETND (X Y)
      (PROG NIL (STORE (NODEARRAY X) (CAR Y))
            (STORE (NODEARRAY (*PLUS X 20)) (CDR Y))
            (RETURN Y)))))))))))))))))))



  (DE RTLIN (RI X L1)
      (PROG (X1 X2 Y1 Y2 N1 N2 Y SL1 YT1 Z)
            (COND ((NULL L1) (RETURN T)))
            (SETQ N1 (CAAR X))
            (SETQ N2 (CDAR X))
            (SETQ X1 (NODEARRAY N1))
            (SETQ X2 (NODEARRAY N2))
            (SETQ Y1 (NODEARRAY (*PLUS N1 20)))
            (SETQ Y2 (NODEARRAY (*PLUS N2 20)))
            (SETQ SL1 (SLOPE X1 X2 Y1 Y2))
            (SETQ YT1 (YINTCP X1 X2 Y1 Y2))
            (RETURN (FOR Y IN L1 AS Z IS (CONCT X Y)
                       AS N1 IS (CAAR Y)
                       AS N2 IS (CDAR Y)
			AS NEW A1 IS (NODEARRAY N1)
			AS NEW A2 IS (NODEARRAY N2)
			AS NEW B1 IS (NODEARRAY (*PLUS N1 20))
			AS NEW B2 IS (NODEARRAY (*PLUS N2 20))
                       AND
      (PROG (SL2 X YT2 V1 V2)
            (SETQ SL2 (SLOPE A1 A2 B1 B2))
            (SETQ X (*DIF (*TIMES (CAR SL1) (CDR SL2))
                          (*TIMES (CAR SL2) (CDR SL1))))
            (COND ((ZEROP X) (GO A))
                  (Z (RETURN T))
                  (RI (RETURN T)))
            (SETQ V1 (*DIF X2 X1))
            (SETQ V2 (*DIF A2 A1))
            (SETQ X(CONS(*DIF (*TIMES (*DIF (*TIMES B1 A2) (*TIMES A1 B2)) V1)
                              (*TIMES (*DIF (*TIMES Y1 X2) (*TIMES X1 Y2)) V2))
                        (*DIF (*TIMES (*DIF Y2 Y1) V2) (*TIMES (*DIF B2 B1) V1))))
            (SETQ X (COND ((EQ X1 X2)
                           (*TIMES (*DIF (CAR X) (*TIMES A1 (CDR X)))
                                   (*DIF (CAR X) (*TIMES A2 (CDR X)))))
                          (T (*TIMES (*DIF (CAR X) (*TIMES X1 (CDR X)))
                                     (*DIF (CAR X) (*TIMES X2 (CDR X)))))))
            (RETURN (NOT (MINUSP X)))
        A   (SETQ YT2 (YINTCP A1 A2 B1 B2))
            (SETQ X (*DIF (*TIMES (CAR YT1) (CDR YT2))
                          (*TIMES (CAR YT2) (CDR YT1))))
            (COND ((OR (NOT (ZEROP X))
                       (AND (ZEROP (CDR YT1))
                            (ZEROP (CDR YT2))
                            (NOT (EQ X1 A1))))
                   (RETURN T)))
            (RETURN (COND ((EQ X1 X2)
                           (OR (GEQ (MIN Y1 Y2) (MAX B1 B2))
                               (GEQ (MIN B1 B2) (MAX Y1 Y2))))
                          (T (OR (GEQ (MIN X1 X2) (MAX A1 A2))
                                 (GEQ (MIN A1 A2) (MAX X1 X2))))))))
)))))))))))))))